WikiArticleFeeds Ver 0.6.3 Release Announcement

From Jimbojw.com

Jump to: navigation, search

Version 0.6.3 of the WikiArticleFeeds Extension has just been released and is available for download. Sorry for the short turn-around, those of you who recently upgraded to 0.6.2.

This version has just one change: hook functions which were previously object methods are now first-order (global) functions for MediaWiki installations less than 1.7.

What this means is that any servers running MediaWiki 1.7 or higher will see no change upgrading to 0.6.3. This only affects version 1.6 and lower, and only under certain circumstances.

I suspect there's a bug in the 1.6.x codebase, but I haven't done extensive testing to confirm. Here are the steps to produce the issue:

  1. Create a new extension class to wrap hooking methods (as a kind of namespace).
  2. Create a method (function) for the class which is meant to be hooked
  3. Hook it up using $wgHooks in "array( $obj, 'methodName' )" format.
  4. Finally, add another hooking method to the same event using $wgHooks

The issue happens when wgRunHooks() attempts to execute on the stack for the event listed above. You'll find (if the bug is occurring properly) that it fails with an error and backtrace, and the dump of $wgHooks will show that the object reference used in the original hook specification has been changed to NULL.

I suspect, this only happens on 1.6.x - though I've only tested on 1.6 and 1.10, so it's possible it happens in 1.9 also (no need to discuss 1.7 or 1.8 since they've cycled out).

The problem can be effectively avoided by shying away from object/method hooks in lieu of pure function hooks. To this end, the latest version of the WikiArticleFeeds Extension will check if the version is less than 1.7 and insert global functions to call as hooks instead of attempting an object/method strategy.

As always, I'll be happy to answer any questions. Enjoy!

Got something to say?

Leave a comment
Sorry, comments are disabled.

or, read what others have said ...