Solved: TypeError: Cannot read property ‘show_ui’ of undefined

Yesterday, I tried upgrading WordPress to the latest version. After upgrading, I noticed that I can no longer add new posts in my blog using the new editor, Gutenburg. I was getting this error instead:

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 (

After a bit of Googling, I found discussions online discussing the problem. If you are using nginx and php-fpm to serve your blog, here’s a quick way to fix it!

WARNING: This works for typical configurations only.

Log in to your server and go to /etc/nginx/sites-enabled. Do a directory listing (ls) and look for the file that manages your blog. For mine, it looked like this.

root@core-web:/etc/nginx/sites-enabled# ls

Now, edit the appropriate file using your text editor of choice. Find the line that says:

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

And replace it with:

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

Note the difference between the two lines. Make sure $is_args is added after the ? and before $args.

Now, it’s time to restart nginx. If you’re using Ubuntu, you can do /etc/init.d/nginx restart OR service nginx restart. Do note to add sudo if you’re not logged in as root.

Leave a Reply

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