Special Page shows only <SpecialExtension<

Jump to: navigation, search

Hi,

I use the mediawiki version 1.16.0. I implement a special page for a export. the problem that i have is, that on the special page only the <SpeicalExtensionName< is shown and not the description.

What do i wrong?

 global $wgMessageCache;
  require_once( 'SpecialPage.php' );
  SpecialPage::addPage( new SpecialPage( 'SpecialExport') );
  $wgMessageCache->addMessages(array('SpecialExport'=>'Export tool'));
62.153.239.6610:18, 30 January 2012

First of all don't use $wgMessageCache->addMessages() (ever. It will break in 1.18, and it wasn't meant to be used like that at really any point).

Second, you shouldn't be requre_once'ing any mediawiki files (mediawiki does that for you)

Third, your special page should have its own class that subclasses SpecialPage (It shouldn't be done via new SpecialPage).

See Manual:Special_pages#Basic_special_page_template for the proper way to do it (Mostly just the Basic special page template part of that page. The rest of that page is really rambely and not all that well written).

Bawolff02:25, 2 February 2012
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox