WordPress.org

Ready to get started?Download WordPress

Forums

Multisite domain mapping and 3.4 theme customizer (6 posts)

  1. besson3c
    Member
    Posted 1 year ago #

    Has anybody gotten the two to work together?

    I'm not sure if this will work by design since cross domain AJAX calls are problematic? I'm getting the following sorts of JS errors:

    XMLHttpRequest cannot load http://mydomain.local/. Cannot make any requests from null.
    XHR finished loading: "http://mywpnetwork.local/mysite/wp-admin/admin-ajax.php".
    XMLHttpRequest cannot load http://mydomain.local/. Cannot make any requests from null.

    mydomain.local is my mapped domain name, and mywpnetwork.local is my parent WP network site.

    Is there a way to disable the redirects to the mapped domain for all WP dashboard requests? Since the AJAX call is being made to my WP network domain it appears that the redirects are causing the problem here?

    Has anybody wrestled with this yet? Am I on the right path?

  2. besson3c
    Member
    Posted 1 year ago #

    Adding:

    Header set Access-Control-Allow-Origin *

    To my .htaccess file suppresses the error message above, I'm no longer getting any Javascript console error messages, but I'm also not getting a theme preview at all. Looking at my web server logs I'm seeing the 301 redirects, which makes me think that the Domain Mapping plugin might need some tweaking to not redirect with theme preview requests?

  3. besson3c
    Member
    Posted 1 year ago #

  4. besson3c
    Member
    Posted 1 year ago #

    A slight modification to the latest Domain Mapping plugin was necessary, I've sent the authors a pull request for those anxious to get this working in the meantime:

    https://github.com/joeauty/wordpress-mu-domain-mapping

  5. etfb
    Member
    Posted 1 year ago #

    Yep, got that version; still doesn't work.

  6. besson3c
    Member
    Posted 1 year ago #

    You got the version with my patches? It works for me...

Topic Closed

This topic has been closed to new replies.

About this Topic