Search This Blog

Thursday, April 4, 2019

WordPress new post editor has encountered an unexpected error

I tried:

  • Disabled all plugins (included SEO) and browser addons.
  • Attempt recovery doesn't work. Error code.
  • Switch to other themes.

Error Code:

TypeError: Cannot read property 'show_ui' of undefined
    at https://www.milliondollarserver.com/wp-includes/js/dist/editor.min.js?ver=9.0.11:55:241342
    at i (https://www.milliondollarserver.com/wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.11:6:91)
    at An.filter (https://www.milliondollarserver.com/wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.11:99:338)
    at https://www.milliondollarserver.com/wp-includes/js/dist/editor.min.js?ver=9.0.11:55:241307
    at ph (https://www.milliondollarserver.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:97:88)
    at eg (https://www.milliondollarserver.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:125:307)
    at fg (https://www.milliondollarserver.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:126:168)
    at wc (https://www.milliondollarserver.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:138:237)
    at fa (https://www.milliondollarserver.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:137:115)
    at ng (https://www.milliondollarserver.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:149:69)

Environment
  • WordPress 5.1.1
  • Nginx 1.15
  • PHP-FPM 7.2
  • wp-supercache
Here is how I fix it:
#vi /etc/nginx/wp-supercache
Original:

location / {
    try_files $cachefile $uri $uri/ /index.php;
}
Changed to:
location / {
	try_files $cachefile $uri $uri/ /index.php$is_args$args;
}
Restart Nginx to apply the changes:
# sudo systemctl restart nginx
Related Bug: https://github.com/WordPress/gutenberg/issues/9912

No comments:

Post a Comment