Skip Navigation

[Resolved] Blocks editor autosave is stuck loading

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 3 voices.

Last updated by Beda 5 years ago.

Assisted by: Christian Cox.

Author
Posts
#1247179
1246809-autosave.png

Trying to edit this Toolset Blocks (Beta) template can get quite confusing because the Gutenberg editor seems to be trying to re-write the html in the Toolset Blocks and has definitely injected <p> tags in other "TB Files and Text" layout blocks.

In these templates, the autosave enters a never-ending loop, so it's difficult to save.

Having said all that, I do think TB has lots of potential and am looking forward to the first stable version.

#1247225

Hi, can you give me a few more details about how you were able to get the autosave feature "stuck"? I've been trying with the block editor but haven't had luck replicating this.

#1248233

I am not sure what causes autosave to get stuck. I think it only happens when editing templates built with Toolset Blocks and Kadence Blocks.

Sometimes I get this message:

“Something went wrong while trying to update the sources cache, with message: "The response is not a valid JSON response.". Please reload the page and try again.”

——

However, I also have this issue on another website which does NOT use any Toolset Plugins.

There are quite a lot of threads about it in support forums. One theory is that it occurs when there is an intermittent connection to the internet.... Or maybe if the computer goes to sleep while the page is open.

On the other site, I have minimised the problem by delaying autosave with this code:

function jp_block_editor_settings( $editor_settings, $post ) {
	$editor_settings['autosaveInterval'] = 2000; //number of second [default value is 10]

	return $editor_settings;
}
#1248559

Okay so it sounds like more of a Gutenberg / WP issue if it's replicable with Toolset deactivated.

#1395311

Gutenberg expects your server and computer online and reachable every single millisecond or it will start to pile up JS errors in the console and fail to autosave.
I have reported that but there is very very little we can do about this, unfortunately, that is how "all om the browser side" applications work.
They constantly communicate to the server, rather than only when you press a button or so like Good old PHP did 🙂

On our end, we do actively provide solutions in our code for when this happens, so at least it fails gracefully and does not produce "visible" errors, also we provide where possible fallback calls in our code, so usually you should be safe (seen from the Toolset Perspective).

I can thou confirm that even core GB will fail un-graceful as soon you have a tiny drop of connection (MySQL, Apache, whatever it may be that is not available for a short period - milliseconds).

This may be what you experience here.