user1313051
user1313051

Reputation: 39

Has anyone got ArticleComments.php extension working with MW 1.20?

I downloaded the ArticleComments.php from the homepage, and have copied it to my extensions directory.

I add this line to the end of my LocalSettings.php :

require_once( "extensions/ArticleComments.php" );

But when I do, it knocks my wiki over until I disable it! The PHP error log says:

Fatal error: Call to a member function addMessage() on a non-object in /opt/bitnami/apps/mediawiki/htdocs/extensions/ArticleComments.php on line 277

where line 277 reads:

$wgMessageCache->addMessage('article-comments-name-string', 'Name');

Any ideas? This is a common extension, and I just don't know why I can't get it to work? Can anyone link me to the correct file / download in case my PHP file is corrupt in some way? Any info would be useful, I'm tearing my hair out!

Upvotes: 1

Views: 290

Answers (1)

Ilmari Karonen
Ilmari Karonen

Reputation: 50378

Apparently, the version of the ArticleComments extension available from the "official homepage" (0.4.3) is pretty badly outdated, and doesn't work with MediaWiki 1.16 or later. There's a more up-to-date version (0.6) available in the Wikimedia SVN repository which fixes a number of incompatibilities and, according to the change log, a few security issues as well.

(The specific reason for the crash you got is that the global $wgMessageCache object, which the old version uses to define its interface message, was removed in MW 1.18. However, looking at the change log, there seem to be several other incompatibilities as well.)

The mediawiki.org page for the ArticleComments extension is currently really confusing: it contains links to the up-to-date version in the infobox, but everything else on the page links to the old version. I really should contact the maintainers of the extension and try to get it straightened out.

Upvotes: 1

Related Questions