How to Fix Gutenberg Error: Cannot read property ‘show_ui’

I have installed the last version of WordPress and this one is coming with a new fancy editor called Gutenberg that is completely changed. After starting using it I have seen that when I was trying to change the category and open the tab the interface crashes. The error was as in the below screanshot:

As you can see not a lot off informations so I have hit error and I have seen that the actual error was:

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

First I have tried disable all the plugins, this didn’t do the trick and the error was still present.

I have my own VPS and I thought to try update PHP maybe it could help, I have gone from PHP 7.1 to PHP 7.3 but still same issue.

After I have started searching online to see what I can find and there were a couple of topics like issue 10162 where I have seen that the issue may come from an NGINX config. I did the change restated NGINX service and error dissapeared.

Do you need help with your projects?

If you need help with your projects, don’t wait any longer. Get in touch with us today and we’ll be happy to help you out.

How to Fix Gutenberg Error: Cannot read property ‘show_ui’ in NGINX

In my configuration I was having the below which caused the issue:

try_files $uri $uri/ /index.php?q=$request_uri;

You can also have:

try_files  $uri $uri/ /index.php?q=$uri$args;

To fix the error you just need to replace the above with below and restart nginx service:

try_files  $uri $uri/ /index.php?$args;

That’s all, after doing this the error was gone and I can write posts.

You encounter the error? If so what you did to fix it?

Similar Posts