Skip to content Skip to menu

Dzikri Aziz

The D is silent — kind of.

Temporary Fix for Regenerate Thumbnails 2.0.3

I was building a WordPress a theme, and I needed to rebuild the post attachment thumbnails. As usual, I used Alex’ amazing Regenerate Thumbnails plugin. Upon clicking the button, I got nothing. No progressbar, nothing. I checked the attachment directory and found that the thumbnails weren’t rebuilt.

So I looked at Firebug console and found an error thrown, $.widget is not a function and I realized that I was using the trunk version of WordPress. It throws an error because WordPress just got its jQuery and jQuery UI scripts updated to the latest versions. Also, the ‘widget’ part of jQuery UI is now has its own handler, ‘jquery-ui-widget‘ while previously it was part of ‘jquery-ui-core‘ (I believe).

The fix is easy, you can follow these steps:

  1. Download the newest jQuery UI bundle and unpack it.
  2. Copy the new jquery.ui.progressbar.js (located in the development-bundle/ui/ directory) into the Regenerate Thumbnails plugin directory (wp-content/plugins/regenerate-thumbnails/jquery-ui/).
  3. Open the plugin script (regenerate-thumbnails.php) with your favorite editor and replace line 59 with this:
        plugins_url( 'jquery-ui/jquery.ui.progressbar.js', __FILE__ ),
        array('jquery-ui-core', 'jquery-ui-widget'),
  4. Now you can rebuild your thumbnails.

Because this problem only occur when running the trunk version of WordPress, I don’t think the plugin needs to be updated (yet). I’m sure Alex will update it when WordPress 3.1 come out and I’ll be sure to remind him. He usually responds quickly, so no need to worry 🙂

Posted on in Tips & Tutorials.