Thread:Project:Support desk/wfRunHooks error... probably a configuration error on my part.

Hi all,

Just moved a wiki from one server to another, and upgraded at the same time to 1.16. Here's the scoop.
 * Old server - Win 2003, PHP 5.1.4 (isapi), Mediawiki 1.12.0, MySQL 5.1.41-community-log
 * New server - Mac OSX Server 10.6.5 (snow leopard), PHP 5.3.3 (apache2handler), Mediawiki 1.16.0, mySQL 5.0.91-log
 * URL - http://wiki2.grinnellwiki.com

When saving edits to pages, the following error stream pops up;


 * Detected bug in an extension! Hook smwfSaveHook failed to return a value; should return true to continue hook processing or false to abort.


 * Backtrace:


 * 0 /Library/WebServer/Sites/Grinnell7123/Wiki/includes/Article.php(2099): wfRunHooks('ArticleSaveComp...', Array)
 * 1 /Library/WebServer/Sites/Grinnell7123/Wiki/includes/Article.php(1791): Article->doEdit('Brainstor...', '', 98)
 * 2 /Library/WebServer/Sites/Grinnell7123/Wiki/includes/EditPage.php(1047): Article->updateArticle('Brainstor...', , false, false, false, )
 * 3 /Library/WebServer/Sites/Grinnell7123/Wiki/includes/EditPage.php(2552): EditPage->internalAttemptSave(false, false)
 * 4 /Library/WebServer/Sites/Grinnell7123/Wiki/includes/EditPage.php(389): EditPage->attemptSave
 * 5 /Library/WebServer/Sites/Grinnell7123/Wiki/includes/EditPage.php(271): EditPage->edit
 * 6 /Library/WebServer/Sites/Grinnell7123/Wiki/includes/Wiki.php(553): EditPage->submit
 * 7 /Library/WebServer/Sites/Grinnell7123/Wiki/includes/Wiki.php(70): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 8 /Library/WebServer/Sites/Grinnell7123/Wiki/index.php(117): MediaWiki->performRequestForTitle(Object(Title), Object(Article), Object(OutputPage), :Object(User), Object(WebRequest))
 * 9 {main}

I checked out line 2099 of Article.php, and it looks like this;


 * wfRunHooks( 'ArticleSaveComplete', array( &$this, &$user, $text, $summary, $flags & EDIT_MINOR, null, null, &$flags, $revision, &$status, $baseRevId ) );

Here's what looks to be the code from SMW_Hooks.php that's being called. Looks like it's *trying* to return "true" :-)


 * * This method will be called after an article is saved after
 * * editing. It stores the semantic properties in the database.
 * * One could consider creating an object for deferred saving
 * * as used in other places of MediaWiki.
 * function smwfSaveHook(&$article, &$user, &$text) {
 * SMWFactbox::storeData(smwfIsSemanticsProcessed($article->getTitle->getNamespace));
 * return true; // always return true, in order not to stop MW's hook processing!
 * }
 * return true; // always return true, in order not to stop MW's hook processing!
 * }

Any ideas? I did a little searching before posting this, but feel free to point me at a thread if I missed it.

Thanks in advance,

Mike --Oconnorstp 22:18, 28 November 2010 (UTC)