WordPress, Jetpack stats graph, and broken images in the admin bar – and a solution

Get ready for it, this is…a blog post about a blog.

I recently upgraded to WordPress 3.5.1, the upgrade went off without a hitch, save one problem.  The sparkline graph from the Jetpack plugin was displaying as a broken link.  If you’re not familiar with the term “sparkline” don’t worry, I didn’t know what it was called until I started doing searches.  The sparkline is a small traffic graph that appears in the admin bar when  you’re logged into your WordPress account; it shows your site traffic for the last 48-hours.

After looking all over the web, in the WordPress and Jetpack forums I found people with similar issues, but none of their resolutions fit my particular issue.  I tried disabling plugins one at a time, that made no difference.  I deactivated Jetpack and then linked it again. No difference.  Removed Jetpack altogether and reinstalled, same result.

Through the WordPress forums I was able to get in touch with Jeremy, a Happiness Engineer with Automattic who helped me figure out the root cause. Big thanks to him for taking the time to work with me. Here’s how we diagnosed the issue.

View the xmlrpc.php file in the root of your WordPress directory with a web browser. It should return the text “XML-RPC server accepts POST requests only.”  If that message is the first line of the page, then your problem may lie elsewhere.  If there are any empty lines or spaces above that message then you have a php script introducing whitespace before the headers are printed, and Jetpack hates this. That additional whitespace could be coming from plugins, themes, or any custom hacks to the WordPress core.

Since I had already disabled all the plugins, I knew it couldn’t be coming from them.  Next up, switch back to the default theme. When I did that the sparkline appeared right away, so it was something in the theme, so the next step is to go through all the php files in the theme and look for empty lines before the php tags, or empty lines between closing and opening tags, functions.php would be the most likely location.

In my case, there were so many included files in the functions.php file that it was becoming quite tedious to look through them all and since a theme update was available I went ahead and tarballed up the ….. Continue reading WordPress, Jetpack stats graph, and broken images in the admin bar – and a solution

OSX – Imaging an SD card for use on a Raspberry Pi

My new Pi and it’s memory card arrived at the house yesterday afternoon. I got everything unboxed, downloaded the latest image from the Pi website and fired up Disk Utility on my Mac and was ready to start imaging. But it’s not quite that simple, the Disk Utility can’t verify the image as being valid, so we have to do this from the command line. But relax, it’s not hard to do.

First insert the SD card into the card reader, open a command prompt and run this command:

elmo:~ jgs$ df -h Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1s1 29Gi 2.1Mi 29Gi 1% 0 0 100% /Volumes/NO NAME

You’ll end up with a lot more that what I’m showing you above, but in the interests of keeping it simple, I cropped out the extra disks and drives attached.  You’ll want to locate the SD card you plan on using either by the size of the disk or the name. Mine was new out of the box and was actually called “NO NAME” so it was easy to find.

Next fire up Disk Utility, and under the name of the SD card “unmount” any partitions that are listed, but don’t eject the media.

So we’ve identified the drive as /dev/disk1. It’s very important to make sure you have the correct disk, running the command we’re about to run has the potential to erase your entire hard disk if not used carefully. Always triple check the destination.

Once you’ve done that, go back to your terminal window and run this command – but alter it first to fit your system!!  The if (input file) parameter should point to the .img file and the of (output file) should point to the SD card.

sudo dd bs=1m if=/path/to/file/2012-12-16-wheezy-raspbian.img of=/dev/disk1

From the command line there won’t be any output while the program executes, which is slightly annoying, but there’s a way to force it to show us the progress. There are several ways to do this, depending on the OS you’re running, and sometimes these commands are not interchangeable and can kill the process. For OSX you’ll want ….. Continue reading OSX – Imaging an SD card for use on a Raspberry Pi

Starting a new blog

Well, it’s been a while since I updated the site, and I think it’s partly because of the method in which I put the thing together … almost all static pages written cryptically in perl. While I love programming and mucking around in the code, it got old going in and editing indexes, and adding links. So… introduce wordpress to alleviate my pain.

This site has been a lot less active over the years that youtube took off mainstream, I used to get 99% of my inbound traffic from folks looking for the Bud Light Radio Spots I host, but they’re available so many other places now that things dwindled and I took less of an active interest. It happens I suppose..

Hopefully I’ll be a bit more diligent in updating it now (ha!) but at least it’s much less cumbersome than before, and to top it all off, I can get spam just like all the other comment enabled blogs!