Since Pro 1.2.5 and Cornerstone 2.1.5 our builders will provide more helpful error messaging.
Origin URL and Preview URL
When an error occurs, you'll see the origin and preview URL displayed below. In order for the preview to work, the protocol (http/https) must match and the domain must match. The specific error messages covered below will help you troubleshoot cases when they don't match. Here's a description for each
Origin URL - This is where you are currently viewing the application from. It should be the domain of your website.
Preview URL - This is what the builder is attempting to load. The preview URLs are obtained using the WordPress
home_url function and by getting the permalink from posts. They will follow what you have configured under Settings > General for the WordPress URL and Site URL.
Preview Loading Error Messages
A conflict on the front end of your site has prevented the preview from loading.
This error appeared with any failure prior to Pro 1.2.5 and Cornerstone 2.1.5. Updating to the latest version may resolve your issue, or at least it will provide you with a more descriptive error message.
The preview could not load due to a http/https mismatch. Please check that HTTPS is properly configured on your site.
If you are working on the site with a HTTP url, this error means the builder is trying to load the preview frame over HTTPS. You can see what's mismatched by checking the preview and origin URLs showed below the error.
- Make sure that if you have HTTPS enabled that you are working in the builder over HTTPS as well.
- Try deactivating any HTTPS related plugins you have installed
- Under Settings > General in your dashboard, make sure both the WordPress and Site URL share the same protocol.
- Consider forcing HTTPS everywhere. If you have the ability to run HTTPS, nowadays it's just better to use it exclusively. Google claims this will even result in higher indexing.
The preview could not load due to misconfigured URLs. This could happen if you are using multiple environments and the site URL was not updated after migrating.
Another example of this is working on a staging site where a production database backup was imported and the site URL wasn't updated. Below the error message you will see the origin and preview URLs. The domains and protocols (http/https) must match.
- Check Settings > General in your dashboard. The WordPress URL and Site URL should match the domain in your address bar.
- There is a known conflict with SiteGround staging environments. Their staging provisioner relies on Apache URL rewriting. WordPress is still using the production URL internally, so the staging site doesn't really know it's a staging site. There are situations where plugin and theme logic (including Pro and Cornerstone) may end up using URLs from the production site because the staging system can't account for rewriting URLs in every context they may be used.
The preview could not load due to the iframe response being incomplete. This is most often related to a plugin conflict, or customizations introducing a PHP error.
This usually means somethings halted PHP execution (fatal PHP error or syntax error). The following could help uncover more information:
- Enable WP_DEBUG and WP_DEBUG_LOG. You might be able to see an error message on the site right away. If not, the error log could reveal where the problem is originating.
If you're using a child theme, try switching to the parent theme to see if that makes a difference. The conflict could be in your customizations.
Test for a plugin conflict (see below).
The preview was unresponsive after loading. This is most often related to a plugin conflict or aggressive page cacheing.
- Clear any caches. An older version of the page could be stored, preventing the builder from loading
- Test for a plugin conflict (see below).
- If you're using a child theme, try switching to the parent theme to see if that makes a difference. The conflict could be in your customizations.
The preview could not load. This is most often related to a plugin conflict or aggressive page cacheing. Checking the developer console for errors could indicate what went wrong.
This is the most generic of all the error messages. The previously mentioned ones rely on us detecting information about what is failing, but sometimes it fails in unexpected ways where we can't retrieve more information automatically. Using your browsers developer tools, you can check the web console. Often there are error messages that can reveal more about what is going on.
The preview HTML did not include a closing ; tag. It may fail to load or work properly.
Sometimes the preview loads, but this red error notification appears in the top right. Something is preventing the HTML tag from being closed. This is usually indicative of a fatal PHP error that halts output. We'd advise testing for a plugin conflict (below).
How to test for a plugin conflict
With many of these problems being related to plugins, testing for a conflict is often the fastest way to get to the bottom of things. Here's a simple plugin conflict testing process:
- Disable all plugins except Cornerstone. If you're using Pro, disable all plugins.
- Test to see if the issue remains.
- If things are working again, reactivate one of your plugins
- Test to see when the problem reappears
- If it does, you know the plugin you most recently activated is causing a problem. If it doesn't, go reactivate another plugin.
Seeing the error in a SiteGround staging environment?
There's a known issue with SiteGround staging environments where the builder tries to preview on the production URL. It happens because to make DB updates go smoother, SiteGround doesn't update the site URL inside WordPress, instead they rewrite it as the site is rendered. This has a side effect of any plugin/theme that uses the site URL directly from the database could end up using the production version instead. SiteGround is aware of this, and they've informed us they're working on improvements to their staging system to account for the additional cases.
To workaround the issue for now, they are recommending that you change the URLs before and after deploying. Here's a guide for that process:
- After creating your staging environment, go to Settings > General in your dashboard. Update the WordPress and site URLs to match the staging URL. For example
- Work on your site as usual.
- Before redeploying to production, go back and return the URLs to the production URL. If you fail to set the URL back before deploying, it will break the URLs on the production site.
I still can't get it working. What's next?
If you're still unable to resolve the issue, we welcome you to open a support topic. Please include as much information as you can, including your site URL, the error message you have, and any information discovered through what was advised in this article.