Cornerstone "A conflict on the front end of your site has prevented the preview from loading." Polylang

A client of mine is using x-theme in combination with polylang, but when trying to edit a page that isn’t the default language, she gets the error:

A conflict on the front end of your site has prevented the preview from loading.

To be clear: the pages that are in the default language can be edited just fine, however all the other languages are giving this error.

I’ve browsed some other pages about this topic and have tried a couple of things already:

  • I’ve updated all the plugins to the latest version
  • I’ve installed the Transient Cleaner plugin and run it.
  • Made sure the site url is not set to https (the site doesn’t have SSL)

I’m not sure entirely, but I believe in the past the domain would switch to the correct language when editing a page:
site.com would become site.eu?cornerstone=1 etc. Since the new update where this was changed to /x/#/number, could i be that there is a bug there? Just some ideas on the cause of the issues.

Any help is appreciated! :smiley:

Hi There,

Thank you for writing in, first thing first please make sure that both X theme and Cornerstone are up to date. Refer here for the latest versions.

Remember to clear all caches after updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

If you can confirm that your theme and Cornerstone are updated but the issue persists, please do the suggestions provided here (see the Q: What does “A conflict prevented the preview from loading” mean?)

And if your site is under CloudFlare, please also see the Q: How Can I Make X/Pro Compatible With Cloudflare?

Hope it helps,
Cheers!

I can confirm that cornerstone and x-theme are completely up to date with the latest versions.

I’ve also gone ahead and tried some of the suggestions. I’ve tried disabling custom code in the child theme, but that yielded no results. The site is not using cloud flare and isn’t using any caching plugins either.

I want to stress again that cornerstone works as long as it’s on a page that is in the default language selected in Polylang. Any other language gives the error.

Thanks for your help!

Can you give us a screenshot of your URL settings so we could try to replicate your setup?

Thanks.

Here you go, sorry it is in dutch, if you need anything translated feel free to let me know.

I’m not sure what resolution the picture is and if it’s readable, if not, then here is a link to imgur where you can zoom in: http://imgur.com/a/AFf5k

Hi

I get the same issue. My hosting provider told me the issue arises because Pro tries to load mixed content http/https.

So I tested switching the entire site back to http and then the Pro editor started to work!

This is the error I get when https is switched on: http://take.ms/6R5V8

I think you need to make sure that the cs.js script follows the https policy of the website.

PS: I also use Polylang

Hmm That’s interesting, thanks for your response!

My client isn’t using Pro though, she’s on the normal x-theme license. I’ve also checked but she isn’t using SSL so the domain is just using http.

When I inspect the page in the cornerstone editing screen, I get this error:

I’m not sure what to think of the message ‘incomplete’.

Try using the second option in the URL setting.

When I set it to that option, cornerstone loads correctly, however my client wants to use the multiple domains for the different polylang languages. Any fix for this? :thinking:

I’m getting this same issue on a different website using a similar setup. Definitely seems like an incompatibility issue with polylang in the latest version of cornerstone :confounded:

Hi there,

What do you mean by multiple domains for Polylang? Because regardless of domain, the URL would be the same. Example, x1.dev/en/x/, x2.dev/en/x/, and so on. Which means, the suggested setup shouldn’t affect having multiple domains.

But yes, there are known issues with permalinks and translation plugins in which our developers are still working on. I just don’t know the status or ETA of the fixes.

Thanks!

What I mean is that polylang is set up to use url.com, url.co.uk, url.nl etc for each of the different languages and from what I can tell that’s where the issue arises, because regardless of which language page I’m editing, it’ll send me to the .nl domain (which is the main domain) en add /x/#/content/11080

Using the suggested URL setting would result in having url.nl/en of url.nl/fr , which sadly is not what my clients want.

For now I guess my advice will be to use that URL option until the issue with permalinks is resolved, but I really do hope it gets fixed soon. X-theme is my go to theme for Wordpress projects, but I need the combination with polylang working because I get a lot of questions for multilanguage sites :confused:

Thanks for your help anyway, I’m gonna keep an eye on the updates and hope you guys can find a fix!

Thank you for your input. As my colleague stated our development team is working to find a way to fix the redirection issues.

The priority is the WPML plugin which is the main supported plugin for our theme. My guess is that if the URL functionality is fixed for WPML, the same thing will be fixed for polylang.

Thank you.

Ah okay, well I’ll keep an eye on the changelog for cornerstone then! Also, knowing that WPML is the main supported plugin, I’ll have a look at maybe using that for future projects instead of Polylang :smiley:

Hi @Vinjo,

At this time we’re in the same boat for both WPML and Polylang. The ID in the URL is tied to the main post ID, and not the translated ones. Hopefully the solution we come up with will address the issue for both plugins.