WordPress.org

Forums

WordPress MU Domain Mapping
Theme Customizer needs exception (6 posts)

  1. Jasonheffner
    Member
    Posted 2 years ago #

    The AJAX call for the Theme Customizer fails with a 301 error when the option to use "redirect the administration pages to site's original domain" is used.

    https://original.com/?customize_messenger_channel=preview...

    redirects to

    http://mapped.com/?customize_messenger_channel=preview...

    but should there should probably be an exception to not rewrite this url in the plugin.

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. Jasonheffner
    Member
    Posted 2 years ago #

    I saw you have a fix in place already in trunk, however it doesn't seem to work in 3.4.2. I updated the code from

    from

    // don't redirect theme customizer (WP 3.4)
    if ( isset( $_POST['customize'] ) && isset( $_POST['theme'] ) && $_POST['customize'] == 'on' )
    return;

    to

    // don't redirect theme customizer (WP 3.4)
    if ( isset( $_POST['customized'] ) && isset( $_POST['theme'] ) && $_POST['wp_customize'] == 'on' )
    return;

    based on the POST data.

  3. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    At what point does it fail?

  4. Jasonheffner
    Member
    Posted 2 years ago #

    You get a 301/302 redirect error when the AJAX call tries to load the preview, and you will get a blank iframe. I found your patch in 0.5.4.3 trunk above. It just turns out the exception put in place had the wrong parameters for the POST data.

    Here is the changeset: http://plugins.trac.wordpress.org/changeset/543145

    WP Core has a similar problem with Theme Changer as well if FORCE_SSL_ADMIN is set to true. You get a 301/302 error when it tries to load the preview since it's being redirected to non-SSL. I submitted a bug report there as well.

  5. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    Thanks :) The variable name may have been changed and I didn't catch it. AT the time I wrote the patch there was no d on the variable name.

    I'll be a couple days before I have a change to update trunk.

  6. Jasonheffner
    Member
    Posted 2 years ago #

    It seems they must have also changed the last customize with wp_customize as well.

    Here is the POST parameters that I see

    customize_messenger_channel
    customized
    nonce
    theme
    wp_customize

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.