Project:Support desk

From MediaWiki.org
Jump to: navigation, search
vde   This page is for questions relating to the MediaWiki software.

Welcome to MediaWiki.org's Support desk, the central on-wiki place to ask MediaWiki questions!

The greater purpose of this page is to make our Manual and other available help so good that you do not have to come here to ask questions, or making them easier to find.

There are other ways for of communication as well (IRC, mailing lists etc.). Read more here.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using:
    • MediaWiki (reported by your wiki's Special:Version page)
    • PHP (likewise)
    • Database (likewise, e.g. MySQL 5.5)
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new discussion".

Archiving topics

Topics are automatically archived when they have been inactive for three weeks. If a question you have asked is approaching this limit and still has not been answered, please 'bump' it to prevent it being archived. However do not 'bump' for other reasons.

Start a new discussion
First page
First page
Previous page
Previous page
Last page
Last page

Upgrading to 1.24.2 using patch

I am getting a bunch of errors related to files in a "tests" directory and a non-existent file ('Gruntfile.js'). I have encountered something like this before when upgrading.

My personal wishlist is that the references to the test files are cleaned-up in future patches -- so that one gets a clean patch application without ignored hunks.

Here is what the patch application looks like on a test system I am running:

# patch -p1 < mediawiki-1.24.2.patch
patching file Gruntfile.js
patching file includes/api/ApiFormatWddx.php
patching file includes/DefaultSettings.php
patching file includes/EditPage.php
patching file includes/Html.php
patching file includes/installer/PostgresUpdater.php
patching file includes/libs/XmlTypeCheck.php
patching file includes/media/BitmapMetadataHandler.php
patching file includes/media/JpegMetadataExtractor.php
patching file includes/media/XMP.php
patching file includes/OutputPage.php
patching file includes/specialpage/SpecialPageFactory.php
patching file includes/specials/SpecialActiveusers.php
patching file includes/specials/SpecialJavaScriptTest.php
patching file includes/specials/SpecialUserlogin.php
patching file includes/upload/UploadBase.php
patching file includes/User.php
patching file includes/Xml.php
patching file jsduck.json
patching file languages/i18n/en.json
patching file languages/i18n/qqq.json
patching file maintenance/jsduck/config.json
patching file maintenance/mwjsduck-gen
patching file maintenance/postgres/tables.sql
patching file RELEASE-NOTES-1.24
patching file resources/lib/jquery/jquery.js
patching file resources/Resources.php
patching file resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js
The next patch would delete the file tests/frontend/Gruntfile.js,
which does not exist!  Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 2217
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/parser/parserTests.txt mediawiki-1.24.2/tests/parser/parserTests.txt
|--- mediawiki-1.24.1/tests/parser/parserTests.txt      2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/parser/parserTests.txt      2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch:  
Skip this patch? [y]  
Skipping patch.
2 out of 2 hunks ignored
patching file tests/phpunit/data/xmp/doctype-included.result.php
can't find file to patch at input line 2245
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/phpunit/includes/media/XMPTest.php mediawiki-1.24.2/tests/phpunit/includes/media/XMPTest.php
|--- mediawiki-1.24.1/tests/phpunit/includes/media/XMPTest.php  2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/phpunit/includes/media/XMPTest.php  2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 2310
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php mediawiki-1.24.2/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
|--- mediawiki-1.24.1/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php      2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php      2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 2321
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/phpunit/includes/upload/UploadBaseTest.php mediawiki-1.24.2/tests/phpunit/includes/upload/UploadBaseTest.php
|--- mediawiki-1.24.1/tests/phpunit/includes/upload/UploadBaseTest.php  2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/phpunit/includes/upload/UploadBaseTest.php  2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
5 out of 5 hunks ignored
can't find file to patch at input line 2403
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/phpunit/includes/UserTest.php mediawiki-1.24.2/tests/phpunit/includes/UserTest.php
|--- mediawiki-1.24.1/tests/phpunit/includes/UserTest.php       2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/phpunit/includes/UserTest.php       2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 2438
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/phpunit/includes/XmlTypeCheckTest.php mediawiki-1.24.2/tests/phpunit/includes/XmlTypeCheckTest.php
|--- mediawiki-1.24.1/tests/phpunit/includes/XmlTypeCheckTest.php       2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/phpunit/includes/XmlTypeCheckTest.php       2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 2472
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/qunit/data/testrunner.js mediawiki-1.24.2/tests/qunit/data/testrunner.js
|--- mediawiki-1.24.1/tests/qunit/data/testrunner.js    2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/qunit/data/testrunner.js    2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 2510
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/qunit/QUnitTestResources.php mediawiki-1.24.2/tests/qunit/QUnitTestResources.php
|--- mediawiki-1.24.1/tests/qunit/QUnitTestResources.php        2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/qunit/QUnitTestResources.php        2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 2525
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js mediawiki-1.24.2/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js
|--- mediawiki-1.24.1/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js    2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js    2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 2565
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '*.xcf' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' mediawiki-1.24.1/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js mediawiki-1.24.2/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
|--- mediawiki-1.24.1/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js        2015-03-31 18:45:59.000000000 +0000
|+++ mediawiki-1.24.2/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js        2015-03-31 18:45:35.000000000 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
7 out of 7 hunks ignored

System:

  • Debian Linux - Stable
  • MediaWiki 1.24.1
  • MySQL: 5.5.33-0+wheezy1
  • PHP: 5.4.4-14+deb7u14 (apache2handler)
  • Lua: 5.1.5
Steinlaus (talk)03:39, 1 April 2015

Such a phenomenon is known since at least September (1) :-( Others reported it yesterday also (2). I guess, the best way would be to add it in the bugtracker?

(1) http://comments.gmane.org/gmane.science.linguistics.wikipedia.technical/79642 (2) https://lists.wikimedia.org/pipermail/mediawiki-l/2015-March/044199.html

Erkan Yilmaz (talk)05:43, 1 April 2015
 

Creating a Knowledge Base

MediaWiki 1.19.23 PHP 5.2.6 (isapi) MySQL 5.6.22-log

I am sorry but I cannot give URL as the site is internal only and contains sensitive information.

My question is

I have thousand of word documents that I would like to add to my mediawiki, but adding them one at a time is not the way i would like to go. I have LibreOffice and the Microsoft Office plug-in to allow documents to be sent to mediawiki, but for the life of me I cannot get anything to be upload to the server.

To be clearer I am trying to do the following

1. Allow the HelpDesk to save Word Document directly to the mediawiki in which it will create a page and place that page in a category

2. Allow email sent to a special address to be able to create a page from that email and place that page in the HelpDesk Category Page.

If you need my loaclsettings.php I can paste section only as I stated data is sensitive

Rbruce25 (talk)04:28, 1 April 2015

Login Issue

I have fresh install to my Joomla 3.4, I added a super user But when I try to login mediawiki it failed password not match. How can I resolve this issue? Also where are protected pages for the user restrictions?

Thanks

203.81.226.13118:25, 31 March 2015

Special page access, Purge access, and template storing

hi,

- i didnt find how to allow access to special pages only for sysop - i didnt find how to allow access to purge pages only for sysop - i didnt find where are stored templates

if some one could help it would be nice !

thanks

Thisisanew (talk)21:22, 27 March 2015

Purging is possible for everyone and can't be restricted. You could set the user right purge to false for every user group you want, but that would only require the members to click "ok" for the purge action.

For preventing access to certain (special) pages, you should read Manual:Preventing_access, MediaWiki isn't designed for that.

Florianschmidtwelzow (talk)00:11, 29 March 2015

hi,

the purge option only remove the confirmation message, so the purge stay available for anonymous user

i made a dirty script to fix what i was seeking for:

function disableSomeSpecialPages() { //Init Vars global $wgUser; $chkSO=false; $pInfo=isset($_SERVER["PATH_INFO"])?$_SERVER["PATH_INFO"]:; $pUri=isset($_SERVER["QUERY_STRING"])?$_SERVER["QUERY_STRING"]:; //getPath info $url=str_replace("é","e",$pInfo); //Case Special Page if(stripos($url,"/special:")!==false && stripos($url,":Connexion")===false && stripos($pUri,"connexion")===false){$chkSO=true;} //Case Purge if(stripos($pUri,"action=purge")!==false){$chkSO=true;} //Do the check if($chkSO && !in_array('sysop',$wgUser->getEffectiveGroups()))

       {header('Location:../?title=Special:connexion');}

} $wgHooks['SpecialPage_initList'][]='disableSomeSpecialPages';


i still searching where template are stored !

thanks

81.57.18.19217:02, 31 March 2015
 
 

MediaWiki:Noarticletext page not shown

I have two MediaWiki wiki's and with both I've implemented a MediaWiki:Noarticletext system message, both with same text.

One wiki shows the text of that system message for a not existing page (as logged in user), the other shows There is currently no text in this page (for a not existing page, as logged in user). You can search for this page title in other pages, search the related logs, or edit this page.

What's the difference? What am I doing wrong? Local settings?

Waanders (talk)13:17, 30 March 2015

Open the page with uselang=qqx URL parameter and look, what message key is visible there :) After this, check, if this message key contains the content you want.

Florianschmidtwelzow (talk)07:01, 31 March 2015

It says (noarticletext) and I have implemented a MediaWiki:Noarticletext and still it shows that default(?) text.

Waanders (talk)14:45, 31 March 2015
 
 

Step by step guide to create a tool on wmflbs

Is there any doc existis from where i can get the guideline to create a tool at wmflabs. I want to use pywikibot with that tool.

Nasir Khan Saikattalk 10:57, 11 March 2015

Maybe https://wikitech.wikimedia.org/wiki/Help:Tool_Labs

AKlapper (WMF) (talk)13:07, 12 March 2015

Thanks for the reply. I read the page earlier. It is a very useful page but i could not find the answer of a few questions.

  • it says that 'webservice start' will start the server, bot how long will it remain running?
  • how to upload files to the tools account?
  • how to use pywikibot in tools?
  • how to setup cron?
  • how to access publicly my maintainer account files?
Nasir Khan Saikattalk 19:18, 12 March 2015
  • Until "webservice stop" or until other unexpected things happen (electricity outage, harddisc dies, code reached that creates severe problems, world collapses, etc.)
  • See section "SSH/SFTP/SCP" on that page
  • How to use pywikibot not in tools, and what's the difference you've experienced so far to tools?
  • Same for the rest of the questions I guess...
Malyacko (talk)09:16, 13 March 2015
 
 
 
 

Amending commits

I often see revision histories of pages like this https://de.wikipedia.org/w/index.php?title=Liste_der_Stolpersteine_im_Landkreis_und_in_der_Stadt_Gotha&action=history. This happens quite often when a user is preparing the page in his/her namespace and then move it to the to article namespace. Also later user prefer to make several commits for safety reasons. For me such many revisions mostly do not create any benefit for later. Why not allowing the user to amend/merge a current commit with the previous one? This would create a more clean history and would save some space on the harddisks of the server. Due to my wording you maybe saw that i am coming from version control software like git where this is naturally supported and widely used to have clean revision trees.

Aschroet (talk)14:44, 30 March 2015

Well, there's a "preview changes" button to avoid saving the edit, maybe some users should be taught to use it more often :)

Your proposal is a sensible one. But that change isn't straightforward, because it could create problems with edit conflict detection. Also, assume you save the current permalink to share that version of the page, and then the last editor changes the page again, the permalink will not reflect the text of the page at that revision (of course it isn't consistent currently because templates can also change). It would be also inconsistent in Special:RecentChanges to whoever reviewed an edit and then the edit is changed.

I'd also say that disk space is very cheap, specially for wikitext.

You may want to open a BUGREPORT for this (if none exists already).

Ciencia Al Poder (talk)09:38, 31 March 2015
 

[RESOLVED] Stuff not working

On my site I use MediaWiki 1.24.1, PHP 5.3.20 and MySQL 5.1.67. For some reason the edit toolbar will not appear when I make an edit to a page, nor will the search 'recommendations' bar. I have a feeling it's a problem with Javascript, but is it something else? What can I do to fix it?

Antiv31 (talk)00:06, 22 March 2015

Have you checked Manual:How to debug? When it comes to JavaScript, your browser's developer console will also display JavaScript errors.

AKlapper (WMF) (talk)16:05, 22 March 2015

Sadly my host has a lot of downtime right now, so I can't access it.

Antiv31 (talk)05:56, 24 March 2015

The JS error says: 'Uncaught SyntaxError: Unexpected token'.

Antiv31 (talk)23:15, 24 March 2015

In which file? In which line? You can pass debug=true as a URL parameter in the browser's address bar.

AKlapper (WMF) (talk)10:32, 25 March 2015
 

See Manual:Errors and symptoms#Missing edit toolbar, JavaScript not working

Ciencia Al Poder (talk)10:33, 25 March 2015

I realised it was my hosting provider which is injecting advertising into core MediaWiki files. I'll open a support ticket with them.

Antiv31 (talk)07:40, 28 March 2015
 
 
 
 
 

[INVALID] One-to-many relationship Semantic MediaWiki properties

Is it possible to define a one-to-many relationship between two properties of a SMW-page?

And if so, how?

Waanders (talk)13:57, 10 February 2015

Nobody?

Waanders (talk)11:55, 30 March 2015

Hi, maybe you should ask the support of Semantic mediawiki :)

Florianschmidtwelzow (talk)07:08, 31 March 2015
 
 

Recent changes

Dear All.

I have a custom namespace where sensitive information are stored. Only logged in users are allowed to read and alter the contents of this namespace. However, changes made in this sensitive namespace show up in RSS feed and recent changes. Are there any option to exclude this namespace from triggering recent changes?

Regards

Pompelpilt (talk)09:59, 26 March 2015

See Manual:Preventing access. basically, a wiki is not made to have per-namespace read protection. That information could be leaked in a lot of different ways.

You should probably want to create a different wiki for that, and make it private, instead of using a namespace for that.

Ciencia Al Poder (talk)10:44, 26 March 2015

Thanks for your reply. I have perfect control over access to the namespace with sensitive information. Users are required to log on when they want to see articles in that namespace. That works like a charm. The problem is that information provided in this namespace leaks through "Recent changes" and RSS feed witch can be viewed by anyone. I could probably restrict access to "Recent changes" and disable RSS feed, but I would prefer to keep those running.

Pompelpilt (talk)11:17, 26 March 2015

You need custom hook. Try adding to bottom of LocalSettings.php

$wgHooks['SpecialRecentChangesQuery'][] = 'wfHideChanges';
function wfHideChanges( $conds ) {
$hiddenNS = 123; // Replace this with the namespace NUMBER (not its name) that you want to hide.
$conds[] = 'page_namespace != ' . $hiddenNS;
return true;
}

Untested. I probably made a typo somewhere. no guarantees it works. Probably lots of other side methods of accessing page contents (including as templates, other special pages, special:allpages, etc).

Bawolff (talk)17:37, 26 March 2015

Well, I tested it, and it did produce a recent changes event and an RSS feed. I changed the namespace number before I did the test. That was the only change needed, right?

Unfortunately, I have little knowledge of the programming language here, so I have no idea what to look for. Thanks anyway. Any other ideas?

79.160.210.5819:21, 26 March 2015
 

Dear Bawolff.

As far as I can see, there are no typo in your suggestion. This page: http://stackoverflow.com/questions/4888414/exclude-pages-from-mediawiki-recent-changes suggests that your code should be working. However, SpecialRecentChangesQuery seems to be depreciated from MW 1.23 witch I am using. What kind of hook could I use in it's place?

Pompelpilt (talk)21:16, 27 March 2015

It is depreacted with 1.24, at least the documentation of the hook tells that. And it mentions the replacement: Manual:Hooks/ChangesListSpecialPageQuery

Florianschmidtwelzow (talk)00:33, 29 March 2015
 
 
 
 
 

Possible (weird) bug with tags??

Edited by 2 users.
Last edit: 07:04, 31 March 2015

My setup:

Mediawiki: 1.23.5 PHP: 5.5.21 MYSQL:5.6.23

I'm seeing a weird bug with some custom tags that rely on parsing wikitext. The following example is a simplification (I'm just parsing a div tag) to highlight that the problem is related to the use of the parser:

class myClass{
 
public static function ExtensionSetupParserFunction( Parser$parser ) {
 
$parser->setHook( 'mywiki-tag', 'self::ExtensionRenderParserFunction');
 
return true;
 
}
 
public static function ExtensionRenderParserFunction($input, array $args, Parser $parser, PPFrame $frame ) {
 
#simple div tag
$wikiText='<div>'.$input.'</div>'; 
 
#let's parse it
$newParser=new Parser();
$res=$newParser->parse($wikiText,$parser->getTitle(),$parser->getOptions())->getText();
 
#return 
return $res; 
}
 
#end of class

}
 
#Now register the tag:

$wgHooks['ParserFirstCallInit'][] = 'myClass::ExtensionSetupParserFunction';

Now let's use this tag:

<mywiki-tag>input</mywiki-tag>a
<mywiki-tag>input</mywiki-tag> a

The html corresponding to the first line:

<div>input</div> a

The second line has an extra pre tag around 'a':

<div>input</div><pre> a</pre> .

In the rendering function, if we remove the div tags and just parse the input directly then everything is OK. Any idea what's going on here?

Mfort123 (talk)20:30, 28 March 2015

Another question would be: What is the reason to do that? Why you would parse a text inside a parser tag? You shouldn't need to do this, maybe you could explain a little bit further, what you really want to do :)

Florianschmidtwelzow (talk)23:55, 28 March 2015

For my purpose, the tags are better than templates or a parser function. Anyhow, can anyone explain the behavior that I'm getting with even the simplest of tags (as above). It appears that there is a bug.

76.68.156.23901:19, 29 March 2015

Sorry, than i don't know, why that happens, sorry.

Florianschmidtwelzow (talk)11:14, 30 March 2015
 
 
 

JavaScript in page title?

I can insert a javascript code to the right of the title of all pages of my wiki?? If possible, can you explain how?
Thank you!

185.5.60.13402:31, 30 March 2015

Why would you want to insert JavaScript specifically at that point?

Ciencia Al Poder (talk)09:28, 30 March 2015

I would like to insert the google link, seems like a great location

185.5.60.13416:22, 30 March 2015

You should insert it manipulating the DOM with JavaScript, and you can place that JavaScript anywhere on the page. Scripts don't display its contents in the place where they're inserted.

See Manual:Interface/JavaScript for places to put scripts.

Ciencia Al Poder (talk)21:39, 30 March 2015
 
 
 

Difference system messages Nocreatetext, Noarticletext, Noarticletext-nopermission, Newarticle and Newarticletext

Manual:Interface/Noarticletext defines the pages that are shown for non existing pages. But what about MediaWiki:Nocreatetext, MediaWiki:Newarticle and MediaWiki:Newarticletext? Are these messages outdated?

Waanders (talk)07:46, 30 March 2015

Outdated in what sense?

Ciencia Al Poder (talk)09:33, 30 March 2015

Outdated as not used anymore. Because to me it seems they provide the same functionality, so why different system messages?

Waanders (talk)09:52, 30 March 2015

One is when you view the not existing page with action=edit, and other is when not. And they're used

Ciencia Al Poder (talk)21:00, 30 March 2015
 
 
 

ActiveUserList

How the list of active user is generated and what the automatic trigger is - the "apply" key works okay, but the automatic actualization is missing here --thx in advance --

Karl Gruber (talk)12:49, 28 March 2015

If i remember correctly, the contents of this special page are refreshed only every 300 seconds, aka 5 minutes, except the wiki is in read only mode. Please check, if one of these variables are ste in your LocalSettings.php (both can set your wiki in read-only mode):

Florianschmidtwelzow (talk)00:09, 29 March 2015

At this moment not one of the both is written in the LocalHost.php - I tried now to set $wgReadOnly = false - I will see ;-)M -- thx

Karl Gruber (talk)06:58, 29 March 2015

This was not a solution, the effect is the same, unfortunately --

Karl Gruber (talk)13:46, 29 March 2015

With Extension:RefreshSpecial you can refresh as often as you like ;-)

FriedhelmW (talk)16:02, 29 March 2015

But that shouldn't be needed. The special page should be updated every 300 seconds (if the page is viewed) :/

Florianschmidtwelzow (talk)22:36, 29 March 2015
 
 
 
 
 

error in update with by web browser in MediaWiki Language Extension Bundle

We were dealing with a problem during installation MediaWiki Language Extension Bundle in step upadte database with by web browser

[f18f0cca] /mediawiki/mw-config/ Exception from line 341 of /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/MagicWord.php: Error: invalid   magic word 'babel'
Backtrace:
#0 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/MagicWord.php(264): MagicWord->load(string)
#1 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(5159): MagicWord::get(string)
#2 /home/mechir/domains/wikimech.org/public_html/extensions/Babel/BabelStatic.class.php(22): Parser->setFunctionHook(string, array)
#3 [internal function]: BabelStatic::onParserFirstCallInit(Parser)
#4 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/Hooks.php(206): call_user_func_array(string, array)
#5 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/GlobalFunctions.php(3995): Hooks::run(string, array, NULL)
#6 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(279): wfRunHooks(string, array)
#7 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(291): Parser->firstCallInit()
#8 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(5000): Parser->clearState()
#9 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(377): Parser->startParse(Title, ParserOptions, integer, boolean)
#10 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/installer/Installer.php(631): Parser->parse(string, Title, ParserOptions, boolean)
#11 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/installer/WebInstaller.php(676): Installer->parse(string, boolean)
#12 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/installer/WebInstallerPage.php(392): WebInstaller->getInfoBox(string)
#13 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/installer/WebInstallerPage.php(380): WebInstallerExistingWiki->showKeyForm()
#14 /home/mechir/domains/wikimech.org/public_html/mediawiki/includes/installer/WebInstaller.php(280): WebInstallerExistingWiki->execute()
#15 /home/mechir/domains/wikimech.org/public_html/mediawiki/mw-config/index.php(79): WebInstaller->execute(array)
#16 /home/mechir/domains/wikimech.org/public_html/mediawiki/mw-config/index.php(38): wfInstallerMain()
#17 {main}

in main page by url www.wikimech.org/mediawiki The following message:

A database query error has occurred. This may indicate a bug in the software.
Wikimech org (talk)14:54, 27 February 2015

As the error is the "invalid magic word 'babel'", is the Babel Extension installed?

Malyacko (talk)09:09, 2 March 2015

Hi Malyacko
I'm First upload and Extract MediaWiki Language Extension Bundle in Mediawiki directory then run update by browser. during update I recive top error
I can not access to shell and me want to wiki multi lang ; please help me
Thank You

Wikimech org (talk)07:11, 5 March 2015

Help,Help,Help!!!

Wikimech org (talk)18:30, 29 March 2015

Truncate (delete all rows of the table, but not the table itself) the l10n table, and the contents of the cache directory (if configured). See Localisation#Caching.

Ciencia Al Poder (talk)09:25, 30 March 2015
 
 
 
 

How configuration Babel for MediaWiki Language Extension Bundle

Hi I want MediaWiki Language Extension Bundle but Seems like it should to check that the configuration matches your wiki's format so I saw Extension:Babel But what I did not realize you could help me?

Wikimech org (talk)07:57, 29 March 2015

Currently the problem is a bit unclear... Which steps did you perform, what exactly happened when, and what should have happened instead? Also see MediaWiki Language Extension Bundle#Installation. Which MediaWiki version is this about?

AKlapper (WMF) (talk)22:15, 29 March 2015

Hi to all, especially AKlapper (WMF) I am using a system with the following characteristics

  • Mediawiki 1.24.1
  • MediaWiki Language Extension Bundle Latest release (2015.02)
  • My directory layout looks like this: ./mediawiki/extensions/{A,B,C}

I also do the following steps :

  • ِDownload MediaWiki Language Extension Bundle
  • extract the release file
  • use variable $EXT = "$IP/extensions";
  • add :
require_once "$EXT/Babel/Babel.php";
require_once "$EXT/cldr/cldr.php";
require_once "$EXT/CleanChanges/CleanChanges.php";
$wgCCTrailerFilter = true;
$wgCCUserFilter = false;
$wgDefaultUserOptions['usenewrc'] = 1;
require_once "$EXT/LocalisationUpdate/LocalisationUpdate.php";
$wgLocalisationUpdateDirectory = "$IP/cache";
require_once "$EXT/Translate/Translate.php";
$wgGroupPermissions['user']['translate'] = true;
$wgGroupPermissions['user']['translate-messagereview'] = true;
$wgGroupPermissions['user']['translate-groupreview'] = true;
$wgGroupPermissions['user']['translate-import'] = true;
$wgGroupPermissions['sysop']['pagetranslation'] = true;
$wgGroupPermissions['sysop']['translate-manage'] = true;
$wgTranslateDocumentationLanguageCode = 'qqq';
$wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic content. Used for documenting messages
require_once "$EXT/UniversalLanguageSelector/UniversalLanguageSelector.php";
  • Update by Web browser : Go to wikimech.org/mediawiki/mw-config/ I received the following error :
[59c9261b] /mediawiki/mw-config/ Exception from line 341 of /home/.../domains/wikimech.org/public_html/mediawiki/includes/MagicWord.php:   Error: invalid magic word 'babel'
Backtrace:
#0 /home/.../domains/wikimech.org/public_html/mediawiki/includes/MagicWord.php(264): MagicWord->load(string)
#1 /home/.../domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(5159): MagicWord::get(string)
#2 /home/.../domains/wikimech.org/public_html/mediawiki/extensions/Babel/BabelStatic.class.php(22): Parser->setFunctionHook(string, array)
#3 [internal function]: BabelStatic::onParserFirstCallInit(Parser)
#4 /home/.../domains/wikimech.org/public_html/mediawiki/includes/Hooks.php(206): call_user_func_array(string, array)
#5 /home/.../domains/wikimech.org/public_html/mediawiki/includes/GlobalFunctions.php(3995): Hooks::run(string, array, NULL)
#6 /home/.../domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(279): wfRunHooks(string, array)
#7 /home/.../domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(291): Parser->firstCallInit()
#8 /home/.../domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(5000): Parser->clearState()
#9 /home/.../domains/wikimech.org/public_html/mediawiki/includes/parser/Parser.php(377): Parser->startParse(Title, ParserOptions, integer, boolean)
#10 /home/.../domains/wikimech.org/public_html/mediawiki/includes/installer/Installer.php(631): Parser->parse(string, Title, ParserOptions,  boolean)
#11 /home/.../domains/wikimech.org/public_html/mediawiki/includes/installer/WebInstaller.php(676): Installer->parse(string, boolean)
#12 /home/.../domains/wikimech.org/public_html/mediawiki/includes/installer/WebInstallerPage.php(392): WebInstaller->getInfoBox(string)
#13 /home/.../domains/wikimech.org/public_html/mediawiki/includes/installer/WebInstallerPage.php(380): WebInstallerExistingWiki->showKeyForm()
#14 /home/.../domains/wikimech.org/public_html/mediawiki/includes/installer/WebInstaller.php(280): WebInstallerExistingWiki->execute()
#15 /home/.../domains/wikimech.org/public_html/mediawiki/mw-config/index.php(79): WebInstaller->execute(array)
#16 /home/.../domains/wikimech.org/public_html/mediawiki/mw-config/index.php(38): wfInstallerMain()
#17 {main}


In your opinion, what is the problem ?[edit | edit source]

Wikimech org (talk)08:00, 30 March 2015
 
 

[INVALID] Unable to login to NSWiki using Nationstates Login Verification Code

I'm supposed to be able to copy the login verification code then paste it into the box, click verify nation and log in but when I do that it tells me Unknown Nation ID. I'm currently experiencing this problem under Firefox and Chrome using Linux Mint 17.1 64 bit and Windows 7 64 bit. Any suggestions?

108.39.232.15022:59, 29 March 2015

You should ask the support of NSWiki, mediawiki.org isn't the place to get support for this :)

Florianschmidtwelzow (talk)05:18, 30 March 2015
 

What will happen if I rename a user to an IP address?

Someone ask me to rename his/her username to "127.0.0.1", is there any potential dangers?

一個正常人 (talk)07:53, 29 March 2015

Help!!!

一個正常人 (talk)11:55, 29 March 2015

MediaWiki internally stores the information whether a user, who was logged in, did an action, or if the user had not been logged in. With this criterion it should still be possible to differentiate whether an edit was done by that according user account or by an IP user.

Anyway, IP addresses are not considered acceptable user names for MediaWiki. It will be possible to confuse a username, which is an IP address, with a user with the actual IP address. For example the links pointing to the contribution pages of a user/IP address will look the same for both the IP address and the user account, which has the name of that IP address.

A username of 127.0.0.1 also is misleading as it points to the actual server, not a user, doing an action.

en:Wikipedia:Naming_conventions_(technical_restrictions)#Restrictions_on_usernames makes me think that it is technically impossible to give user accounts such names. Even if it was technically possible, I would not give users user names, which also are IP addresses (among them 127.0.0.1).

88.130.108.1515:43, 29 March 2015

I finally have this conclusion:

It should technically be impossible to rename user accounts to IP address names. We already see that e.g. the contribution page cannot differentiate properly between both, if an account had an IP address name. Since the developers have spent time in making it impossible to rename accounts that way, I think it is currently not possible to say whether there additionally to other issues, whether there will also be security problems arising from such a renaming. Until now the "solution" for that was to forbid the according renaming, not to solve the security issue. So if not even the often-used contribs page cannot handle IP user names properly, then we definitely cannot say that it would by secure to use those. We just don't know.

So you can do the following: See, if you can rename the user accordingly and if that is possible report it as a bug with unknown security implication to the bugtracker!

88.130.108.1516:02, 29 March 2015

The first question is: How do you want to rename the name of the user? MediaWiki doesn't support this functions out of the box, so if it's possible or not is a question of the way you want to do it. Technically it shouldn't be possible to rename a user to an IP-adress.

Florianschmidtwelzow (talk)22:35, 29 March 2015
 
 
 
 

$_SESSSION in extension

Hi all,

I would like to use the typical $_SESSION[] that I have been using in php, but when I try to use in a media wiki extension, specifically in a special page disappears. This is, I want to store one variable in the $_session, one special page is showed, and then when other special page is showed in that computer and with this session, to access to this variable. How I can do that, what is the proper way to store and work with session in extensions??

Thanks in advance, David.

84.44.187.21817:37, 29 March 2015

You could use the $_SESSION[] global variable directly or use WebRequest::getSessionData(). In special pages you should check, if the session is already set up, e.g. like SpecialUserlogin.php does it: https://github.com/wikimedia/mediawiki/blob/master/includes/specials/SpecialUserlogin.php#L247-L249

Florianschmidtwelzow (talk)22:31, 29 March 2015
 
First page
First page
Previous page
Previous page
Last page
Last page