This Is Somewhat Embarrassing, Isn’t It?

Title Variable

It was not only embarrassing; it was puzzling.

I was contacted by a client whose site was returning the dreaded WordPress “this is somewhat embarrassing, isn’t it?” 404 not found error message whenever he tried to access some of his pages. The affected pages all included custom variables in the URL following pretty permalinks based on the post name.

The site had functioned flawlessly when we tested it, but that was back before WordPress 4.3 was released, and the site had since been updated to 4.4. We couldn’t think of anything else that had changed.

It took a bit of testing, but I eventually figured out what was causing the 404’s. It turned out WordPress 4.4 didn’t like the variable “title” that I was using in the URL. If I changed the “title” variable to something else, the pages worked just fine.

You can test it yourself by adding a variable named “title” to the end of your own site’s URL:

The URL above returns a 404 error when I test it. To fix it, just change the “title” variable to something else, like “thetitle,” for instance:

On a real WordPress 4.4 site, that URL will work, pulling up the appropriate page and ignoring the extraneous variable.

Of course, you’ll need to change your code to accommodate the new name of your variable, but it will get your pages working again without those nasty 404 errors.

WordPress, like most programming languages, has “reserved” terms that aren’t allowed to be used as $_GET or $_POST variables because they may conflict with core functionality.  “Title” is pretty obvious, and it’s not surprising that it’s on the list of reserved terms. The interesting thing is that I got away with using “title” for a while before it tripped me up.