Error "The preview was unresponsive after loading

Hey There,

By default, WordPress will attempt to increase memory allocated to PHP to 40MB (code is at the beginning of /wp-includes/default-constants.php) for single site and 64MB for multisite, so the setting in wp-config.php should reflect something higher than 40MB or 64MB depending on your setup. So even if you PHP memory in the server is 1GB, WordPress will only set to 40MB. ​We recommend that you increase your WordPress memory allocated to PHP. To increase it, please edit your wp-config.php file and insert these lines:

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

You can add it before the line
/*That's all, stop editing! Happy Blogging. */

And also make sure that you are using the correct PHP version. WordPress 4.7 requires at least 7.0 (https://wordpress.org/about/requirements/). This could possibly be the cause of the issue. In most cases you cannot update your PHP version yourself and need to contact your host about this. The upgrade process is an easy process and should be something your host can do for you without affecting your website or charging you for it. Here’s a letter you can send to your hosting company:

Dear host,

I'm interested in running the open-source WordPress <https://wordpress.org/> web software and 
I was wondering if my account supported the following:

- PHP 7 or greater
- MySQL 5.6 or greater
- The mod_rewrite Apache module
- HTTPS support

Looking forward to your reply.

Hope this helps. Kindly let us know.

Hi
It took one attempt (had to refresh) but it loaded! Thank you very much

Oh no! i think I claimed victory too soon;

I am getting a can’t save message; so not really able to edit; https://www.screencast.com/t/q5fnlENW

Also, I lost all I had added via cornerstone to products on a woocommerce store. I suspect this is from updating the php version?

Below summary of what was done on the server;

  • installed a PHP switcher onto server; set to PHP 7,
  • PHP memory limit upgraded from 512M to 2048M
  • Extended max execution time to 240

Hi there,

It’s an internal server error, unfortunately, there are no details about it. Would you mind providing your FTP login credentials as well? You only provided your admin login credentials.

Thanks!

Hi I posted them to this discussion. thanks

Hi There,

On which browser that you’re testing usually? I have created a test page using Chrome browser and it seems to be working fine now (see secure note).

Is it possible to create a staging environment by cloning your live site, update X & Cornerstone to the latest versions and test your issues again.

You can refer to our migration guide here (https://theme.co/apex/forum/t/cornerstone-content-builder-migration/126/1).

Thanks!

Hi
New Page creation works. Here is what is not working;

  • When I open pages that I had been working on, changes won’t save
    (I will include links to those on a secure note). I am getting a can’t save message; video here https://www.screencast.com/t/q5fnlENW2
  • Woocommerce products lost all content added via cornerstone. I suspect this is from updating the php version?

THANKS

Hi There,

Thanks for writing in!
I am getting this error when trying to edit the page.

Fatal error: Out of memory (allocated 874512384) (tried to allocate 733184 bytes) in /home/smasha5/public_html/testwordpress/wp-includes/wp-db.php on line 1889

Please confirm if you have increased your PHP memory in the config.php file. If not please do it adding following line to your config file.

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

Also please update your theme to latest version, it may fix your issue.

Thanks

Hello
I checked with my hosting;

He took a look at;
_home/smasha5/public_html/testwordpress/wp-config.php

and saw that our current settings are:
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
define( ‘WP_MAX_MEMORY_LIMIT’, ‘512M’ );

So I don’t think this is the cause.

I updated the theme and cleared browser cache, also no fix.

I disabled all plugins except CS and still won’t work.

ALSO
When I try to edit the page from the view mode I get an error; [see video here]

Note i have no cache plugins in use right now.

HELP!

Hello There,

Could you please provide which page you have edited and encountered the error? I visited some of your pages, click the “Edit Page” and I could not replicate the issue. I also edited the page in Cornerstone and I was able also.

By the way, please be advised that we have released X 6.0.4 and Cornerstone 3.0.4. It is now available in automatic updates. You can now update to this latest version. This latest release contains fixes for several issues so be sure to check out the changelog (http://theme.co/changelog/).

Tip: After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

Please let us know how it goes.

HI
I want to make sure we are on the same page as to what the problems are. Lets enumerate them and refer to each problem by number; that way we are not prone to confusion.

Problem #1)
When i hit the edit button ( this button: ) for a page, such as this one, i get this message.

Fatal error: Out of memory (allocated 876609536) (tried to allocate 839680 bytes) in /home/smasha5/public_html/testwordpress/wp-includes/wp-db.php on line 1889

I was adviced to fix problem # 1 like this:

Please confirm if you have increased your PHP memory in the config.php file. If not please do it adding following line to your config file.

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
define( ‘WP_MAX_MEMORY_LIMIT’, ‘512M’ );

It turned out that this was already correctly set. In the conversation that ensued (above) you can see all kinds of details on our server specs, etc.

Problem #2) -Most serious!-
Since I can no longer edit the way described in Problem #1, I must go through the Pages tab on the WP dashboard, then hit “edit with Cornerstone” option for that page and load the CS editor (it may take up to 8 attempts).

Once I reopen a page that I had been working on, for example this one, I can see the content on the editor perfectly, just as you have shown me you too can do . However it is the changes that won’t save. Here is a little video that shows what i see.

Can you please see if you can replicate problem #2

One way to confirm that you can indeed save changes, is, for example, by adding a new section at the top, with just a black background and a gap element (say 300 px?). Please let me know how that went.

Problem #3)
Woocommerce products lost extensive custom content added via cornerstone. I suspect this is from updating the php version?

I post all 3 problems in one thread because I believe they are related, because they all started at exactly the same time. This happened when trying to fix the “The preview was unresponsive after loading” problem, as reported on the very first message of this thread.

Note i have no cache plugins in use right now. I confirm I am on Version 3.0.4 of Cornerstone.

I really need to get back to being able work, and really appreciate the help.

THANK YOU

Hello There,

Thank you for the very detailed information. I went ahead and updated X to the latest version which is 6.0.4. I can confirm that the issue is still present after the update. I would love to get this resolved. Regretfully the given ftp details is no longer working. Could you please give us the updated ftp details so that we can investigate the theme files and hopefully get this resolved once and for all.

Thank you in advance once again.

Hi thanks so much for zeroing in on my issue! I updated the secure note regarding ftp

Were you able to login with the updated ftp info? also, just curious… how does ftp login help with the diagnosis? Thanks!

Hey @flashfog,

Thanks for updating. I was able to login to your FTP. There are several factors that could cause issues in your site not only to Cornerstone. But, I’ll point out first the most probable cause. cornerstone-endpoint directory is being blocked. Please contact your host to whitelist it from Mod Security or other security systems they are using. See the Secure Note how I saw that error. Maybe you can show that to your web host so they have an idea.

I also see that you’ve increase memory but it is not taking effect. You will need to contact your web host regarding this.

I would recommend though that you move your site to a managed WordPress host to avoid most server setup issues. Here’s a guide in choosing a web host.

Thanks.

Hi
I think you really got the hosting provider people scratching their heads! right now I am waiting to hear back from them.

Also… thank you for showing these other issues that even if not related, are important and would have gone under the radar. Do you guys have a guide of best practices of everything that needs to be looked at before a page goes fully live? I bet you most people never look at this. THANKS

Curious, when you say

I also see that you’ve increase memory but it is not taking effect.

How did you determine this?

These guys are supposed to be very strong in WP hosting. I even run my own virtual private server. Let’s see how well they respond to this complicated case…

THANKS i will let you know what they say

Regretfully, we don’t have a checklist but the general best practice is, you should develop in staging first then recreate or copy it to your live site. The technical aspect of that varies though. Cornerstone could operate in a 256MB of memory and it works out of the box in most web hosts. But if you have a lot of operations in your site from other plugins and/or systems that might not be enough so your overall requirements depends on the actual usage of your system including the theme and plugins.

I saw you have added this code in your wp-config.php

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

And, I also saw you increased the memory limit in php.ini.

Ok I see how you determined that we tried to up the limit. How did you determine that it is not taking effect?

Thanks for the advice re: staging.

Hi there,

By checking the error, try editing the page /security_smoke_installation/ and it will still display the same error, Fatal error: Out of memory (allocated 876609536) (tried to allocate 839680 bytes) and I think I know why,

You only increased it up to 256MB, but the error is trying to allocate 876609536 bytes which is equivalent to 876MB and that error is pointing to testwordpress/wp-includes/wp-db.php, perhaps your hosting could provide further information about the error, 800MB allocation is too big and something is trying to use it (especially in database related functions)

Thanks!

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