Posts not sharing to social media

Once upon a time, I artisinally hand-crafted my social media shares. Then I installed the Jetpack plugin for WordPress which handles publicizing to social media for me. Doing it myself suddenly sounded like a lot of work, so I decided not to. Since then, Jetpack has dutifully shared to Twitter, Google+, and LinkedIn whenever I publish a new post.

This has worked out pretty well for me. Most of the meager traffic I get on the day of a new post comes from Twitter, with a few from Google+, and the occasional LinkedIn post. (Don’t you people use RSS readers anymore?) Until earlier this month when suddenly I noticed my new posts weren’t hitting Twitter.

There were no obvious indications about what when wrong, but I did notice that it seemed to roughly coincide with applying a few updates. I started playing around a little bit. All of my posts recently have been scheduled, so I wondered if immediate publication would trigger the publicize feature. Sure enough, it did. (As an aside, at least one person was quick enough to see that tweet and click the link in the brief moment between when I deleted the post and when I deleted the tweet).

Armed with the knowledge that it was only a scheduled post issue, I turned to Google for answers. Pretty quickly I found a WordPress forum thread that seemed to be about the same issue. It had a link to a GitHub pull request for Jetpack that fixed the issue.

Normally, I’d wait for a new release, but this was really hurting my personal brand. So I applied the patch by hand to my install. And that’s how my scheduled posts started hitting social media channels again. If you have a WordPress installation that won’t share, give that patch a try.

I apologize if you missed any of my “terrific” content. It’s all still there for you to read.

Well that’s one way to break a WordPress install

Several of you noticed last week that when I shared a new blog post on social media the link resulted in an HTTP 404 (page not found). I attributed it to the fact that I had written the post before I switched from the WordPress plain link style (e.g. “/?p=123”) to a longer style (“/2016/11/06/sample-post/”) and figured the plugin to publicize it didn’t handle that change correctly. But the link was correct, so what was it?

It turns out to be a security feature. I set the .htaccess file to be read-only. This is generally a good idea, but it caused a problem. When I changed the permalink setting, WordPress wasn’t able to write the necessary changes. As it turned out, WordPress was kind enough to let me know about this, but in a very unobtrusive way.

Below the “Save Changes” button, the WordPress settings page displayed this message:

“If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.”

Of course, since it was below the save button, I didn’t even look at it. Only after I broke links to the blog posts in a very public manner did I notice what I had done. I blame myself mostly, but I also blame WordPress a tiny bit. “I can’t actually do what you told me to do” seems to merit a more in-your-face message. Big, red text or a popup dialog would have made it clear that I had more work to do.

But in the end, I was able to fix it quickly. Only two people said they noticed, and it’s not like I have more than a handful of page views on a given day anyway. Plus, I got this blog post out of the ordeal.