WP Maintenance Nightmare

Discovered this blog was showing:

Briefly unavailable for scheduled maintenance. Check back in a minute.

Any time it upgrades, this gets thrown up during the process. However, it goes away once the process is completed. It showing is not an error so much as a notification and should as it says go away in a minute. The problem is that if the upgrade hangs, it does not go away.

To manually fix it, go to the directory on the server with the files and remove the .maintenance file. (I rename them to .maintenance_YYYYMMDD so as to track how often they happen.)

I noticed that a particular plugin stated it needed an update. Even better, that plugin was set to automatically update, which suggested it was the cause. Kicking off the update hung the site again. Deleting the plugin also failed.

Eventually, I found myself looking at the wp-content/upgrade folder and noticed there was a folder named for the plugin that was the only content of the folder. I renamed that folder to prepend the name with zzz- and tried the upgrade again. The upgrade worked this time.

My guess is something was bad with the contents of the downloaded plugin upgrade temporary folder, but instead of deleting the contents of the folder as the first step the upgrade process, it just used the existing folder and hit the error each time until I removed it. Weird.

If in doubt; then delete

The title is a joke. I hate deleting things. A digital packrat, it takes knowing that deleting something will likely fix an actual problem to delete it. And my delete is to move it out of the way not actually destroy the file.

Anyway, I discovered this blog was hosed. I had noticed Gotcha Jerks Part II was missing from various social media sites. So, I went to post it and found the whole blog hozered. It just displayed a Fatal PHP Error for class.jetpack-tracks.php and so I started to look on the WordPress.Org support page when I decided to move the whole Jetpack plugin directory to jetpack.bad and “see what happens.” Well, that restored the blog. The plugin claimed it needed an upgrade, so I ran that. All is well.

Easier than my initial resignation.

I went to “diff -r jetpack.bad jetpack” to get a comparison of the differences between the bad one and the good one, but the bad no longer exists. Thus the title. I am considering deleting and reinstalling Jetpack to ensure what I have is pristine. I have a nagging feeling that the upgrade moved jetpack.bad to jetpack then updated some files. Delete and rebuild would give me more confidence I purged lingering bad code from the plugin. Additionally, the lingering issue from WordPress and SSL a month ago might be related? In sum, I suspect there are subtle issues lingering and a clean sweep is in order.

WordPress and SSL

For a while my self-hosted WordPress has been a royal pain in the ass. Trying to compose through the WordPress.com interface through Jetpack would show occasional errors that “Saving of draft failed” or an inability to communicate. Sometimes it was usable, sometimes there were so many errors I gave up and used the site. The site admin interface sometimes made me login every hour or every couple minutes.

I reinstalled Jetpack a couple times. I poked around on the WordPress support forums which I apparently could not search.

So I searched via Google and ran across this How to Fix WordPress Keeps Logging Out Problem article. It dawned on me that I had let my hosting provider setup SSL for the site. The WordPress Address and Site Address fields were using http. So I changed them to https. That seems to have solved the login issues.

I am writing this through the WordPress.com interface and got a failure on saving the draft. So there is something else to make it all better.

WP to G+

WordPress Jetpack finally enabled publishing to Google+. So, I guess my blog posts will finally head there.

UPDATE: Google permissions are hard. The first test post showed it was “Shared privately” which by looking closer appeared only to myself. My default permissions for approved applications is “Only Me.” I had to go into Settings > Manage Apps & Activities > edit next WordPress.

WP Annoyance: False Plugin Compatibility

Before upgrading from WordPress 3.6.1 to 3.7, the Updates page said two plugins also in need of updates were both 100% compatible with 3.6.1 and unknown with 3.7. A conservative administrator might wait for WordPress to list 100% compatibility with 3.7 before upgrading to it. I upgraded anyway because really I use both fairly minimally.

After the upgrade I went to upgrade these plugins and both were listed at 100% compatible with 3.7. Seems unlikely both were fixed in under 2 minutes. So, it seems like even though the data was there for 3.7, for some reason it was obfuscated from 3.6.1? Annoying.

Posting To Your WP From Foreign Sites

(This assumes a WordPress.org site not one on Wordress.com hosting.)

Placing your username and password in the database of third party sites is not very good. If the account provided is the WordPress administrator account, then that means credentials for the most important account are potentially exposed. The password is going to be kept in the clear or in a form decryption is easy so it can be used to post to WordPress.

Better instead is to create a limited user with the Author role for this purpose. These accounts are so easy to create that I make one for every site I use to post to this blog. If any of these sites are hacked or the credentials otherwise given to others, then the potential damage is just the posts belonging to that user.

One stumbling block for this is WordPress.org installs want a unique email address for each account. A workaround I use is either generating email accounts via my hosting provider or the +anything for Gmail.

Also, it makes easy identifying the posts which came from the foreign source. My Goodreads posts are an example where that site is setup to post for an account I specially created for that purpose.

Disqus Unsubscribe from Comments

Monday after the Game of Thrones Red Wedding reveal, I read a Rolling Stones piece where the author had no clue the song played was the Rains of Castemere, the title of the episode. So, of course, I had to point out that oversight. (Someone on the Internet was WRONG!)

The commenting system RS used is Disqus, which I am using here, so no problem. Until I get the flood of emails. I had been holding steady at 2.1GB of my 10.1GB at Gmail. All the emails to this thread bumped it up to 2.3GB.

So I went looking for how to stop it. There was no list of posts to which I am subscribed like at WordPress.com. The only relevant place to fix this seemed to be the profile editor and “Email notifications are sent when comments are posted on discussions that matter to you.” That would stop all comment notifications not just the busy one annoying me. I even deleted my comment which did not stop them.

Finally, I sucked it up and went into the help and found the Subscribe/Unsubscribe from Notifications page. It turns out, I had to go to the page and click on the “Subscribe via email” link at the bottom of the comment box. Pretty sure I never would have thought to look there on my own.

Unfriendly Connect For Feedly

So Google announced Reader will shut down. So I migrated to Feedly. It is okay, but I will miss Reader just like I still miss Bloglines. (The current Bloglines is actually NetVibes which I hate.)

A few weeks ago, I noticed one my categories displays in the left menu there are unread posts, but the main window displays there are none. It took a week for me notice on the right side the list of feeds in the list also shows there are unread posts. Two views say there are unread but the one that shows the titles or previews of them says there is nothing. WTF?

Even stranger, the category does not appear in the Organize section, so I cannot just move the RSS feeds to another category.

Apparently Feedly users have complained for 4 years about the category. And even worse, many of the solutions appear only temporary. Whatever they change restores itself later.

Today, I put together another clue. The problem category is called “blogger-following.” Google Reader displays it as “Blogs I’m following”. Blogger actually owns/creates these in Google Reader when I subscribe to them using Friend Connect. This also adds them to the Blogger Reading List on my dashboard. Feedly picks up these subscriptions from Google Reader.

I think making changes to these in Feedly updates Google Reader. However, Blogger will change it back. I tried removing blogger-following from the feeds. However, a logout and login restored those changes. I think because Friend Connect is authoritative to Reader who is authoritative to Feedly, the fix has to be upstream of Feedly.

However, unsubscribing in Friend Connect did not really do it. (At least through a logout and login.)  When Feedly pulled the data from Reader again, the unsubscribed feed came back.

Apparently Feedly relies on Google for authentication. So, I cannot just Revoke Access for Feedly to my Google account to do #1 below now.

So there are a couple potential ways to approach fixing this.

    1. Do nothing. Google Reader dies on July 1. That should remove Reader, the man in the middle. Without Reader there, Feedly ought to no longer know about Friend Connect based feeds.
      Pro: Least amount of work. Con: Six weeks is a long time. Unknown whether that will actually work.
    2. Unsubscribe in Friend Connect. I subscribed to a blog through Blogger and confirmed new posts showed up in Reader and Feedly. I removed the subscription in Blogger by going to Settings to the right of Reading List. I clicked Settings to the right of the blog to remove. Finally, I clicked “Stop following this site.” When I refreshed Reader and Feedly, this blog disappeared. Of course, any I want to continue to read need a direct subscription in Feedly.
      Pro: Not sure. Con: I will longer publicly support friends. Very cludgy to stop following these.

 Probably wait and see.

Disqus

I am trying out the Disqus comment system for this blog through the WordPress plug-in. I’ve had an account through them for years for my Tumblr. Not sure why I did not bite this bullet years ago. More and more sites I visit use it. It lets commenters authenticate through Disqus, Facebook, Twitter, or Google. The WordPress native comments are spam ridden even with Akismet. Plus the Disqus WordPress plugin is much more user and administrator friendly than Facebook Comments for WordPress.