WordPress

WordPress 5.6.1 Update Introduces Bug in Post and Page Windows

WordPress 5.6.1, recently auto-updated on many sites, has introduced a bug making it challenging to save a post. A temporary patch has been developed to address the issue, but it’s not an official update.

Changes You Made May Not Be Saved

The latest version of WordPress, 5.6.1, includes a bug causing an alert to appear when attempting to navigate away, regardless of whether the post has been saved.

The bug has been reported on a WordPress support page:

“I am getting the pop up “Leave Site? Changes you made may not be saved. All the time, whether I change a page or not, and whether I save (publish or update) the page or not.

This began after the 5.6.1 upgrade this morning. I have 2 sites, with 2 different themes, both using the classic editor 1.6, and it behaves the same on both.

It occurs in Chrome but not in Firefox.”

It’s interesting that the issue doesn’t occur in Firefox, possibly due to how Firefox handles certain aspects of the unload event differently than Chrome.

Unload Events Bug in WordPress Editing Window?

The warning is part of an “unload event,” which triggers a notice when a publisher tries to leave a window, typically when something is left undone.

The exact warning message triggered is:

“Leave Site? Changes you made may not be saved.”

The bug affects both posts and pages. Some publishers have reported that it only occurs when editing page content but works fine when editing post content.

Reports suggest that plugins like Tiny MCE and Advanced Custom Fields may trigger the bug. Disabling these plugins stops the unload message from appearing. In a private Advanced WordPress Facebook group, a user reported that disabling the Advanced Custom Fields plugin stopped the warning from appearing. However, the issue seems to be within the WordPress core itself, causing the problem to manifest in different editing windows.

One publisher found relief by enabling the Gutenberg editor:

“The ‘Do You Want to Leave This Site? Changes you made may not be saved’ alert notice appears on leaving updated pages (but not posts) after the 5.6.1 update when using the classic editor. The message goes away when Gutenberg is enabled.”

Another publisher noted that WordPress editing plugins seemed to trigger the bug:

“Update: Users must wait for TinyMCE to completely load before making changes; otherwise, the script doesn’t register the change.

A good visual cue is the toolbar’s dropshadow, which disappears once the editor is properly initialized.”

One user uploaded a walkthrough video demonstrating how the bug occurs. In the video, the publisher edits a document and presses the update button to save the page. When they click a link to navigate away from the editing window, the unload warning message appears.

Below is a screenshot animation showing a walkthrough of the bug:

GIF Animation of WordPress 5.6.1 editing window bug

Temporary Solution Posted

A temporary patch has been posted to WordPress, but it is not an official fix. This patch requires inserting code into the functions.php file. Another patch addressing an additional issue has been shared but remains untested.

WordPress 5.6.1 "Changes Not Saved" Bug

If the issue is impacting your workflow, several steps can be taken. One recommendation is ensuring that all editing-related plugins are fully loaded before use. Other steps include disabling these plugins or enabling Gutenberg. You can also apply a patch to functions.php or wait for an official patch.

Movie Showing How WordPress 5.6.1 Bug is Triggered

Citations

WordPress Support Page Discussion
Changes You Made May Not Be Saved

Official WordPress Bug Report Page
“Leave site? Changes you made may not be saved” on custom taxonomy pages after WP 5.6.1 update

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button