Autoptimize 2.8.2 update “mishap” postmortem

This morning I finally pushed Autoptimize 2.8.2 out of the gates which was a relatively minor release with misc. small improvements/ bugfixes. Only it proved not that minor as it broke some sites after the update, so here’s a quick postmortem.

Timeline

  • 7h33 CEST: I pushed out 2.8.2
  • 7h56 CEST: first forum post about a Fatal PHP error due to wp-content/plugins/autoptimize/classes/external/php/ao-minify-html.php missing
  • 7h58 CEST: second forum post confirming issue
  • 8h01 CEST: responded to both forum posts asking if file was indeed missing on filesystem
  • 8h04 CEST: I changed the “stable version” back to 2.8.1 to stop 2.8.2 from being pushed out.
  • 8h07 CEST: forum post replies confirming the file was indeed missing from the filesystem
  • 8h15 CEST: I pushed out 2.8.3 with the fix
  • 8h22 CEST: confirmed fixed by first user
  • 8h26 CEST: confirmed fixed by second user

Root cause analysis

One of the improvements was changing the classname of the HTML minifier to avoid W3 Total Cache’s HTML minifier being used. For this purpose not only small changes were made to the HTML minifier code, but the file was also renamed from minify-html.php into ao-minify-html.php. The file itself was present on my local filesystem, but I did *not* svn add it, so it was never propagated to the wordpress.org SVN server, resulting in it not being in the 2.8.2 zip-file causing the PHP Fatal “require(): Failed opening required” errors.

Conclusions

Every svn ci has be proceeded by an svn stat, always. I’ve updated my “go live” procedure to reflect that.
Additionally; I strongly advise against automatic updates for Autoptimize (and I don’t auto-update any plugin myself), not only for major f-ups like mine today, but also because any change to how (auto-)optimization works needs to be tested for regressions. And if you have a site that generates money somehow, you really should have a staging site (which can auto-update) to test updates on before applying on production.

Long overdue: WP YouTube Lyte update

It took me way too long (Autoptimize and related stuff is great fun, but it is eating a lot of time), but I just pushed out an update to my first ever plugin; WP YouTube Lyte. From the changelog:

So there you have it; Lite YouTube Embeds 2018 style and an example Lyte embed of a 1930’s style Blue Monday …

Orkestra Obsolete play Blue Monday using 1930s instruments - BBC Arts

Impatiently flashing my HTC Hero into shape

the new android recovery image menu in actionI’m an impatient man, so although I heard rumors that Mobistar might be testing the HTC Hero update (which is Belgium-specific, as the YouTube application has to be removed because of privacy law concerns), I decided to go the “less official” way and root and flash the darn thing myself. The process was pretty easy (thanks for the info Thomas & Serge), the outcome is great; my phone is a better Hero for it!
So suppose you’re as impatient as I am, suppose you don’t care that this may void your warranty, suppose you’re not scared of bricking your brand new toy, suppose you’re a not entirely technically ignorant, then you could follow these steps:

  1. Root your HTC: by using flashrec.apk to flash a new recovery image on your HTC as described here. If you get a “backup failed” error in step 10 as I did, you just need to power off and on and try again (the backup itself isn’t used anyway, that step is just needed to have flashrec allow you to continue).
  2. Upgrade your rooted HTC: from the new recovery image menu flash MoDaCo custom ROM v2.x (I installed 2.2, 2.3 was released a couple of hours ago) to your system as described here. And don’t forget to wipe before flashing as I did.
  3. Update to the latest radio package to version 63.18.55.06EU_6.35.06.18 from the recovery image menu (you should know the drill by this step) for optimal radio performance.

But you could also wait for the official update, off course …