Cornerstone update causes preview conflict

I have been dealing with cornerstone display issues after doing updates. This has been plaguing me for hours today as I tried many scenarios to try to save my site. I have disabled all plugins, cleared cache etc with no resolution. I finally created another staging site with a previous working backup and then did updates one at a time until the problem manifested with cornerstone. I am running the latest version of wordpress and PHP is also updated.

Upon trying to edit a site I am building I received this error on the homepage only:

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.
Origin URL: http://coaldalekinsmen.pagewebdesigns.com
Preview URL: http://coaldalekinsmen.pagewebdesigns.com
TRY AGAIN

This occurred only on the homepage and no other, this error also occurs when I go into X then Theme Options.

Once I created a new staging site and uploaded a previous backup I updated the theme first, the site still worked properly, I then updated cornerstone and the error occurred again. It would be nice if you could look into this. I am afraid to do any updates on other sites for fear of encountering the same problem.

I need to give you login details however I cannot see any way to provide them initially without them being visible.

Hi There,

Thank you for writing in, your server’s connection closes in your home page only. This has something to do with your server configuration.



Try to disable the ModSecurity, contact your hosting support to help you on this matter.

Happy New Year,
Cheers!

Before you pass the buck and make me chase down tech support to disable security that protects the server, I want to point out that I never used to have this problem and this error only occurs if I upgrage cornerstone to the latest version. It works fine if cornerstone is rolled back to 3.2.5. This tells me there is something else going on.

Hi There,

Please follow up the steps below:

  1. If you’re using a CDN(ex: CloudFlare), please clear the CDN’s cache and disable optimization services. For the CloudFlare you also need to follow the steps below besides the developer mode: https://xthemetips.com/using-cloudflare-rocket-loader-with-x-pro-and-x5/928/1
  2. Remove custom CSS and Javascript from the options or Child Theme and test the case.
  3. Switch to the parent theme to check if the issue persists.
  4. Reset your htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.
  5. Make sure that you’re running at least PHP v5.6.x or later to avoid any WordPress related incompatibility issues. If you’re not sure what your server configurations and settings are, install a plugin like WP-Serverinfo (https://wordpress.org/plugins/wp-serverinfo/) and check your server info by head over to Dashboard -> WP Serverinfo area.
  6. Check your PHP Max Execution Time and set it for 120 for optimal usage (https://thimpress.com/knowledge-base/how-to-increase-maximum-execution-time-for-wordpress-site/).
  7. Increase the PHP Memory Limit of your server. Click here for more detailed information and how to increase the PHP memory limit.

If you still have problems kindly get back to us with the result of the steps above and your FTP account using the Secure Note functionality of the post to follow up the case.

Thank you.

I have tried everything suggested with no change. I also tried more troubleshooting and found that this error occurs regardless of what page I assign as the home page in settings. For example where the page titled home would give the preview could not load error as well the same error in theme options, when I assigned a different page that would show a preview in cornerstone, such as the page titled about coaldale, when I assigned that page as the home page in settings it would no longer show a preview and instead gave the could not load error along with the same error in theme options.
I will provide you with the ftp access securely.

As an additional note I just did updates to my main site pagewebdesigns.com checking for this same error after each change and the results were as follows: updating wordpress - ok, updating xtheme - ok, updating all plugins except cornerstone - ok, updating cornerstone - I now get the error when going into theme options -
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.
Origin URL: https://www.pagewebdesigns.com
Preview URL: https://www.pagewebdesigns.com

This is a live site that I have had for years with no issues until now when I updated cornerstone to the latest version. Now I have 2 sites with the same problem after the cornerstone update.

Hi,

The ftp login provided doesn’t seem to have the correct access.
I can’t see any files, just a blank directory

Can you try turning setting WP_DEBUG to true in your wp-config.php file.

define( 'WP_DEBUG', true);

Then add this code as well…

define( 'WP_DEBUG_DISPLAY', true );
define( 'SCRIPT_DEBUG', true );

https://codex.wordpress.org/Debugging_in_WordPress

That will allow wordpress to display error message and help us find out what is causing the issue.

Thanks

I fixed the ftp access login for you so you can use the previous ftp information I provided. I also made the debug changes above as requested.

Thanks for fixing the FTP access. I’ve logged in both in your WordPress Admin and FTP but I could not see anything that could point to the cause of the issue. I installed a server info plugin in your site and the setup looks good.

You’re using PHP 7.2 and MySQL 5.7 though and though Cornerstone is compatible with both versions (based on my personal test), there could be a feature of the latest PHP and MySQL that is not compatible with the latest version of Cornerstone.

Our products are tested in different environments before release but it’s not feasible to try all the different server setups. With that said, please try testing downgrading PHP to 7.1 and MySQL to 5.6. This is just to test what I suspect is the cause of the issue.

Thanks.

According to my server administrator support team I only have access to either PHP 7.2 or PHP 5.6 and cannot roll back MySQL. I downgraded PHP to 5.6 and seem to be having the same issues. I have left the PHP on 5.6 if you want to check it out yourself. As it stands I still have no solution to this new problem from the cornerstone upgrade.

Hi There,

Sorry if I sound passing this to your hosting support, Its just I saw this 500 error couple times, same symptoms Header Response Connection is closing on (whichever page is set as) homepage only. And the common culprit is the ModSecurity.

Cornerstone Caching and Plugin Conflict
Getting an error with my template
The preview could not load - only on HOME PAGE

And I wanted to add as well that servers should whatever caused a 500 error, We don’t have access to that log, so it’s likely that the server configuration is storing it somewhere unusual. Your host should be able to find it. If it doesn’t exist it means that they have logging disabled and they should be able to turn it on.

The fact that the Cornerstone works on other pages, it means there is no problem with Cornerstone, else all your pages should not be open on Cornerstone.

Thank you for understanding,

I had mod security disabled and this did solve the issue. However I was told not to keep it disabled. Is this something that will possibly be resolved in future updates so that I can keep mod security enabled?

Hi There,

Thank you for the confirmation, may we know what is your hosting provider? Would you mind asking them what exactly is being block, and why it is block? Maybe they can unblock just that and enable the ModSecurity back.

Maybe our Dev Team can do something about it if we know exactly what is being block and why.

Cheers!

Canspace reseller hosting canspace.ca

Hi,

You don’t need to disable it completely.
Please contact your host and request to add a rule or whitelist a URL.

eg. For example yourdomain.com/x/ and /cornerstone-endpoint

Thanks

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