Project:Support desk/Archives/Extension/001

= 2008 =

(RESOLVED) I Limiting edits by all users to approval only.

 * MediaWiki: (Reported by your Wiki's Special:Version page)
 * PHP:
 * MySQL:
 * URL:

I want to be able to approve all edits by non sysop users before they go live. Is this possible?

_Matt (mattnewrock[AT]yahoo.com)


 * You may want to check out Extension:FlaggedRevisions, which does mostly what you want in that only approved edits are shown by default but the latest is still accessible. If this is still not what you desire, consider getting a proper CMS instead of MediaWiki. --Skizzerz talk - contribs [[Image:Tournesol.png|20px]] MediaWiki Support Team  03:03, 19 February 2008 (UTC)

(RESOLVED) CheckUser - cu_log empty, cu_changes not empty.

 * MediaWiki: 1.11.1
 * PHP: 5.2.4_p20070914-pl2-gentoo (cgi-fcgi)
 * PostgreSQL: PostgreSQL 8.2.6 on i686-pc-linux-gnu, compiled by GCC i686-pc-linux-gnu-gcc (GCC) 4.1.2 (Gentoo 4.1.2)

I have already installed this extension and found it not working. What is the problem? The cu_log is empty, so empty... And it is all that I have found out of my database and from the Special:CheckUser site, which tells me the same.

Of course, I've tried doing installation next time (deleting old thing and creating them using cu_log.pg.sql and cu_changes.pg.sql). Nothing happened.

And the second thing I've noticed: when I try to check smb's IP, I get the following warning: Warning: pg_query [function.pg-query]: Query failed: ERROR: relation "cu_log_cul_id" does not exist in /home/k07_b/petersa/.homepage/mw/includes/DatabasePostgres.php on line 515 Błąd wewnętrzny

A database error has occurred Query: SELECT nextval('cu_log_cul_id') Function: Error: 1 ERROR: relation "cu_log_cul_id" does not exist

Backtrace:


 * 1) 0 /home/k07_b/petersa/.homepage/mw/includes/Database.php(795): DatabasePostgres->reportQueryError('ERROR: relatio...', 1, 'SELECT nextval(...', '', false)
 * 2) 1 /home/k07_b/petersa/.homepage/mw/includes/DatabasePostgres.php(764): Database->query('SELECT nextval(...')
 * 3) 2 /home/k07_b/petersa/.homepage/mw/extensions/CheckUser/CheckUser_body.php(811): DatabasePostgres->nextSequenceValue('cu_log_cul_id')
 * 4) 3 /home/k07_b/petersa/.homepage/mw/extensions/CheckUser/CheckUser_body.php(634): CheckUser->addLogEntry('userips', 'user', 'Shaql', '', '2')
 * 5) 4 /home/k07_b/petersa/.homepage/mw/extensions/CheckUser/CheckUser_body.php(71): CheckUser->doUserIPsRequest('Shaql', '')
 * 6) 5 /home/k07_b/petersa/.homepage/mw/includes/SpecialPage.php(459): CheckUser->execute(NULL)
 * 7) 6 /home/k07_b/petersa/.homepage/mw/includes/Wiki.php(201): SpecialPage::executePath(Object(Title))
 * 8) 7 /home/k07_b/petersa/.homepage/mw/includes/Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
 * 9) 8 /home/k07_b/petersa/.homepage/mw/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 * 10) 9 {main}

--Peter de Sowaro 00:22, 21 February 2008 (UTC)
 * Did you run the command-line install script? --Skizzerz talk - contribs [[Image:Tournesol.png|20px]] MediaWiki Support Team  00:23, 21 February 2008 (UTC)


 * Yes. Now I've cleared the database from cu_* things once again and run install.php. Nothing new: I've changed one page, deleted another, tried if there is anything in cu_log - and there's nothing right now, as it was. And the same error, too. Peter de Sowaro 01:11, 21 February 2008 (UTC)


 * Should be fixed in r31448. Re-do the checkuser log table again. Aaron 06:13, 2 March 2008 (UTC)

(RESOLVED) Problems with Extension:Renameuser

 * MediaWiki: 1.11.0
 * PHP: 5.2.5 (cgi)
 * MySQL: 5.0.32-Debian_7etch1
 * URL: this

Hello! If I include require_once( "extensions/RenameUser/SpecialRenameuser.php" ); into my LocalSettings.php then on my MW the Spezial:Version will be shown as empty. Only the background and the header of the page is shown. If I comment the line in the LocalSettings.php (as in the moment is done) all works very well. The files for the extension I copied from there: http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_11/extensions/Renameuser/

—Astrid 10:03, 21 February 2008 (UTC)
 * Hello. Try to escape non-standard characters in the 'author' field. Replace
 * 'author' => 'Ævar Arnfjörð Bjarmason',
 * to
 * 'author' => '&amp;#198;var Arnfj&amp;#246;r&amp;#240; Bjarmason',
 *  mgrabovský  | talk  (DJ Jeri)  [[Image:Tournesol.png|25px]] MW Support Team  13:18, 21 February 2008 (UTC)
 * Thank you very much, it does it now. :-) As suggestion for extension-authors: perhaps that they use only standard characters. --Astrid 10:11, 22 February 2008 (UTC)

(RESOLVED) Some questions

 * MediaWiki: 1.11.0
 * PHP: 5.2.4
 * MySQL: 2.8.0.2
 * URL: RockCiclopedia

Some questions: Is there an extension I have to install?
 * I've seen that in Wikipedia there's a function (mainly used in templates) like this: . I've tried to copy some lines on my wiki but that function doesn't work!


 * After I've installed the extension CharInsert.php when I try to access to Special:SpecialPages I receive this error:

Fatal error: Cannot redeclare setupspecialchars (previously declared in /home/mhd-01/www.rockciclopedia.com/htdocs/extensions/CharInsert/CharInsert.php:46) in /home/mhd-01/www.rockciclopedia.com/htdocs/extensions/CharInsert/CharInsert.php on line 48

If I remove the extension the problem is fixed..... why??


 * How do I edit the 404 error page that ask you if you want to create that article? There should be a MediaWiki:Newpage or something like this, I don't remember.......

—Lorenzone92 20:47, 21 February 2008 (UTC)


 * It's MediaWiki:Noarticletext. A few others are MediaWiki:Noarticletextanon, MediaWiki:Badtitletext, MediaWiki:Noimage, but that seems to be the main one. --66.102.80.212 23:20, 21 February 2008 (UTC)


 * OK, thanks! And for the other questions? --Lorenzone92 21:56, 22 February 2008 (UTC)


 * Extension:ParserFunctions provides #if:SOMETHING among its various functions; the docs for CharInsert are here. --Carlb 03:31, 23 February 2008 (UTC)


 * OK, thanks!! And how can I export all my pages? In Special:Export I have to add them manually, how can I export/import all together (template/Mediawiki:xxx also)? --Lorenzone92 14:40, 24 February 2008 (UTC)

If you have access to the command line on your server:
 * php maintenance/dumpBackup.php exports every page in all namespaces
 * php maintenance/importDump.php imports them all together. --Carlb 01:04, 26 February 2008 (UTC)

(RESOLVED) Is it possible to have an article that pulls in content from another file at load time? (or at any time really.)

 * MediaWiki: 1.9.4
 * PHP: 5.1.6 (apache2handler)
 * MySQL: 5.0.27

Is there a way to have a wiki page that pulls its content from another file stored on my server? For example, I have a file on my server, already using MediaWiki markup, called "CHANGELIST" and whenever its updated, I'd like a specific wiki page to update its content based on whats in the "CHANGELIST" file.

I feel like this isn't something too difficult, and probably has been covered before, but my searching skills are just terrible and I can't find it.

Thanks in advance.

-Paul- —204.2.209.2 23:28, 21 February 2008 (UTC)


 * Try Extension:FileSync --Nad 10:08, 22 February 2008 (UTC)


 * Special:Import? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  17:29, 1 March 2008 (UTC)
 * Extension:Include --Flominator 06:11, 15 April 2008 (UTC)

(RESOLVED) Question about Extension:KeepYourHandsToYourself and $wgNamespaceAliases
This looks like a pretty great extension, it's just what I need. But, if I have set$wgNamespaceAliases and changed the namespace name of "NS_USER", would it at all mess up the extension? Smaug 00:15, 25 February 2008 (UTC)


 * It should be fine; the extension is using !in_array($ns, array(NS_USER, NS_IMAGE)) to check for namespaces #4 (user) and #6 (image) by number, not by name, so the namespaces themselves may be named in any language without problems. --Carlb 01:14, 26 February 2008 (UTC)


 * Thanks for the response! Smaug 20:32, 26 February 2008 (UTC)

(RESOLVED) #if function (all parserfunctions) isn't working

 * MediaWiki: 1.11.1
 * PHP: 5.2.5
 * MySQL: 5.0.x
 * URL: http://www.firmalog.com/index.php/%C5%9Eablon:Metakutu#Netice

I want to do Modèle:Début des onglets parserfunctions didin't work. I upload css and js. What will I do? --85.99.200.191 01:25, 2 March 2008 (UTC)


 * Install ParserFunctions extension. According to http://www.firmalog.com/index.php/Special:Version, you haven't installed it. -- Sayuri 00:49, 5 March 2008 (UTC)

(RESOLVED) PARSER extensions not working

 * MediaWiki: 1.11.1
 * PHP: 5.2.1 (apache2handler)
 * MySQL: 4.1.16-max
 * URL: INTRANET... Sic

I've got a problem with the image directory, where many images disappeared without explanation (I haven't found yet and I've checked the filesystem of the RAID1 device, reviewed all the logs from wiki, mysql and apache). The info associated to those "deleted" images is still in the database, though. Therefore, I decided to update the wiki (the "old" one was a 1.9.3) to the later stable build, say here 1.11.1. The database migration went smoothly.

I've upgraded the extensions and included some extra new ones. However, I cannot get three of them working: ParserFunctions, StringFunctions and ImageLink (but they appear to be OK at the Special:Version page). I've tried without success all the suggestions I've found on your help pages, the bugtracking search system, etc..., even google (web, groups, bizzcode, ...). I've also played to leave uncommented only one of them on the LocalSettings.php file. Having "display_errors" enabled, the wiki (and the corresponding apache logs with the variable disabled) produces the following warnings, one per "parsing" function:

Notice: Undefined index: if in *wiki_root_dir*/languages/Language.php on line 1145 Warning: array_slice [function.array-slice]: The first argument should be an array in  *wiki_root_dir*/languages/Language.php on line 1153

Notice: Undefined index: ifeq in *wiki_root_dir*/languages/Language.php on line 1145 Warning: array_slice [function.array-slice]: The first argument should be an array in  *wiki_root_dir*/languages/Language.php on line 1153

...

Notice: Undefined index: img in *wiki_root_dir*/languages/Language.php on line 1145 Warning: array_slice [function.array-slice]: The first argument should be an array in   *wiki_root_dir*/languages/Language.php on line 1153

Warning: Cannot modify header information - headers already sent by (output started at  *wiki_root_dir*/languages/Language.php:1145) in *wiki_root_dir*/includes/WebResponse.php on line 10

Warning: Cannot modify header information - headers already sent by (output started at  *wiki_root_dir*/languages/Language.php:1145) in *wiki_root_dir*/includes/WebResponse.php on line 10

The wiki then displays the corresponding page but all the templates containing the "parser" functions are embed "as is", without running the corresponding command. Any help would be greatly appreciated. Thanks in advance for your attention. [mailto:jabril@ub.edu Josep F Abril]

—161.116.70.152 20:22, 5 March 2008 (UTC)

I'VE GOT IT ... X^D

Although I was looking forward a reply on this section, I've been trying many things. Finally, I've found what was going on. On the newer configuration file (LocalSettings.php), the initialization of the array $wgHooks is provided after the "Extensions" section. As I haven't found any counter indication on the installation manual or the embed comments; when migrating to the newer version of MediWiki, I put the requires to local installed extensions within that section (not at the end of the file), as follows:

/***************************************************************************** * Extensions */

/** * A list of callback functions which are called once MediaWiki is fully initialised */ $wgExtensionFunctions = array;

/** ... Lines of code and comments from $wgExtensionFunctions to $wgExtensionCredits initialization ... *** * Where $type is 'specialpage', 'parserhook', or 'other'. */ $wgExtensionCredits = array;

/** * LOCAL INSTALLED EXTENSIONS */

// to view all possible errors found in a page $wgShowExceptionDetails = true; error_reporting( E_ALL ); ini_set( "display_errors", true );

/* * end extensions ******************************************************************************/

By moving the following code, that initially I've found many lines after the extensions section,

/** * Global list of hooks. * Add a hook by doing: *    $wgHooks['event_name'][] = $function; * or: *    $wgHooks['event_name'][] = array($function, $data); * or: *    $wgHooks['event_name'][] = array($object, 'method'); */ $wgHooks = array;

just after the $wgExtensionCredits = array; line, everything started to work: no errors on pages, no errors on logs, all parser extensions being replaced...

I hope this will help anybody else having problems with the parser extensions. Cheers... Josep F. Abril

—161.116.70.152 19:15, 11 March 2008 (UTC)

(RESOLVED) Blank Page after Executing Hook

 * MediaWiki: 1.11.1
 * PHP: 5.2.0 (apache2handler)
 * MySQL: 5.0.26
 * URL: http://playground.bradley.edu/wiki/

Hello, I've attached a function to the ArticleSaveComplete hook. The function completes successfully, but the user is then presented with a blank page rather than being directed back to the article page like they were before. Do I have to return a special value or do something special in order to redirect the user to the article? Or does this mean that I've done something wrong with the called function?

—98.214.108.155 02:30, 8 March 2008 (UTC)


 * Nevermind, I figured it out. One of my local variables had the same name as a variable passed by the hook, so it was causing an error when I changed it.

98.214.108.155 17:58, 8 March 2008 (UTC)

(RESOLVED) Problem with Custom Edit from Barrylb

 * MediaWiki: 1.12.0
 * PHP: 5.2.0-8+etch10 (cgi-fcgi)
 * MySQL: 5.0.45-Dotdeb_0.dotdeb.1-log
 * URL: local

I have Problem with the Mod of Barrylb: User:Barrylb/Custom_article_editing_form_with_fields Nothing Change an the phperror is: Fatal error: Call to private method EditPage::previewOnOpen from context '' in /var/www/html/wiki/extensions/CustomEdit.php on line 103

In line 103 is: if ($editpage->previewOnOpen || $wgRequest->wasPosted ) {  I dont now whats wrong, and i cannot contact the Autor. Please help what changed in this line?? —91.17.99.230 17:49, 21 March 2008 (UTC)
 * Problem is solved at the end of User talk:Barrylb/Custom article editing form with fields and within the current code. --Flominator 06:10, 15 April 2008 (UTC)

(RESOLVED) Smilies Extension
Is there a smilies extension that allows for replacement of certain words with images? I would assume a bot function would be necessary for this. -PatPeter,  MediaWiki Support Team  00:53, 26 March 2008 (UTC)
 * MediaWiki: 1.11.0
 * PHP: 5.1.4 (cgi-fcgi)
 * MySQL: 5.0.45-log
 * URL: Red Orchestra Wiki


 * You certainly could use a bot for this, but it would probably be a lot more efficient to work with the parser: Extension:Emoticons does this (though it may need updating). —Emufarmers(T 03:01, 26 March 2008 (UTC)


 * Hmmm is there any way to turn off that extension for certain pages? Or only enable it for some pages? I am copying lines from web forums into mainspace for my Wiki, so would there be a way to only enable it in talk pages and use a template for mainspace? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  02:22, 27 March 2008 (UTC)


 * Just from a quick examination of the code, I think I see a simple hack. Replace
 * with
 * 1 is the main talk namespace; you can replace it with whichever namespace you want to enable smilies on (and you can have it apply to more than one namespace if you want). —Emufarmers(T 03:32, 27 March 2008 (UTC)
 * 1 is the main talk namespace; you can replace it with whichever namespace you want to enable smilies on (and you can have it apply to more than one namespace if you want). —Emufarmers(T 03:32, 27 March 2008 (UTC)
 * 1 is the main talk namespace; you can replace it with whichever namespace you want to enable smilies on (and you can have it apply to more than one namespace if you want). —Emufarmers(T 03:32, 27 March 2008 (UTC)

(OUTDATED) Social Profile Information Update Error

 * MediaWiki: 1.12.0
 * PHP: 5
 * MySQL:
 * URL: http://www.integraltech.info/

I have downloaded and installed the social profile extension, but when I try to edit the information, I get the following error:

Fatal error: Class 'SpecialUpdateProfile' not found in /home/.sangievese/cblay/integraltech.info/includes/SpecialPage.php on line 321

Does anyone have any ideas on how to fix the problem?

Thanks in Advance! Chris —192.195.154.114 22:56, 11 April 2008 (UTC)


 * 1) Maybe you should post SocialProfile-related questions to Extension talk:SocialProfile rather than here, I know that I at least watch that page actively, unlike the support desk pages. :)
 * 2) Are you using the latest version from SVN? If not, please upgrade to it. The SourceForge version at least causes problems like the one you mentioned, it's very buggy and most likely compatible only with MediaWiki 1.10. -- Sayuri 18:05, 10 May 2008 (UTC)

(RESOLVED) Fattal error message

 * MediaWiki: 1.9.3
 * PHP: 5.2.5 (cgi)
 * MySQL: 4.1.22-standard-log
 * URL: http://www.gidelimmi.net/wiki/index.php?title=Ana_Sayfa

Hi, I have mediawiki installed with version 1.9.3 and tried to install checkuser ext. but I am getting this message while trying to change one user's right and enableing for checkuser rights: Fatal error: Call to undefined method IP::isipaddress in /home/gidelimm/public_html/wiki/extensions/CheckUser/CheckUser.php on line 162

Is there anybody who can help me to sort out this problem? Thanks —Plenumchamber 15:20, 16 April 2008 (UTC)
 * —Emufarmers(T 01:44, 17 April 2008 (UTC)
 * .Thnaks for your kind help, I have replaced the files with the old ones and it did work. --Plenumchamber 06:55, 17 April 2008 (UTC)

(RESOLVED) Extension Imputbox fault

 * MediaWiki: 1.9.3
 * PHP: 5.2.5 (cgi)
 * MySQL: 4.1.22-standard-log

I am trying to install extension:Inputbox but I am getting this error while using it: Fatal error: Call to undefined function wfloadextensionmessages in /home/gidelimm/public_html/wiki/extensions/Inputbox/inputbox.php on line 58

Is there anybody whop can help me to sort out this problem? Thanks in advance —Plenumchamber 09:10, 17 April 2008 (UTC)
 * Current version of Inputbox extension, like a lot of other extensions require mediawiki 1.11.0 or higher to work, you can download an older version here. i Alex  18:06, 4 May 2008 (UTC)

(RESOLVED) Prevent MediaWiki from putting HTML tags in my tag extensions

 * MediaWiki: 1.12.0
 * PHP: 5.2.5 (apache2handler)
 * MySQL: 5.0.45-max-log

How can I prevent MediaWiki from putting HTML tags like paragraph and definition tags in my own tag extensions? You know, the auto linebreak and indention stuff, e.g. when you start the line with a colon.

More concrete, I enabled TeX using this technique, but MediaWiki dealt with linebreaks before the code was transformed into the formula image. So, a TeX expression like

\frac{\Delta y}{\Delta x} &= \frac{f(x_0+\Delta x) - f(x_0)}{\Delta x}\\ &= \frac{\bigl((x_0+\Delta x)^2 - 3(x_0+\Delta x) + 2\bigr) - (x_0^2 - 3x_0 + 2)}{\Delta x}\\ &= \frac{x_0^2 + 2x_0\Delta x + \Delta x^2 - 3x_0 - 3\Delta x + 2 - x_0^2 + 3x_0 - 2}{\Delta x}\\ &= \frac{2x_0\Delta x + \Delta x^2 - 3\Delta x}{\Delta x}\\ &= 2x_0 + \Delta x - 3. \end{align}$$

would end up like this.

When I saw this I wrote an own tag extension for math tags, but the output was all the same. This is the extension code: $wgExtensionFunctions[] = 'efMyTex'; function efMyTex { global $wgParser; $wgParser->setHook( 'mathx', 'efMyTexRender' ); // not sure if I can overwrite the built-in math tag here } function efMyTexRender( $input, $args, $parser ) { return '<img class="tex" src="http://www.forkosh.dreamhost.com/mathtex.cgi?' . $input . '" alt="LaTex: ' . $input . '">'; }

I didn't find the slightest hint concerning my problem in the manual and nobody was able to help me on the IRC channel, so I'll be more than glad if someone here could direct me in the right direction.

—84.57.149.49 15:10, 27 April 2008 (UTC)


 * Nevermind. A simple rawurlencode in the output HTML did the job. I mixed up MediaWiki's parsing order. --84.57.187.211 14:48, 28 April 2008 (UTC) (formerly 84.57.149.49)

(RESOLVED) Parser Functions if

 * MediaWiki: 1.12.0
 * PHP: 5.2.5 (apache2handler)
 * MySQL: 5.0.45-community
 * URL: http://en.codevwiki.org/

I have the Parser Functions extension installed on my wiki, and I have a template I want to use an if statement on, if the template is being displayed on a page in the Image namespace, I want it to have some specific text; if the template is being displayed on a page in the Media namespace, I want it to have some diffrent text; or if the template is being displayed on a page in neither of those namespaces, I want it to have some other text. Now I would assume I would have to do some nested if statement like

Now the big question, assumming the logic there is right, what would the condition statement be to check if its being displayed in the image namespace or the media namespace?--71.217.196.15 14:59, 4 May 2008 (UTC)


 * Well I did a little googling and i might have found the answer:


 * -71.217.196.15 15:06, 4 May 2008 (UTC)


 * Well small issue, I tested it on my wiki, when you view the template, it's in the template ns so it should be displaying the generic text, but it's displaying the image text instead.-71.217.196.15 15:08, 4 May 2008 (UTC)


 * Well I figured it out afterall all I need is:


 * --71.217.196.15 15:22, 4 May 2008 (UTC)