Hi, after I upgraded to mediawiki 1.6.3 recently, an extension I wrote broke. Actually, it broke the whole wiki and all I get is this error message:
Fatal error: Call to undefined function: wfrunhooks() in /home/blgpedia/www/dev.bloomingpedia.org/mediawiki-1.6.3/includes/QueryPage.php on line 44
The extension that I wrote is based on the Ancientpages Special page and is basically a special page that will list the articles according to when they were created and now also shows who created them. This extension was working fine under 1.5.6 and I followed the instructions for how to make a special page on the mediawiki site.
I've been trying to figure out how to fix this and found that if I comment out the line:
wfRunHooks( 'wgQueryPages', array( &$wgQueryPages ) );
in the includes/QueryPage.php file, that the wiki and my extension will work again, but I can only imagine that doing this would cause other problems.
I also tried adding this line to my LocalSettings.php file thinking that maybe I needed to include my extension in that array that is in the QueryPage.php file:
$wgQueryPages[] = array( 'PageCreateOrderPage', 'PageCreateOrder' );
But that didn't work.
So this leads me to think, did something change in the way Special page extensions need to be writting in 1.6? Any ideas?
You can find the source code to my extension and the include page for it:
http://www.bloomingpedia.org/code/extensions_SpecialPageCreateOrder.php.txt
http://www.bloomingpedia.org/code/includes_SpecialPageCreateOrder.php.txt
Then of course I put this in my LocalSettings.php file:
require_once('extensions/SpecialPageCreateOrder.php');
Thanks for any help you can provide.
BUMP. Anyone have any ideas?
On Sun, Apr 30, 2006 at 05:40:01PM GMT, Mark Krenz [mark@suso.org] said the following:
Hi, after I upgraded to mediawiki 1.6.3 recently, an extension I wrote broke. Actually, it broke the whole wiki and all I get is this error message:
Fatal error: Call to undefined function: wfrunhooks() in /home/blgpedia/www/dev.bloomingpedia.org/mediawiki-1.6.3/includes/QueryPage.php on line 44
The extension that I wrote is based on the Ancientpages Special page and is basically a special page that will list the articles according to when they were created and now also shows who created them. This extension was working fine under 1.5.6 and I followed the instructions for how to make a special page on the mediawiki site.
I've been trying to figure out how to fix this and found that if I comment out the line:
wfRunHooks( 'wgQueryPages', array( &$wgQueryPages ) );
in the includes/QueryPage.php file, that the wiki and my extension will work again, but I can only imagine that doing this would cause other problems.
I also tried adding this line to my LocalSettings.php file thinking that maybe I needed to include my extension in that array that is in the QueryPage.php file:
$wgQueryPages[] = array( 'PageCreateOrderPage', 'PageCreateOrder' );
But that didn't work.
So this leads me to think, did something change in the way Special page extensions need to be writting in 1.6? Any ideas?
You can find the source code to my extension and the include page for it:
http://www.bloomingpedia.org/code/extensions_SpecialPageCreateOrder.php.txt
http://www.bloomingpedia.org/code/includes_SpecialPageCreateOrder.php.txt
Then of course I put this in my LocalSettings.php file:
require_once('extensions/SpecialPageCreateOrder.php');
Thanks for any help you can provide.
-- Mark Krenz Bloomingpedia - A City Wiki for Bloomington, Indiana. http://www.bloomingpedia.org/ _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Mark Krenz wrote:
BUMP. Anyone have any ideas?
On Sun, Apr 30, 2006 at 05:40:01PM GMT, Mark Krenz [mark@suso.org] said the following:
Hi, after I upgraded to mediawiki 1.6.3 recently, an extension I wrote broke. Actually, it broke the whole wiki and all I get is this error message:
Fatal error: Call to undefined function: wfrunhooks() in /home/blgpedia/www/dev.bloomingpedia.org/mediawiki-1.6.3/includes/QueryPage.php on line 44
Generally something like this indicates you're trying to include files out of order.
Make sure QueryPage isn't loaded at the global scope, as that would happen *before* most of MediaWiki has been loaded. Instead, load it from your setup function if it's required.
-- brion vibber (brion @ pobox.com)
I figured this out from a comment on the discussion page of the documentation. I looked at the BoardVote extension and noticed that I now need to put the class definition inside the loader function. Before I had it defined before the loader function and an include page was needed. It works now.
I'm going to update the documentation if nobody minds.
Also, where can I put my extension so that its listed as one of the available extensions? Maybe it would be useful as a special page included in the code.
Also, I've found some problems with the way mediawiki counts the number of articles and number of users. I'm going to try to fix those problems and get them submitted.
Thanks, Mark
On Tue, May 02, 2006 at 05:16:03PM GMT, Brion Vibber [brion@pobox.com] said the following:
Mark Krenz wrote:
BUMP. Anyone have any ideas?
On Sun, Apr 30, 2006 at 05:40:01PM GMT, Mark Krenz [mark@suso.org] said the following:
Hi, after I upgraded to mediawiki 1.6.3 recently, an extension I wrote broke. Actually, it broke the whole wiki and all I get is this error message:
Fatal error: Call to undefined function: wfrunhooks() in /home/blgpedia/www/dev.bloomingpedia.org/mediawiki-1.6.3/includes/QueryPage.php on line 44
Generally something like this indicates you're trying to include files out of order.
Make sure QueryPage isn't loaded at the global scope, as that would happen *before* most of MediaWiki has been loaded. Instead, load it from your setup function if it's required.
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org