Support » Plugin: Classic Editor » Changes you made may not be saved.

  • I am getting the pop up “Leave Site? Changes you made may not be saved. All the time, if I change a page or not, and if 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 with the classic editor 1.6 and it behaves the same on both. It does this in Chrome, it does not do it in Firefox.

    Chrome also recently updated Version 88.0.4324.146
    Nothing in the browser console log

Viewing 15 replies - 1 through 15 (of 20 total)
  • I second this.. However it also does it to me in Firefox.
    (this page is asking you to confirm that you want to leave – data you have entered may not be saved. )

    I downgraded from 5.5.3 and that worked for me.

    Still in the block editor and getting 403 ajax/json errors over and over again.

    WordPress core is buggy it seems

    Thread Starter HarryAlexander

    (@harryalexander)

    Rolled back to 5.5.3, working now, both sites 🙂

    I’m also getting this on every editor page (with TinyMCE on it) in 5.6.1. Started happening only after the update to 5.6.1. If I enter any page with TinyMCE on it, it prompts me if I want to leave when I click into something else, regardless if I edited anything anywhere or not.

    Same here with 5.6.1. update

    Same here (5.6.1).

    Ugh this is really annoying, hopefully there will be some kind of fix soon, as it makes editing pages and posts a headache. Or some easy fix to keep on working as usual until any update will be released.

    • This reply was modified 2 months, 2 weeks ago by oliwa.

    Since it was not there in WP 5.6 and is there in 5.6.1, my guess it that it has something to do with a change there or in that other editor. Quick fix would be to go back to 5.6.

    I’m getting the same issue but only on pages. Everything else including posts works fine.

    Yep, I can confirm, only on pages, posts and CPTs work fine.

    me it’s the same bug very annoying

    same for me.

    and for info all the gutenberg deactivator has the same problem

    It may help some of the people leaving recent “me too” comments to have a look at ticket 52440. This looks like it may fix some (if not all) of your woes.
    Spike

    • This reply was modified 2 months, 2 weeks ago by spikeuk1.

    Thank you for the link @spikeuk1 now I can watch that too.

    Hello,

    Just a heads up everyone, this bug was introduced since the last WordPress 5.6.1 update, when using Classic Editor, for all Post Types which don’t have Title + Editor + Excerpt fields supports. Basically all post types at the exception of “WP Post” and “Woocommerce Product”.

    Here is the related WordPress trac ticket: https://core.trac.wordpress.org/ticket/52440

    For anyone wondering, here is a fix you can add in your theme’s functions.php file, while waiting for the official patch:

    /*
     * WordPress 5.6.1: Window Unload Error Final Fix
     */
    add_action('admin_print_footer_scripts', 'wp_561_window_unload_error_final_fix');
    function wp_561_window_unload_error_final_fix(){
        ?>
        <script>
            jQuery(document).ready(function($){
    
                // Check screen
                if(typeof window.wp.autosave === 'undefined')
                    return;
    
                // Data Hack
                var initialCompareData = {
                    post_title: $( '#title' ).val() || '',
                    content: $( '#content' ).val() || '',
                    excerpt: $( '#excerpt' ).val() || ''
                };
    
                var initialCompareString = window.wp.autosave.getCompareString(initialCompareData);
    
                // Fixed postChanged()
                window.wp.autosave.server.postChanged = function(){
    
                    var changed = false;
    
                    // If there are TinyMCE instances, loop through them.
                    if ( window.tinymce ) {
                        window.tinymce.each( [ 'content', 'excerpt' ], function( field ) {
                            var editor = window.tinymce.get( field );
    
                            if ( ( editor && editor.isDirty() ) || ( $( '#' + field ).val() || '' ) !== initialCompareData[ field ] ) {
                                changed = true;
                                return false;
                            }
    
                        } );
    
                        if ( ( $( '#title' ).val() || '' ) !== initialCompareData.post_title ) {
                            changed = true;
                        }
    
                        return changed;
                    }
    
                    return window.wp.autosave.getCompareString() !== initialCompareString;
    
                }
            });
        </script>
        <?php
    }
    

    Hope it helps!

    Regards.

Viewing 15 replies - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.