WP Engine Multisite with Domain Mapping: Error: A conflict on the front end of your site has prevented the preview from loading

I have a multisite installation using domain mapping. I am, unfortunately, encountering this error when attempting to edit a page or use the header or footer builder.

The site is hosted on WP Engine. I’m assuming you’ll need login credentials - I’ve added these via a secure note thanks to Kyle’s tip below. The site has multiple backups, so it will be fine to dig around in there.

Other details. I have tried disabling all plugins and accessing the PRO editor but I still encountered the error this way as well. Additionally, I removed all of my custom functions to see if any were interfering, but none were.

The multisite primary domain is apparelhost.com, and the primary child site is demo.branddevotion.com. Please let me know if you need anything else.

Thanks.

Hey Josh,

Hope you are well, my friend! There is a Secure Note option you should see on your comment/reply, and you can add your credentials in there.

Cheers!

Ha, that is excellent. Thanks for the tip, Kyle!

I’ve been doing good. Hopefully you’re doing the same!

1 Like

Hi there,

Upon checking, it looks like the culprit is the InstaShow Cornerstone Extension and Toolset Types plugin. I deactivate and builder preview loads okay.

  1. InstaShow Cornerstone Extension affect ajax request corrupting JSON response
/**/ jQuery1124054536133522466_1499469578882({"meta":{"code":400,"error_message":"service is unavailable now"}})
  1. Toolset Types is triggering javascript error

The preview works with these two are inactive. But still, preview works in random manners when the two are active. Maybe this is the effect of mixed HTTPS URL. Please contact your hosting provider about the URLs (make sure all internal URLs uses HTTPS), or let them do the search and replace

Like replacing http://example.com/wp-content/ with https://example.com/wp-content/

Some returns 404 which I think that not all files copied when the staging is generated. I couldn’t just do search and replace as it may conflict your current setup even though it’s a staging, it might be following their specific standard (eg. with object caches). But if you’ll allow me then I’ll do it, just letting you know that any change is irreversible.

Does this also happen on live site?

Thanks.

Thanks Iam. I discovered a recent update for InstaShow and updated that plugin which seems to have removed the error there.

For the mixed content I ran a search-replace in the database and fixed those errors.

I don’t see any Toolset Types related errors at this point in the console. Perhaps the other repairs affected this issue?

What I have discovered at this point is that the child-site that is not using domain mapping (the “Template” site) now works properly and loads the preview. But those that are using domain mapping (the “Merch Pro Demo” and “Brand Devotion Demos” sites) still throw the preview error.

The newest error I’m seeing is this one but I don’t understand it:

XMLHttpRequest cannot load https://demo.branddevotion.com/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://apparelhost.wpengine.com' is therefore not allowed access.

I’m very grateful for your help.

Hi there,

It looks like your subsites are still referring some of its URL from the main one (since it’s multi-site). Please add this to your site’s htaccess.

    <IfModule mod_headers.c>
        SetEnvIf Origin "http(s)?://(demo.branddevotion.com|apparelhost.wpengine.com)$" AccessControlAllowOrigin=$0
        Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
    </IfModule>

Please add your other subdomains separated by |, example

demo.branddevotion.com|apparelhost.wpengine.com|example.com

And please remove your embed code in your global custom javascript, it has HTML markup that shouldn’t be there.

If it’s not working, then please contact your hosting provider as they may have separate configuration for allow-origins.

Thanks!

1 Like

Thank you for more options to try, Iam. I gave these steps a go but it didn’t change anything.

But, I did find the solution in the process. Turns out there is a setting in the domain mapping area that let’s you choose where the admin pages are served from (i.e. your multisite domain path or the mapped domain).

Here are the settings I ended up with in Network Admin > Settings > Domain Mapping that fixed the issue (for anyone running into this problem in the future):

Thank you again for all of your help, Iam.

Hi @Jmot,

Happy to hear that it is fixed already. Thank you so much for sharing the solution. It would really help others.

Thanks.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.