Fixing missing categories and tags in WordPress’ block editor

For several months now, I’ve noticed that the Categories and Tags widgets were missing in my WordPress’s post block editor. It was sort of fine because I could work around it by assigning categories and tags through the Quick Edit functionality from the post list, but it was an annoyance.

I had done the usual debugging steps of disabling plugins, changing to the default theme, even reinstalling the core WordPress code, but nothing changed. I had tried searching online for phrases like “wordpress categories and tags missing” but didn’t come up with anything.

Today, I found two clues that led me to investigate this further. First, when I popped open Chrome’s developer tools, I noticed that the AJAX requests were firing nonstop. I was originally wanting to check whether there were errors in any of the requests, but the requests were all returning JSON responses, so there wasn’t any error in the processing aspect.

Second, I installed the Health Check & Troubleshooting plugin. When I ran it, it showed:

The REST API did not behave correctly

The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

The REST API did not process the context query parameter correctly.

I happened to come across this blog post which suggested adding the following piece of configuration to the nginx configuration.

location ~ ^/wp-json/ {
    rewrite ^/wp-json/(.*?)$ /?rest_route=/$1 last;
}

Lo and behold, it solved the problem! I haven’t dug into the details as to what exactly is going on. I’m just posting this in case other people come across this issue since it was not straight forward to find the resolution to this problem.

Overriding Routing for VPNs on macOS

I have a Virtual Private Network (VPN) setup so that I can connect to my home network and use things such as my Synology file server when I’m not at home. This works most of the time when the IP address network of the local (e.g., Wi-Fi hotspot, etc.) doesn’t conflict with my home’s IP address network (10.x.y.0/24). However, I have come across some Wi-Fi hotspots which use a subnet of 10.0.0.0/8. The default route through the hotspot network is then used when I try to access my home resources, instead of going through the VPN.

Continue Reading

When frames are too many

I was digging around my backups and came across this mockup of a site my friend and I worked on ten years ago, but never published.  This was when Microsoft FrontPage was still around, frames were OK, and <blink>, <marquee> and animated GIFs were the rage, and when the whole world used Internet Explorer.

I guess it didn’t occur to us back then that nine frames were eight frames too many.  Oh, have times changed 🙂

Today, HTML framesets are rarely used.  Server-side scripting such as PHP is used to replicate common code across multiple pages.  Client-side alternatives such as CSS positioning and overflow allow elements on the page to be statically attached to the window, or to have internal contents overflow with scrollbars automatically.  Browsers such as Firefox and Chrome have dominated the browser market share.

Old blog posts from WordPress 2.6 found and imported

I spent this afternoon digging around my backups, and I was lucky to find my site backup from the end of 2008. I had to find a way to import the posts from WordPress 2.6 into WordPress 3.5.1. Since I had a full site backup, I was able to load the WordPress files and database backup onto my Mac’s local MAMP web development environment (Windows users might use WAMP).

From there, I followed the WordPress upgrade procedure. I upgraded directly from WordPress 2.6 to 3.5.1 directly without a hitch, although it recommended to go version by version. Then with a click of a button, my posts were exported into an XML file. And two clicks later, my posts were imported into my new site. It’s awesome that WordPress has a very easy upgrade and import/export functionality.

I spent a couple hours combing through the blog posts (good memories of high school and university!) making some edits, and fixing links and images.

The only thing now is to find my WordPress backups from 2009-2011. Needless to say:

Update: After a couple hours of digging, I’ve found the backup and have loaded the posts here. The archives here are pretty much complete!

Chrome

 

A screenshot of Google Chrome

I have been using Google Chrome for six months and so far it has been an awesome.  It beats any other browser I have run on my laptop in terms of speed.  Opening a tab on Chrome takes less than a second whereas on IE sometimes it hangs up to 15 seconds before a new tab is usable.  Pages load many times faster.  The memory footprint is much nicer than FireFox.

Chrome gives me a lot more viewing space.  No toolbars for stuff I don’t need.  A status bar only appears in the corner when information is presented.  No title bar is shown; just the tab bar which has the title of the page anyway.

The single address bar makes combines searching the web, entering an address, and recalling bookmarks all in one.  Also the start page with a “most visited” listing which resembles the Opera speed dial updates by itself depending on the sites you visit most often.

The only minor issue that I have encountered with Chrome is that some sites are still not rendered correctly (possibly not a Chrome problem, but a HTML, CSS, or JavaScript problem).  Another issue is that since browser updates are installed automatically sometimes a “bad apple” release is pushed out without me knowing.  This happened late last year when a release of Chrome crashed every time I tried to open a drop down menu.

So yes overall Chrome has been and will be my browser of choice for normal web-surfing.  Speed is the main selling point for me, and so far Chrome trumps all the other browsers in that category.