Support » Fixing WordPress » Blank page on Editor after 5.0 update on Editor/Author users

  • We get Blank page on (add new post) Editor after 5.0 update on Editor/Author users.
    How to use classic editor?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello 👋🏼

    You can find the Classic Editor here and install it as you would any other plugin.

    However, it would be worth spending a few minutes trying to resolve this – if only because the solution to your problem may help many others!

    First of all, can you try clearing the cache from your browser (ideally use a different browser than you usually do)? If that doesn’t work, do you know how to display JavaScript errors? If you’re using Chrome, it will be View -> Developer -> JavaScript Console. If you start that and then go into the editor, it should (hopefully) display some errors. Cut and paste them here and it will give us a clue as to what may be going wrong.

    5.0 *will* work fine, but the chances are that you simply have a conflict somewhere that’s causing it to stop (for example, an older version of Jetpack is known to cause this).

    Hi, on one of my sites I have the same issue like @vipini: blank page after clicking “add new post” or “add new page”.

    I tried to deactive all plugins, clear cache. It didn’t help.

    I have 3 errors in console:

    1) first appeared after logging-in:
    Uncaught SyntaxError: missing ) after argument list (post-new.php:2039)

    2) second and third errors appear after clicking “add new post”:
    Uncaught SyntaxError: Unexpected identifier (post-new.php:2107)
    Uncaught SyntaxError: Unexpected identifier (post-new.php:2203)

    I suspect this is going to be either 1 of 2 issues – an bad installation or an issue caused by another plugin.

    I’d therefore suggest deactivating all plugins. Does it work then? If it does, re-activate one at a time to identify the cause.

    Also try switching to a different theme temporarily – Twenty Nineteen, for instance.

    If neither of those resolve the issue, it would be worth re-installing WordPress again. If you need help with this process, let me know and I’ll provide some further detail.

    Tested reinstalling wordpress and deactivated plugins but still having a blank page on page edits.

    Having these errors on wordpress admin dashboard as well, might be related:

    Uncaught SyntaxError: missing ) after argument list
    19:19:51.725 backbone.min.js:1 Uncaught TypeError: Cannot read property 'extend' of undefined
        at backbone.min.js:1
        at backbone.min.js:1
        at backbone.min.js:1
    19:19:51.725 wp-backbone.min.js:1 Uncaught ReferenceError: Backbone is not defined
        at wp-backbone.min.js:1
        at wp-backbone.min.js:1
    19:19:51.726 media-models.min.js:1 Uncaught TypeError: Cannot read property 'extend' of undefined
        at Object.20 (media-models.min.js:1)
        at b (media-models.min.js:1)
        at media-models.min.js:1
        at media-models.min.js:1
    19:19:51.726 wp-plupload.min.js:1 Uncaught TypeError: Cannot read property 'Attachments' of undefined
        at wp-plupload.min.js:1
        at wp-plupload.min.js:1
    19:19:51.736 media-views.min.js:1 Uncaught TypeError: Cannot set property 'l10n' of undefined
        at Object.<anonymous> (media-views.min.js:1)
        at b (media-views.min.js:1)
        at media-views.min.js:1
        at media-views.min.js:1
    19:19:51.736 media-editor.min.js:1 Uncaught TypeError: Cannot read property 'settings' of undefined
        at media-editor.min.js:1
        at media-editor.min.js:1
    19:19:51.737 media-audiovideo.min.js:1 Uncaught TypeError: Cannot read property 'settings' of undefined
        at Object.<anonymous> (media-audiovideo.min.js:1)
        at b (media-audiovideo.min.js:1)
        at media-audiovideo.min.js:1
        at media-audiovideo.min.js:1
    19:19:51.737 mce-view.min.js:1 Uncaught ReferenceError: Backbone is not defined
        at mce-view.min.js:1
        at mce-view.min.js:1
    19:19:51.742 wp-api.min.js:1 Uncaught TypeError: Cannot read property 'isFunction' of undefined
        at wp-api.min.js:1
        at wp-api.min.js:1
    19:19:52.606 jquery.flot.resize.min.js:1 Uncaught TypeError: Cannot set property 'w' of undefined
        at n (jquery.flot.resize.min.js:1)
        at dispatch (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,wp-a11y,updates,jquery-ui-core,jquery-ui-widget,moxiejs,plupload&ver=5.0.1:3)
        at r.handle (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,wp-a11y,updates,jquery-ui-core,jquery-ui-widget,moxiejs,plupload&ver=5.0.1:3)

    @midnitedev do you have any custom code added in functions.php? For me this code caused error.

    Yes, I do, lots of it actually. I’ll try minimizing it to see if that’s the cause of the issues.

    For me that snippet caused error:

    // Remove type attribute from script and style tags added by WordPress
    add_filter('script_loader_tag', 'clean_script_tag');
      function clean_script_tag($input) {
      $input = str_replace("type='text/javascript' ", '', $input);
      return str_replace("'", '"', $input);
    }

    I followed @pzxyz‘s suggestion on testing the custom code for functions.php. Turns out, it was these 2 code snippets that were meant to optimize my results on web tools that were the culprit:

    /***** Start: Defer parsing of javascript *****/
    function defer_parsing_of_js ( $url ) {
      if ( FALSE === strpos( $url, '.js' ) ) return $url;
      if ( strpos( $url, 'jquery.js' ) ) return $url;
      return "$url' defer='defer";
    }
    add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
    /***** End: Defer parsing of javascript *****/
    
    /***** Start: Remove query string from static resources *****/
    function _remove_script_version( $src ){
      $parts = explode( '?', $src );
      return $parts[0];
    }
    add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
    add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
    /***** End: Remove query string from static resources *****/

    I commented them out and got no errors anymore. Even got the blank page on editor issue resolved as well.

    *Additional note: I was using the autoptimizer plugin and I had to disable minification on javascript and css files. This solved issues on console errors on post pages.

    • This reply was modified 4 days, 1 hour ago by  midnitedev.
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.