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

Table Of Contents

Share Article

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 i (
at An.filter (
at ph (
at eg (
at fg (
at wc (
at fa (
at ng (

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.

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?

Become a CloudPanel Expert

This course will teach you everything you need to know about web server management, from installation to backup and security.
Leave a Reply

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

  1. Thanx for solution!

      • My Current Scenario are,
        permalink is set to
        and config is

        location /wordpress {
        alias /var/www/html/wordpress;
        try_files $uri $uri/ /wordpress/index.php?$args;
        and i am getting these errors when try to add new post.

        “Update failed” in add post page

        and console errors :-

        api-fetch.min.js?ver=2.2.7:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
        at b (api-fetch.min.js?ver=2.2.7:1)

        editor.min.js?ver=9.0.7:12 Uncaught (in promise) {code: "invalid_json", message: "The response is not a valid JSON response."}

        • Hello,

          For subfolders you need something else .

          In your case you can try with:

          location /wordpress {
          root /var/www/html/wordpress;
          index index.php index.html index.htm;
          try_files $uri $uri/ /wordpress/index.php?$args;

          If not working then also you can try:

          – don’t use /wordpress only use:
          location / {
          try_files $uri $uri/ /wordpress/index.php?$args ;

          – if above doesn’t work maybe below:

          location / {
          try_files $uri /wordpress/index.php?q=$uri&$args;

          location /wordpress {
          index index.php index.html index.htm;
          try_files $uri $uri/ /index.php?q=$uri&$args;


      • Thank you so much for reply. Yes, i am using NGINX, I have followed this tutorial for installing wordpress

        and i have tried this
        try_files $uri $uri/ /index.php?$args; and also multiple combinations but no one worked for me 🙁
        i want to run my blog in subfolder.
        i have written these lines in config files
        location /wordpress {
        alias /var/www/html/wordpress;
        #try_files $uri $uri/ /wordpress/index.php?q=$request_uri; (not working)
        try_files $uri $uri/ /index.php?$args; (not working)
        These are working fine if permalink set to
        but not working
        that i already mentioned in my first comment.