Project:Support desk/Flow/2014/03

This page is an archive.
Please ask questions on the current support desk.
Category:Support desk archives#Flow%20Archive%20Support%20desk/Flow/2014/03

Hello Everyone, I'm new to Media Wiki, and trying to develop a software and I like to integrate a dictionary within the software. Now my question is, if I use Wiktionary Database, then should I licence the software under CC-BY-SA-3.0? If no, then what if I change some entries in Database, should then my own Database be open to everyone? I have search a lot on this on Google but I can't get really sure how far it is possible and legal to use the contents on Wiktionary on a commercial software. Thank you so much 91.137.20.132 (talk) 11:28, 1 March 2014 (UTC)

https://creativecommons.org/licenses/by-sa/3.0/ has the short information on the licence you mention. As far as I understand the licence (I am not a laywer), you only have to licence your own work with the same licence, if you "contribute" to the base-work you used (e.g. by adding translations, fix typing errors and so on). As I understand you, you would contribute, if you were somehow forced to do so, but in fact you do not want to contribute to the dictionary. In contrast you want to write an own software for whatever purpose, which is not primarily a dictionary. I would then say you can licence your software the way you like, while you licence the dictionary data under CC-BY-SA-3.0.
The CC-BY-SA-3.0 allows you - under certain conditions - to distribute the work as you wish. However, permission is not duty: Just because I am allowed to cross the green traffic light does not mean I actually have to. 88.130.102.209 13:30, 1 March 2014 (UTC)
However, permission is not duty: Just because I am allowed to cross the green traffic light does not mean I actually have to.
If people see you not going through the green light, they may get upset with you -- especially if you are keeping them from going through the light.
So, yeah, I think that is an appropriate metaphor. MarkAHershberger(talk) 15:26, 1 March 2014 (UTC)

How make access only to Discussion tab?

Is it possible? 5.34.91.231 (talk) 06:48, 2 March 2014 (UTC)

Do you mean disabling write access to "subject namespaces"? Ricordisamoa 09:05, 2 March 2014 (UTC)
No, I want to open anonymous access to participating into Discussion tabs... Or make available registration for new users but only with possibility to discuss without direct editing of articles. 5.34.89.117 09:31, 2 March 2014 (UTC)
Hi,
with $wgGroupPermissions you can grant anonymous access. And with $wgNamespaceProtection you can restrict the access to the necessary namespaces. You may take a look on the talk page of $wgNamespaceProtection, too. Both settings can be modified in LocalSettings.php. Wgkderdicke (talk) 15:15, 2 March 2014 (UTC)

Email's not working - how to check it?

How can check email functionality? I don't see errors... but mails not sending. Even to administrator. 5.34.91.231 (talk) 06:51, 2 March 2014 (UTC)

First, add
 error_reporting( -1 );
 ini_set( 'display_errors', 1 );

to your LocalSettings.php file and see if any errors are displayed. If none are, try enabling debugging and see if the file shows you anything. MarkAHershberger(talk) 20:30, 3 March 2014 (UTC)

also check if sending mail from (unix) command line mail utility works. Bawolff (talk) 19:51, 4 March 2014 (UTC)

template alternate syntax (wikka style) workaround needed

i got an issue transfering content from old wikka database to mediawiki. i got templates braced Template:Foo but parameters go like this {{image url="http://foo.com/foo.jpg"}} so parameter is separated with space and so on. is there any workaround for mediawiki to parse this code as template Image and get http:// as parameter ? 93.159.142.50 (talk) 07:37, 2 March 2014 (UTC)

It sounds like you'll have to write a custom converter. MarkAHershberger(talk) 18:29, 6 March 2014 (UTC)

[RESOLVED] Error with Extension:WikiFarm´s archive

I downloaded Extension:WikiFarm via Special:ExtensionDistributor. It´s snapshot eb2da45. I tried to extract it with tar -xzf wikimedia-mediawiki-extensions-WikiFarm-eb2da45.tar.gz -C /var/www/wiki/extensions, and got these errors from the console in ubuntu:

tar (child): wikimedia-mediawiki-extensions-WikiFarm-eb2da45.tar.gz: Kann open nicht ausführen: Datei oder Verzeichnis nicht gefunden
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Thanks for help 87.172.175.208 (talk) 20:03, 2 March 2014 (UTC)

mw:Extension:WikiFarm has a Download link. If you get "file not found" I'd start with "ls -l" instead of "tar -xzf" :) AKlapper (WMF) (talk) 10:56, 3 March 2014 (UTC)
Thanks for reply! This package worked. 87.172.151.110 17:18, 3 March 2014 (UTC)

Database error

Hello! I am having a database error. I am using MYSQL

Server version: 5.1.73 MySQL client version: 5.1.73

the website is : http://162.251.118.90/wiki 173.35.60.175 (talk) 23:46, 2 March 2014 (UTC)

Hi!
I see that you are using MediaWiki 1.22.3 with the Survey extension installed.
However, we need way more information to be able to help you!
I guess the wiki worked once before? What have you changed that might have broken it?
We need the actual error message, that you get. See how to debug for more information on how to get the actual error message! 88.130.103.75 00:20, 3 March 2014 (UTC)
I am not the best when it comes to websites (html, php, databases).
This is what it displayed
Notice: Uncommitted DB writes (transaction from DatabaseBase::query (WikiPage::pageData)). in ....public_html/wiki/includes/db/Database.php on line 3944
/**
* Run a few simple sanity checks
*/
public function __destruct() {
if ( $this->mTrxLevel && $this->mTrxDoneWrites ) {
trigger_error( "Uncommitted DB writes (transaction from {$this->mTrxFname})." ); //This is line 1944
}
if ( count( $this->mTrxIdleCallbacks ) || count( $this->mTrxPreCommitCallbacks ) ) {
$callers = array();
foreach ( $this->mTrxIdleCallbacks as $callbackInfo ) {
$callers[] = $callbackInfo[1];
}
$callers = implode( ', ', $callers );
trigger_error( "DB transaction callbacks still pending (from $callers)." );
}
}
}
Sorry if i'm wrong on what you wanted 173.35.60.175 02:19, 3 March 2014 (UTC)
Forgot to answer your question.
I just finished the configuration for the wiki. Before I put the settings in the root folder I added the survey plugin.
Then I loaded the page and got this database error. 173.35.60.175 02:23, 3 March 2014 (UTC)
Then you still have to run the maintenance script update.php to update the database with the new tables/columns as needed by the Survey extension. See Manual:Upgrading#Run_the_update_script for information on how to do that! 88.130.103.75 02:32, 3 March 2014 (UTC)
Thanks for your time, and sorry for my stupidity. 173.35.60.175 02:38, 3 March 2014 (UTC)

[RESOLVED] Search for a new paragraph in the edit box

I would like to insert code after the first paragraph on a page. I'm trying to use javascript, .search to search for a

tag but it is returning -1. It doesn't seem to be able to search for show html tags. What can I search for to find the end of a paragraph? LTech (talk) 12:20, 3 March 2014 (UTC)

searching for "\n" worked. LTech (talk) 18:20, 3 March 2014 (UTC)

abspeichern (save)

Since yesterday i have problems with 'save' and 'preview' when trying to see changes or save changes in my site. The explorer of my win7 opens instead and asks to save an index.php on my computer. Sometimes the 'save' still works. A new installation of firefox portable 27 does not help. It works to save this article here ..... Mediawiki 1.93 / mysql 5.3 /php 5.3 Manbu~mediawikiwiki (talk) 17:43, 3 March 2014 (UTC)

This can e.g. happen when mime type settings were changed making the browser think the file should be downloaded instead of displayed.
To verify that it actually is a problem coming from the server, please test with another browser - is the problem the same there? 88.130.67.150 18:26, 3 March 2014 (UTC)

Error creating thumbnail; limit.sh command not found

Hi All

I am trying to install a SVG Converter. When I test it I get the Error creating thumbnail: Message. My installed software:

  • MediaWiki 1.21.6
  • PHP 5.4.4-14+deb7u8 (apache2handler)
  • MySQL 5.5.35-0+wheezy1

My LocalSettings.php is:

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

# Tex Umgebung für Formeln
$wgUseTeX = true;
$wgTmpDirectory = "{$wgUploadDirectory}/tmp";

# SVG Grafiken
$wgFileExtensions[] = 'svg';
$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'inkscape';
$wgMaxShellMemory  = 300000;

In the debug log is the following entry:

File::transform: Doing stat for mwstore://local-backend/local-thumb/b/bd/Test.svg/495px-Test.svg.png
FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/b/bd/Test.svg/495px-Test.svg.png does not exist.
SvgHandler::doTransform: called wfMkdirParents(/tmp)
SvgHandler::rasterize: inkscape -z -w 495 -f '/var/www/wikiMDB/images/b/bd/Test.svg' -e '/tmp/transform_1fbafc584dd1-1.png' 2>&1
wfShellExec: /bin/bash '/var/www/wikiMDB/includes/limit.sh' 'inkscape -z -w 495 -f '\''/var/www/wikiMDB/images/b/bd/Test.svg'\'' -e '\''/tmp/transform_1fbafc584dd1-1.png'\'' 2>&1' 'MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=300000; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180'
[thumbnail] Removing bad 0-byte thumbnail "/tmp/transform_1fbafc584dd1-1.png". unlink() succeeded
[thumbnail] thumbnail failed on hw-kkp7dmz: error 2 "" from "inkscape -z -w 495 -f '/var/www/wikiMDB/images/b/bd/Test.svg' -e '/tmp/transform_1fbafc584dd1-1.png' 2>&1"

In addition I have the following entry in the apache2 error.log:

/var/www/wikiMDB/includes/limit.sh: line 8: $'\r': command not found
/var/www/wikiMDB/includes/limit.sh: line 14: $'\r': command not found
/var/www/wikiMDB/includes/limit.sh: line 17: $'\r': command not found
/var/www/wikiMDB/includes/limit.sh: line 57: syntax error near unexpected token `$'{\r''
/var/www/wikiMDB/includes/limit.sh: line 57: `cleanup() {
'

Is there a Bug in the limit.sh File?

Thanks, Henry 81.62.89.232 (talk) 17:53, 3 March 2014 (UTC)

Just looking at the error, it looks like you may have uploaded it from a Windows box and the CRLF line endings are confusing the shell interpreter. MarkAHershberger(talk) 18:31, 6 March 2014 (UTC)

forgot password directs to Special:PasswordReset , but results in Permission Error

I am new to mediawiki. Created a private wiki. When I'm logged out, the link for forgotten password leads to the Special:PasswordReset page, but I see the message:

"You do not have permission to edit your private information, for the following reason:

The action you have requested is limited to users in the group: Users."

How can I debug this ? (I see there used to be a permission variable passwordreset that went along with an extension PasswordReset, but according to the extension's page, it's obsolete) Thanks!

{ Resolved: turned out I'd set $wgGroupPermissions['user']['editmyprivateinfo'] = true; instead of $wgGroupPermissions['*']['editmyprivateinfo'] = true; } Simonkahan (talk) 06:02, 4 March 2014 (UTC)

You may need to add that special page to $wgWhitelistRead Ciencia Al Poder (talk) 10:37, 4 March 2014 (UTC)

[Novice] #ask ing for multiple images

Hi,

I'm rather new, so this might end up being a simple markup question (even though one for which I have not found a decent answer by asking google).

Background: I want to query a category of people and want to display them as a list with little symbols (country flags) indicating the languages they are able to speak. The way I'm handling it now I manage to pull through one image, multiple images however result in them being "not found", as I have no (known) way of separating them in the markup. If I separate the individual files with nothing shows in the box. Ideally (optionally) I would also like a chance to resize those images when I display them (as the originals are somewhat bigger than the table I display them in.)

Query: I query like so:

{{#ask: [[Category:Supporters]]| mainlabel=-
| ?Name=Name
| ?Languages=Languages spoken
| Limit=100 
| sort=Name
| order=asc 
|headers=plain }}

My template is working alright. I can show ONE flag with like this:

{{SupporterTemplate
|Name=John Smith
|Languages=File:Flag_English.png
}}

This does not work

{{SupporterTemplate
|Name=John Smith
|Languages=[[File:Flag_English.png]]
}}

Neither does this:

{{SupporterTemplate
|Name=John Smith
|Languages=[[File:Flag_English.png]] [[File:Flag_German.png]]
}}

Thanks! 2001:A60:16EC:D501:8907:D586:532E:24BF (talk) 07:44, 4 March 2014 (UTC)

This is a question better asked on the SMW wiki but maybe someone here will know. MarkAHershberger(talk) 18:27, 6 March 2014 (UTC)

changing text on edit page

On my edit page, I have text between the main text box and the summary that I'd like to change (i.e., where information about not putting up copyrighted text might go), but I can't remember how and can't find how to do it anywhere. I am using 1.19, if that makes a difference. Thank you in advance! 85.142.124.2 (talk) 11:44, 4 March 2014 (UTC)

Hi,
what you want basically is easy to achieve. :-)
View the page and then add to the URL ?uselang=qqx or &uselang=qqx, if there already are parameters. You will see the name of the system messages, which MediaWiki is using on the page. Now pick that message, which you want to change, let's say it would be called "logintext" and then go to the wiki page MediaWiki:Logintext. Being a wiki admin, you can edit this text to the text you want. You can edit languages by adding them to the URL, e.g. you can edit the German text by modifying MediaWiki:Logintext/de. 88.130.69.63 14:14, 4 March 2014 (UTC)
Thank you! 178.66.181.151 14:19, 6 March 2014 (UTC)

EasyTimeline for Punjabi Wikipedia

Hi... Yesterday I was working on a draft in my userspace in Punjabi wikipedia and wanted to use the feature EasyTimeline, but it seems it is not working in Punjabi Wikipedia. Can anyone tell me how to make it work or whom to ask ? Vigyani (talk) 01:38, 5 March 2014 (UTC)

It is an extension: Extension:EasyTimeline. It needs to be installed on your wiki to use it. See https://meta.wikimedia.org/wiki/Requesting_wiki_configuration_changes for more information. AKlapper (WMF) (talk) 13:22, 5 March 2014 (UTC)
Thanks...I was actually making some mistake in the wiki code. Once I fixed that, it worked properly. Vigyani (talk) 14:46, 5 March 2014 (UTC)
Thanks...I was actually making some mistake in the wiki code. Once I fixed that, it worked properly. Vigyani (talk) 14:46, 5 March 2014 (UTC)

how do you rebuild the thumbnails

I decided to rebuild the image/thumb directory the other day after noticing a bug with imagemagick was resolved. Turns out that removing the image/thumb directory isn't the best thing to do as several convert processes spawn and consume all available memory and well, the story doesn't get better from there. Is there a controlled way to rebuild the images or perhaps a way to throttle the number of convert commands? Another way to mimic this, and perhaps a security issue, is to just add ?action=purge to a large file and just reload it a dozen times, this will cause several redundant convert jobs to spawn consuming all available memory. Skunark (talk) 07:45, 5 March 2014 (UTC)
See Manual:RebuildImages.php. MarkAHershberger(talk) 18:24, 6 March 2014 (UTC)
Thanks for the response Mark, but as the manual indicates, it only updates metadate records and doesn't generate any missing thumbnails nor provides an option to force regeneration of all thumbnails. Skunark (talk) 01:20, 7 March 2014 (UTC)
Could you file a bug requesting that this be changed and post the bug number here so I can follow it? MarkAHershberger(talk) 13:29, 13 March 2014 (UTC)
I know this topic is extremely stale, but for anyone searching for a similar topic related to rendering that stumbles upon this thread, you might see: Manual:$wgThumbnailEpoch TiltedCerebellum (talk) 00:24, 12 December 2019 (UTC)
Maybe I found a solution: After cleaning thumb folder no image was displayed anymore.
i tried to recreate them with "?action=purge", rebuildImages.php, rebuildall.php, refreshImageMetadata.php, refreshLinks.php:
--> nothing worked!
By chance (due to an installation) update.php was started --> After that - when you call a wiki page, all thumbs belonging to that page are rebuilt Agruwie  talk   20:03, 18 March 2021 (UTC)

All, sorry if this is a stupid question, but I have looked and looked and can't find an answer other than creating a page for each image (I don't want to do that)

Product 	Version
MediaWiki 	1.22.2
PHP 	        5.5.9 (apache2handler)
MariaDB 	5.5.36-MariaDB-log

I have a simple template that I have imported and it contains a link to an image:

 {{META Message
 |id              = disputed
 |signal          = [[Image:emblem-important.png]]
 |heading         = The factual accuracy of this article or section is disputed.
 |message         = '''Reason:''' {{{reason|{{{1|{{META Unexplained Status Template}}}}}}}} ([{{fullurl:{{{talk|{{{2|{{TALKPAGENAME}}#{{{section|}}}}}}}}}}} Discuss])}}

The image resolves to File:emblem-important.png. All I want to do is use a custom image in my mediawiki tree at skins/common/images/bn2/important.png as the image for the template. I have been through just about every help page on mediawiki and cannot find a reference explaining how to use a custom image located in the mediawiki/dir/x location on the local server. I don't want to make a wiki page for the image. (there are about 50 images in the skins/common/images/bn2 dir that I would like to use) What is the trick for accessing a local image in my install, not in a namespace? What's the trick? Drankinatty (talk) 08:41, 5 March 2014 (UTC)

You can enable $wgEnableImageWhitelist and add your own domain to MediaWiki:External image whitelist Ciencia Al Poder (talk) 10:26, 5 March 2014 (UTC)

Thank you, I have attempted $wgEnableImageWhitelist and edited Mediawiki:External image whitelist. In the template, I can now click on the link and the image appears on it's own page, but the image is not shown on the template. It is just the link placeholder shown: [1](with the little icon) and [2] on the other side of the page. I have tried both restrictive and open regexs:

#This is case-insensitive
^https*://www\.rlfpllc\.com/mediawiki/skins/common/images/bn2/.*\.png
^.*bn2/.*png
#Put all regex fragments above this line. Leave this line exactly as it is

Both give the same result. My LocalSettings.php config is:

$wgEnableImageWhitelist = true;

The link in the template is:

{{META Message
|id              = disputed
|signal          = [[//www.rlfpllc.com/mediawiki/skins/common/images/bn2/bn2-important.png]]
<snip>

Is there anything else I need to do before the images will show on the Template?

Alternatively, is there a description of what mysql.table information is required for an uploaded images? If I can find that information, then I could write a script that would copy the image to images/8/foo and add the information directly to mysql to eliminate having to do "file upload->browse->set filename->add summary->upload"? Drankinatty (talk) 19:17, 5 March 2014 (UTC)

You shouldn't put the link as a link, but just the URL of the image.
Try this:
{{META Message
|id              = disputed
|signal          = http://www.rlfpllc.com/mediawiki/skins/common/images/bn2/bn2-important.png
...
I'm not sure if the protocol-relative syntax would work here. But you can try it. Ciencia Al Poder (talk) 20:48, 5 March 2014 (UTC)
Thank you Ciencia!
I've tried simply putting:
//www.rlfpllc.com/mediawiki/skins/common/images/bn2/bn2-important.png
and I could see the the url was resolving correctly, so there must be another tweak needed.
After messing around with it, I finally give in and just uploaded images for an hour :) There really should be a common image folder available to admins outside of the namespace world so that wiki admins can easily set images without the need of making the images into pages. I've also added the suggestion at the uploadwizard test page suggesting a simple bulk upload data file format UploadWizard Talk that would make it easier to go ahead and upload a lot on images at once. Maybe something like that exists, but I haven't found it yet.
Thanks again. Drankinatty (talk) 23:30, 5 March 2014 (UTC)

change text permissions error page

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


If a non-logged in user tries to create a page they get a permissions error with 3 reasons in a bullet pointed list. I would just like the message to read 'please log in or create an account'. I know I can edit the messages at special:AllMessages. I've edited MediaWiki:Permissionserrorstext-withaction to say what I want but how do I remove the bullet points message. Even if I delete the text the bullets are still showing. LTech (talk) 10:10, 5 March 2014 (UTC)

Unfortunately, it looks like the bullets are there to stay since they're hard-coded. MarkAHershberger(talk) 18:16, 6 March 2014 (UTC)
You can use CSS to hide the bullets. Basically you can put something like this in the wiki page MediaWiki:Common.css:
.permissions-errors ul {
list-style-type: none;
} 88.130.125.73 20:36, 6 March 2014 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Problems following upgrade to 1.22

I am currently using:

  • MediaWiki 1.22.3
  • PHP 5.3.6
  • MySQL 5.1.56

I also have APC installed.

I was previously using 1.21 without any problems. However, since upgrading to 1.22 I found that browsing to Special:SpecialPages generally fails. Looking in the Apache error log it reports "zend_mm_heap corrupted" (although sometimes there are other errors). Having done some research I disabled the Zend memory manager by adding USE_ZEND_ALLOC=0 to the environment. That fixed the problem in that Special:SpecialPages works consistently. However, after half an hour or so my server becomes almost completely non-responsive. It still responds to pings but not to HTML, SSH, FTP, etc. I have to reboot the server. Following this the Apache error log shows a number of "unable to fork" errors at around the time the server stopped responding. I have therefore re-enabled the Zend memory manager so that the server keeps working.

Any ideas as to what is going on here and how to fix it? Prh47bridge (talk) 10:36, 5 March 2014 (UTC)

What is the memory limit set to? If you adjust it, does that help? Perhaps using APC and Zend causes problems (See this issue for example). MarkAHershberger(talk) 18:09, 6 March 2014 (UTC)
About the server unresponsive, this may be caused by Manual:Job queue#Changes introduced in MediaWiki 1.22. Try setting $wgPhpCli = false; Ciencia Al Poder (talk) 10:30, 7 March 2014 (UTC)
Thanks for the responses.
The server became unresponsive again this evening. This time I hadn't disabled the Zend memory manager. I am now wondering if the problem is linked with the upgrade to 1.22.3, although disabling the Zend memory manager seems to make it worse. I'm getting a lot of entries in the error log saying:
require(): Unable to allocate memory for pool. in /home/frheritage/www/festipedia/1.22.3/includes/AutoLoader.php on line 1191
The maximum memory allocation for PHP is set to 128M. Prh47bridge (talk) 23:27, 7 March 2014 (UTC)
Can you set the memory to 256M or 512M by adjusting php's memory_limit? MarkAHershberger(talk) 13:27, 13 March 2014 (UTC)

Formatvorlage Bahnstrecke

Hello

it is possible to install something like that even with mediawiki. I would like to develop a wiki for railroad tracks I need this template, here is the link: https://de.wikipedia.org/wiki/Wikipedia:Formatvorlage_Bahnstrecke

greeting Rickisani Rickisani~mediawikiwiki (talk) 11:33, 5 March 2014 (UTC)

Hi Ricki!
Basically you "only" have to copy the template itself and all templates, which it uses (and all templates, which they use and so forth) to your wiki.
It is possible that some of these templates need additional things like extensions (e.g. the ParserFunctions extension) or images (which might be included somewhere in one of these templates). 88.130.93.218 12:59, 5 March 2014 (UTC)
just how can I do it, or do something that does this I have to.
because when I paste from wikipedia the table in my wiki it shows error with Template: BS, without which appears the table. Rickisani (talk) 13:23, 5 March 2014 (UTC)
I don't understand a word of what you wrote. You have to copy the template itself and all templates, which it uses (and all templates, which they use and so forth) to your wiki.
It is possible that some of these templates need additional things like extensions (e.g. the ParserFunctions extension) or images (which might be included somewhere in one of these templates). 88.130.93.218 14:00, 5 March 2014 (UTC)
where can I find the: Formatvorlage_Bahnstrecke and where you can insert this.
I have mediawiki installed only yesterday and know my not so good with mediawiki from Rickisani (talk) 14:48, 5 March 2014 (UTC)
https://de.wikipedia.org/wiki/Wikipedia:Formatvorlage_Bahnstrecke is not the actual temaplte; it only contains explanations about how to use the different templates. The templates themselves are located in the Vorlage: namespace. They are linked here: https://de.wikipedia.org/wiki/Wikipedia:Formatvorlage_Bahnstrecke#Vorlagen. If your wiki is not using German as language, then you might have to actually put the templates into the Template: namespace instead of into the Vorlage: namespace. 88.130.93.218 15:04, 5 March 2014 (UTC)
yes, this is all well and good, but how do I get this template in my mediawiki Rickisani (talk) 17:10, 5 March 2014 (UTC)
C&P?! 88.130.93.218 18:01, 5 March 2014 (UTC)
C&P.....but how
I'm new here and I know that's not mediawiki as factual and correct. Rickisani (talk) 22:33, 5 March 2014 (UTC)
You can use Special:Export to get the templates from dewiki.
You would just paste the names of the templates you want, one per line, into the textarea:
Vorlage:BS-header
Vorlage:BS-daten
Vorlage:BS-table
Vorlage:BS-table1
Vorlage:BS
Vorlage:BS2
Vorlage:BS3
Vorlage:BSe
Vorlage:BS2e
Vorlage:BS3e
Vorlage:BSkm
Make sure all three checkboxes are clicked. This will give you a file to download. You can use Special:Import on your own wiki to load them. MarkAHershberger(talk) 18:06, 6 March 2014 (UTC)

1.21.6.patch failure

PHP 5.4.25 (cgi-fcgi)

MySQL	5.1.73-log

I get this failure on all my 1.21.5 wikis. Is there a problem with the patch, or is it something on my end?

patch -p1 --dry-run < mediawiki-1.21.6.patch
patching file includes/api/ApiFormatBase.php
patching file includes/DefaultSettings.php
patching file includes/upload/UploadBase.php
Hunk #6 FAILED at 1321.
1 out of 6 hunks FAILED -- saving rejects to file includes/upload/UploadBase.php.rej
patching file includes/User.php
patching file RELEASE-NOTES-1.21 Dbooksta (talk) 21:01, 5 March 2014 (UTC)
What was the previous version of Mediawiki?
You probably know this, but you can examine the .rej file to make the necessary changes in includes/upload/UploadBase.php. Alternatively, just download it from here. MarkAHershberger(talk) 17:59, 6 March 2014 (UTC)
Previous version in every case is 1.21.5.
No .rej file was actually created in any case -- is that because it's a dry-run? Dbooksta (talk) 20:12, 6 March 2014 (UTC)
No, it's because the patches don't fit. 88.130.125.73 20:37, 6 March 2014 (UTC)
Looks like it doesn't actually write the .rej files on dry-runs. I ran the actual patch and then just uploaded the UploadBase.php manually.
Still, I'd love to have patches run automatically in the future. This is the first patch I've had trouble with, and on the same system I patched a 1.22.2 -> 1.22.3 without incident.
If I can post any other debug info that will illuminate this problem let me know. Dbooksta (talk) 16:34, 7 March 2014 (UTC)

install page hangs. Never gets to next step.

The install page comes up saying "LocalSettings.php not found." I click the link and it times out after awhile of doing nothing.

- MediaWiki 1.22.3 - PHP 5.5.9 compiled 32 bit vc11 - pear installed - MySql installed, although I dont think we have gotten there.

I can execute phpinfo and that works.

I tried CgiModule and FastCgiModule and get the same thing.

No errors anywhere. Although I don't know all the places to look. 71.83.114.49 (talk) 23:26, 5 March 2014 (UTC)

Are there any restrictions on your webserver? Are you sure your webserver's error logs don't have anything in them? You can also try setting error_reporting and display_errors to show all errors. MarkAHershberger(talk) 17:54, 6 March 2014 (UTC)
Hangs are hard to debug. Can you monitor server resources when this happens? Specifically: CPU and memory usage, and see if there's a noticeable spike on them when the server hangs. Ciencia Al Poder (talk) 10:28, 7 March 2014 (UTC)

Unable to delete files mediawiki 1.19

After i do an upload of new version if image or file and then when i try to delete older files from file history i get the error

Error deleting file: Could not create directory "mwstore://local-backend/local-deleted/l/n/9".

when tried to find over Google you can see lot of error on "mwstore://local-backend/local-public" and not local-deleted Pravinxyz (talk) 05:55, 6 March 2014 (UTC)

Make sure your web daemon has write access to <your wiki path>/images. Gryllida 10:25, 6 March 2014 (UTC)
Look at the configured $wgDeletedDirectory and check that MediaWiki has permissions to store things there.
If still no results, enable the debug log (see Manual:How to debug) to see where mwstore://local-backend/local-deleted is pointing at. Ciencia Al Poder (talk) 10:27, 6 March 2014 (UTC)
The reason you see a local-deleted and no local-public there is that you have caught the error during the deletion process and not during the upload; in both cases the file is actually written on the disc (during deletion it is not just deleted, but it is in fact moved). However, for the filesystem it is just the same: MediaWiki tries to write a file somewhere below images/. 88.130.125.73 13:11, 6 March 2014 (UTC)
Thanks... Pravinxyz (talk) 04:42, 3 April 2014 (UTC)

find redirect pages

How do I find pages that have been redirected? Is there a way I can see a list of them? They don't show up in the search. LTech (talk) 09:57, 6 March 2014 (UTC)

Special:ListRedirects Gryllida 10:24, 6 March 2014 (UTC)
Special:ListRedirects Ciencia Al Poder (talk) 10:25, 6 March 2014 (UTC)

Scientific applications

I'm considering running a private wiki for work on a paper. However I see a vanilla install does not have Math extension, Cite extension... Is there a bunch of these extensions together somewhere? It's not like such target audience would routinely have tech resources for manual install and configuration of these. Gryllida 10:24, 6 March 2014 (UTC)

The Cite extension is bundled into the tarball and can be added at installation time.
You might also want to check out WorkingWiki. I've met the author and he is focused on using Wikis for academic work. MarkAHershberger(talk) 17:50, 6 March 2014 (UTC)
Thank you, it is interesting. I can see it's rather related, but is marked as unsafe. —Gryllida 08:07, 7 March 2014 (UTC)
If you have a private wiki that only you have access to -- which you indicated was the case -- then the safety issue is moot. MarkAHershberger(talk) 17:27, 7 March 2014 (UTC)

Problem importing from old wiki to new

I have a wiki running with:

 mediawiki: 1.6.10
 php: 4.3.9
 mysql: 4.1.20

I have a replacement for it on a new machine:

 mediawiki: 1.22.3
 php: 5.3.3
 sqlite: 3.6.20

I have created a dump on the old system with:

 php maintenance/dumpBackup.php --full --uploads > wiki-backup.xml

Copied the dump to the new machine and uploaded it with

 php maintenance/importDump.php wiki-backup1.xml

When I do this I get the following error:

PHP Warning: XMLReader::read(): uploadsource://41761b5df01b33fc4d371c9aa1bd240c:1: parser error : Document is empty in /var/www/html/mediawiki-1.33.3/includes/Import.php on line 449 PHP Warning: XMLReader::read(): X-Powered-By: PHP/4.3.9 in /var/www/html/mediawiki-1.33.3/includes/Import.php on line 449 PHP Warning: XMLReader::read(): ^ in /var/www/html/mediawiki-1.33.3/includes/Import.php on line 449 PHP Warning: XMLReader::read(): An Error Occured while reading in /var/www/html/mediawiki-1.33.3/includes/Import.php on line 449 [da572db0] [no req] Exception from line 453 of /var/www/html/mediawiki-1.33.3/includes/Import.php: Expected <mediawiki> tag, got Backtrace:

  1. 0 /var/www/html/mediawiki-1.33.3/maintenance/importDump.php(286): WikiImporter->doImport()
  2. 1 /var/www/html/mediawiki-1.33.3/maintenance/importDump.php(245): BackupReader->importFromHandle(resource)
  3. 2 /var/www/html/mediawiki-1.33.3/maintenance/importDump.php(95): BackupReader->importFromFile(string)
  4. 3 /var/www/html/mediawiki-1.33.3/maintenance/doMaintenance.php(113): BackupReader->execute()
  5. 4 /var/www/html/mediawiki-1.33.3/maintenance/importDump.php(291): require_once(string)
  6. 5 {main}

Any help would be appreciated. Thannks, Chris 24.38.14.197 (talk) 14:40, 6 March 2014 (UTC)

Hi Chris!
I recommend to import the wiki DB differently: Create a dump of the database with the MySQL tool mysqldump and then on the new server use mysql to import that dump again.
Note that when you run PHP commands from the shell, you must use at least PHP version 5.3. On your new server, the command "php" however executes only PHP 4.3.9. This version is incompatible with MediaWiki 1.22. 88.130.125.73 17:15, 6 March 2014 (UTC)
I agree it looks like I am running php 4.3.9, but when I execute php -v it says I am running 5.3.3. According to locate I have no other versions of php on my system. Is something forcing it into a backward compatible mode? I am not a php user.
For now, I'd like to try to use sqlite. I am aware there are scripts to convert a mysql dump into a sqlite format, but they look a little sketchy to me. 24.38.14.197 18:10, 6 March 2014 (UTC)
The importDump maintenance script has some bugs, which might make it impossible to import data from an older version into a newer one (I think that might be what you are seeing). When you want to use sQlite, then I would try starting with the old wiki version (1.6.10) and use that one to import the pages. Afterwards you can do a MediaWiki upgrade to 1.22.3.
While MediaWiki does support sQlite, you should be aware that sQulite support is by far not as mature as MySQL support is. Many problems have already been solved for MySQL, while they have not been for sQlite. With sQlite you might probably run into more trouble.
If you ask me, I would stay with MySQL and do the mysqldump - mysql thing. 88.130.125.73 18:34, 6 March 2014 (UTC)

We recently updated to 1.23wmf13 from 1.16 and have noticed that tables with the class of 'sortable' do sort, but no longer persist if a visitor leaves the page and returns. I have built a table as described below and used the advice found here. This worked in the old version but does not in 1.23.

Everything seems correct, but there are no errors in the console and nothing changes in the cookie when a table is sorted. My only thought is that there is a change to MediaWiki in between versions that nullifies this bit of js.

{| class="wikitable sortable" id="testTable"
 |-
 ! Fruit   !! Price
 |-
 | Apples  || £0.95
 |-
 | Oranges || £0.85
 |-
 | Pears   || £1.15
 |}

Ckoerner (talk) 20:36, 6 March 2014 (UTC)

update mediawiki 1.15.2 to 1.22.3

Hello

how can i update my mediawiki 1.15.2 TO 1.22.3 version. thanks Tickerdu22 (talk) 09:22, 7 March 2014 (UTC)

By following the steps described in our awesome manual Ciencia Al Poder (talk) 10:34, 7 March 2014 (UTC)
Hello
thanks to your reply
when I run /maintenance/update.php in the navigator
I have the following error message:
This script must be run from the command line
but I do not have access to the command line. Tickerdu22 (talk) 14:09, 7 March 2014 (UTC)
Then follow the section "Web updater" in the manual:
http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script 88.130.85.15 14:32, 7 March 2014 (UTC)

Lua Error - Signal 11 - How to Start Debugging

Installed software

Product Version MediaWiki 1.20.4 PHP 5.3.28 (cgi-fcgi) MySQL 5.5.33-31.1 Lua 5.1.5 Entry point URLs

Entry point URL Article path /wiki/$1 Script path [ ] index.php /index.php api.php /api.php load.php /load.php

Installed extensions

ParserFunctions (Version 1.4.1) Scribunto

Wiki address: proutypedia.com

Hello! Spent the last week trying to get templates to work. Been running around in circles. Wiki is set up on a shared server on Hostgator. There is nothing in the /bin/ folder so far as I can tell (so no Lua on server). Trying to run Lua from command prompt just causes everything to hang up. I've acquired SSH access, but Hostgator doesn't seem to allow installs, viz. a separate Lua install. I tried to install Lua 5.1.4...but it didn't seem to complete the install...a couple errors showed, and then some directories appeared, but then the usual lua files didn't seem to be there...

Anyway, the first purpose of this post is to ask (beg) for concise directions to enable the logging I need to start debugging this. In LocalSettings.php, I included this as my last line:

$wgScribuntoEngineConf['luastandalone']['errorFile'] = '/tmp/lua-error.log';

But after clicking on a ScriptError and then going to the tmp folder, I find no lua-error.log has been generated.

I'm a lifelong computer user, but a novice when it comes to Linux or coding. The server seems to be running CentOS.

If I could get all the directions I need to start debugging in just one place, I'd be eternally grateful! (Tried the How_to_debug article, but it isn't doing it for me.) Henry O FLOGIN (talk) 09:59, 7 March 2014 (UTC)

How to disable view source tab for anonymous users in mediawiki 1.20

How to disable view source tab for anonymous users in mediawiki 1.20?
The 'view source" tab should be visible but it should be disabled from anonymous users. How to do that?? please reply ASAP Rebeccabrown11 (talk) 10:57, 7 March 2014 (UTC)
Out of curiosity, why would you want to do that? AKlapper (WMF) (talk) 11:56, 7 March 2014 (UTC)
Its my project requirement. client is asking for that. Anonymous users can see the view sourcce tab but when they click it they should not be shown the source code. Please reply and help men Rebeccabrown11 (talk) 13:20, 7 March 2014 (UTC)
Something like what you want is possible, but the exact way you want it, does not make sense: What should a button be there for, which has no function?
The tab can be removed using a hook in LocalSettings.php. This problem comes up often; the thread "How can I hide tabs for users not logged in?" on this page has it and also includes the way how to solve it. 88.130.85.15 14:08, 7 March 2014 (UTC)
I dont have to remove the tab. it should be visible to anoymous users but when they click,they should not be able to see the source .for logged in users. the view source tab will work as usual. Rebeccabrown11 (talk) 16:55, 7 March 2014 (UTC)
> I dont have to remove the tab. it should be visible to anoymous users but when they click,they should not be able to see the source .
That does not make sense! What should a button be there for, which has no function?
Building it this way it's the same as if you have a door and when you pull it open there is no opening and you are standing in front of the wall. 88.130.85.15 17:43, 7 March 2014 (UTC)
MediaWiki is not designed to deny users the right to read wikicode. There would be lots of API hacks to access it anyway. Ricordisamoa 13:13, 8 March 2014 (UTC)
And that are no hacks, but the API is intended to provide that information. You sure can turn the API off, however, as Rico says correctly: MediaWiki is not designed to hide the wiki source code of a page. If one wants to find a way to see it, there surely will be one.
After some thinking I have a better solution for the problem:
You say that you want to keep the button, but we also realized that having a button, which in fact is non-functional, does not make sense. In fact you only want the button to show the wiki source code, when the user is logged in; when he is not logged in, the logical function is to display the login page so that he can log in (when he has an account) in order to then edit pages. So if I were you, I would change the URL, which the button points to: If the user is not logged in, then change the URL to point to the Login page with the according parameters for the login page to return the user to the edit page after login succeeded. 88.130.88.22 14:50, 8 March 2014 (UTC)
I am new to mediawiki.Can you give me precisely what code and in which file i have to put so that view source tab is disabled for anonymous(non-logged in) users? Please reply ASAP Rebeccabrown11 (talk) 05:52, 10 March 2014 (UTC)
Hi, it might seem a bit late but it can help people.
Here is a hook I was given to hide (give a blank page) for view source for the users, but not the bureaucrats :
 function BlockEditUsers( $output, $article, $title, $user, $request, $wiki ) {
   if( ( $user && in_array('bureaucrat', $user->getEffectiveGroups() ) ) && ( $request->getVal('action') == 'edit' ) ) {
     return true;
   } elseif( ( $user && in_array('user', $user->getEffectiveGroups() ) ) && ( $request->getVal('action') == 'edit' ) ) {
 	  
 	return false;
   }
     return true;
 }
 $wgHooks['MediaWikiPerformAction'][] = 'BlockEditUsers';
Hope it helps ! Tuxxic (talk) 11:24, 10 October 2016 (UTC)
Just an update as of 2018. We can remove TABS from being displaying by adding code to the MediaWiki:Common.css file.
That is explained on the following page: Manual:Remove Tabs. Tonydearaujo (talk) 16:10, 16 April 2018 (UTC)
try : Extension:SourceProtection Sen-Sai (talk) 09:06, 15 May 2019 (UTC)

extension:confirmaccount

hi can I have some help with this file for confirmaccount https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FConfirmAccount/12c99a484aacf8ebb0146d815cd4c4728e9949f7/frontend%2FConfirmAccountUI.hooks.php

I would like to update the bit where it does log in / create account which since has been changed to create account log in. but I would like it to set to request account so when click on that it will send them there and when clicked login it will send them there. please can I have some help

    public static function setRequestLoginLinks( array &$personal_urls, &$title ) {
        if ( isset( $personal_urls['anonlogin'] ) ) {
             $personal_urls['anonlogin']['text'] = wfMessage( 'nav-login-createaccount' )->escaped();
        } elseif ( isset( $personal_urls['login'] ) ) {
             $personal_urls['login']['text'] = wfMessage( 'nav-login-createaccount' )->escaped();
        }
        return true;
    }

90.204.133.243 (talk) 19:14, 7 March 2014 (UTC)

the code above is where I found that it is an old code for using the old login and create account way please can I have some help to update it 2.218.224.68 13:04, 8 March 2014 (UTC)
If you want to modify the "personal urls" -- like login page -- have a look at one of the
extensions that modify them
.
I think the AddPersonalUrls extension looks promising.
(If you log in when asking a question on the support desk, you'll be able to be notified of responses via email.) MarkAHershberger(talk) 14:23, 14 March 2014 (UTC)
You can try this. Note that I've coded it without testing on a real installation, so it may have a typo or something wrong:
public static function setRequestLoginLinks( array &$personal_urls, &$title ) {
	// Add a link to Special:RequestAccount if a link exists for login
	if ( isset( $personal_urls['login'] ) || isset( $personal_urls['anonlogin'] ) ) {
			$personal_urls['createaccount'] = array(
				'text' => wfMessage( 'nav-login-createaccount' )->text(),
				'href' => SpecialPage::getTitleFor( 'RequestAccount' )->getFullURL()
			);
	}
	return true;
}
Ciencia Al Poder (talk) 13:39, 15 March 2014 (UTC)
ok I fixed some codes
it should be something like this
$wgHooks['PersonalUrls'][] = 'onPersonalUrls';
function onPersonalUrls( array &$personal_urls, Title $title, SkinTemplate $skin ) {
// Add a link to Special:RequestAccount if a link exists for login
if ( isset( $personal_urls['login'] ) || isset( $personal_urls['anonlogin'] ) ) {
$personal_urls['createaccount'] = array(
'text' => wfMessage( 'requstaccount' )->text(),
'href' => SpecialPage::getTitleFor( 'RequestAccount' )->getFullURL()
);
}
return true;
}
but I need some help to override the login in link so that it just shows login not login/createaccount 94.197.122.93 13:54, 17 May 2014 (UTC)
Maybe you need to change Manual:$wgUseCombinedLoginLink Ciencia Al Poder (talk) 18:17, 17 May 2014 (UTC)

Hi,

I'm having an issue linking to an uploaded file, currently using MediaWiki 1.20.6, PHP 5.3.27 and MySQL 5.6.12 on Windows 7 with IIS7.

In particular, when using [[Media:<filename>]] I will be redirected to a "404 Not Found" page.

It's an issue with several CAD files with different extensions, both of which are in $wgFileExtensions. I've ensured that permissions on both the images folder and the wwwroot folder under C:\inetpub are set to Full Control for both IUSR and IIS_IUSRS. I should also note that other files, such as .docs and .pdf files work fine, even those that are in the same directory as the CAD files that don't work.

Any ideas? 174.114.143.205 (talk) 20:16, 7 March 2014 (UTC)

Is the 404 page generated by MediaWiki or something else? If it is not a MediaWiki page, then something else is causing it and MediaWiki probably isn't at fault here. (It is a good idea to test this in several browsers, also.) MarkAHershberger(talk) 13:23, 13 March 2014 (UTC)

Requiring user email verification to view pages

Hi,

I'm working on a wiki with requirement is that users should be logged in and have completed email authentication to be able to view pages. We have it working that users must create an account to view, except for pages in $wgWhitelistRead.

I tried removing read privilege via

$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['user']['read'] = false;
$wgGroupPermissions['emailconfirmed']['read'] = true;

but then no user can read any page, even the ones in $wgWhiteListRead. Not sure if I'm even on the right track or there is a better way to handle this.

Mediawiki 1.21, PHP 5.3.28, MySQL 5.5. 198.185.164.128 (talk) 23:32, 7 March 2014 (UTC)

I think $wgWhiteListRead should work here. Could you post what you've set that to?
What message is displayed in the above configuration when you visit a page in $wgWhiteListRead? MarkAHershberger(talk) 13:19, 13 March 2014 (UTC)

MediaWiki showing wrong logo - Hacked?

Posted here earlier today. In the process of starting a new Wiki at proutypedia.com. I noticed a few minutes ago that on the iPad using three different browsers, the Wikipedia logo is now showing in the upper left. Wasn't there before -- in fact, the Wikipedia logo was never uploaded to the server for use. Cleared the cache, tried again: same Wikipedia logo. Yet, on my home PC, on two different browsers, the proper logo shows up correctly.

Is this some strange iOS bug? Has the wiki been hacked? Any suggestions are welcome. Henry O FLOGIN (talk) 23:59, 7 March 2014 (UTC)

This appears to be some sort of weird-ass iOS bug. I tried deleting the (proper) logo on the server. When I refreshed the site's main page on the PC, the logo was gone. As it should have been. When I refresh on the iPad even after clearing the cache and turning the thing off and on, it's still showing me Wikipedia's logo in the upper left.
This looks like some sort of weird caching thing. But since it's on three different iPad browsers, it doesn't make much sense. Also, at least as of a few days ago, Proutypedia's proper logo was displaying fine on the iPad. Anybody else have any experience with this? Henry O FLOGIN (talk) 00:25, 8 March 2014 (UTC)
When you really think that this logo file got there on a way it should not have been able to, then check your logs and find out who actually uploaded it. As long as you don't know that you won't be able to answer the question, whether it was a legitimate upload or not. 88.130.85.15 00:50, 8 March 2014 (UTC)
Was never uploaded as far as I can tell. Is why I think it might be some iOS quirk. As I said above, I deleted the logo image pointed to by the code, and in iOS for some inexplicable reason, the Wikipedia logo still shows up. No image upload took place in any log. And as far as I can tell, there is no Wikipedia logo image anyone on the server. Yet when I visit proutypedia.com with three different browsers on the iPad, the Wikipedia logo now shows up. Henry O FLOGIN (talk) 10:26, 8 March 2014 (UTC)
When I visit your website I see a blue "P" logo wih with wings and stuff and the word proutypedia below it. Looks like it's OK...
It could be that for the iPad a version of the stylesheets is used, which incorrectly does not take your changed image into account; you shoud then see the MediaWiki default logo, which is not the wikipedia "W", but the sunflower, which you also see on this page here). However, I think that would already have been noticed and fixed (e.g. because the users on wikipedia complained). So I believe this is some kind of caching problem... 88.130.88.22 12:30, 8 March 2014 (UTC)
I am not sure if it is ether a bug in ios or in mediawiki I saw you had version 1.20 please try updating to 1.22 to see if it has fixed the issue and what version of ios do you have if you have ios 7 then please update 7.0.6 and wait for them to release 7.1 to fix many bugs. 94.197.122.90 13:01, 8 March 2014 (UTC)
Thanks for the helpful replies. Glad you're seeing the Proutypedia logo on your end.
It's a bit of a head-scratcher. The iPad I'm viewing on is still using iOS 5, though that will change when 7.1 comes out. Up to a day or two ago, it nevertheless showed the correct Proutypedia logo.
The Wiki is hosted on a shared server, and I believe there's no way I can upgrade the MediaWiki version myself.
As far as I can tell, no new images were uploaded to the server (including any Wikipedia logo), so I'm not even sure where that image is coming from. I took the correct logo image file that had been displaying until the other day, moved it to the public_html folder and surfed to it directly using the browser. Displays fine, even in iOS. Henry O FLOGIN (talk) 17:27, 8 March 2014 (UTC)
> The Wiki is hosted on a shared server, and I believe there's no way I can upgrade the MediaWiki version myself.
I think it is likely that you can. Go through upgrade; all you need is FTP access. That is all. Additionally having Shell access, would make things easier, but chances are it also works without. Btw: Version 1.20 already no longer is supported. It is vulnerable and should really be upgraded. 88.130.88.22 18:55, 8 March 2014 (UTC)
all you need to do is download mediawiki 1.22 from front page of mediawiki and extract it and then upload it to your site using the link posted abouve 86.173.55.112 19:59, 8 March 2014 (UTC)
The solution is taking a look at http://proutypedia.com/wiki/MediaWiki:Common.css -- if it is a copy of the one from wikipedia it will display a wikipedia logo for mobile clients. Look for the rule for "p-logo". 178.202.52.249 19:48, 11 April 2014 (UTC)
Yep, this worked for me. 2600:1012:B121:9F22:5145:8573:5F98:CAD4 23:25, 9 September 2014 (UTC)
In this case it is unlikely that updating the MediaWiki code base will fix the settings. AKlapper (WMF) (talk) 08:55, 10 September 2014 (UTC)

[RESOLVED] Special:Upload Exception from line 244 UpdateStash.php

I am now getting errors when trying to upload files to MediaWiki 1.22.3.

[307d6bc7] /wiki/Special:Upload Exception from line 244 of /wiki/includes/upload/UploadStash.php: Error storing file in '/tmp/phpMHAun4': "mwstore://local-backend/local-temp/f/f4" is not a valid storage path.

Backtrace:

#0 /wiki/includes/upload/UploadBase.php(844): UploadStash->stashFile(string, string)
#1 /wiki/includes/upload/UploadBase.php(857): UploadBase->stashFile()
#2 /wiki/includes/upload/UploadBase.php(866): UploadBase->stashFileGetKey()
#3 /wiki/includes/specials/SpecialUpload.php(340): UploadBase->stashSession()
#4 /wiki/includes/specials/SpecialUpload.php(433): SpecialUpload->showUploadWarning(array)
#5 /wiki/includes/specials/SpecialUpload.php(179): SpecialUpload->processUpload()
#6 /wiki/includes/SpecialPage.php(631): SpecialUpload->execute(NULL)
#7 /wiki/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL)
#8 /wiki/includes/Wiki.php(298): SpecialPageFactory::executePath(Title, RequestContext)
#9 /wiki/includes/Wiki.php(602): MediaWiki->performRequest()
#10 /wiki/includes/Wiki.php(467): MediaWiki->main()
#11 /wiki/index.php(49): MediaWiki->run()
#12 {main}

These were visible after I added the following to LocalSettings.php:

error_reporting( -1 );
ini_set( 'display_errors', 1 );
$wgShowExceptionDetails = true;

I don't even know where to start on this. Any help appreciated. MadenssContinued (talk) 01:05, 8 March 2014 (UTC)

I fixed it through the normal method of reinstalling MediaWiki. That. Gets. Old. MadenssContinued (talk) 06:37, 8 March 2014 (UTC)
I don't understand why re-installing would fix this problem unless permissions on directories were changed in the process. I agree, re-installing to fix a problem is lame. I think you could have gotten away with just changing some permissions, though. MarkAHershberger(talk) 21:58, 11 March 2014 (UTC)
Permissions were the same in both sets of installations. MadenssContinued (talk) 04:39, 14 March 2014 (UTC)
If this happens again for you, please keep the non-working installation somewhere (tar it up?) and file a bug.
This should not happen. MarkAHershberger(talk) 14:13, 14 March 2014 (UTC)

Index headers keep getting messed up!

For some reason the headers on my index page keep getting prefixed with stuff like; "UNIQ698e32d4decd37c1-h-0--QINUI"

When I go to edit it though it looks fine and if I just make any edit to the page and save it, it seems to fix it again. Problem is days later it's back!

MediaWiki: 1.22.0 PHP: 5.3.26 (cgi-fcgi) MySQL: 5.5.35-cll 101.229.150.228 (talk) 05:30, 8 March 2014 (UTC)

When you see UNIQ in a page, that is the result of a bug in an extension. You probably have some extension that is causing this. What extensions do you have installed? MarkAHershberger(talk) 13:15, 13 March 2014 (UTC)
I only have one extension, UserMerge. It doesn't seem like this would be the cause but I've just disabled it to see if it'll fix the issue. 101.229.149.160 15:57, 19 March 2014 (UTC)
Although I also do have the Wiki Editor extension enabled by adding the following lines to LocalSetting.php:
require_once "$IP/extensions/WikiEditor/WikiEditor.php";
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
But this extension should be well tested no? 101.229.149.160 16:09, 19 March 2014 (UTC)
I've disabled all extensions but this is still happening! Please help! 58.34.17.95 14:52, 14 May 2014 (UTC)
After disabling extensions, you may need to perform a null edit on the page to purge the cached content. Edit the page, and save without touching anything, and see if the UNIQ string disappears. Ciencia Al Poder (talk) 09:41, 15 May 2014 (UTC)
Did the null edit but the UNIQ string stayed there.
However whenever I actually do make a change and save it, the UNIQ string goes away. 58.34.17.95 12:06, 15 May 2014 (UTC)
This is still happening... please help! 58.34.16.167 12:21, 1 June 2014 (UTC)
Still need help please. 58.34.16.167 15:44, 8 June 2014 (UTC)
Could you please post the complete UNIQ string?
Also, what code do you have on the page in the place where the UNIQ string appears? Ciencia Al Poder (talk) 17:51, 8 June 2014 (UTC)
I don't have the issue present right now cause I did a pointless edit to get rid of it but it looked like: "UNIQ698e32d4decd37c1-h-0--QINUI"
It happens to all my headers. 180.159.193.176 05:05, 14 June 2014 (UTC)
The complete UNIQ string contains the name of the parser tag that caused the UNIQ to appear, that's why I ask. Ciencia Al Poder (talk) 10:50, 14 June 2014 (UTC)
You can see the problem here http://appinvasion.com/wiki/Index 101.229.151.181 14:55, 20 June 2014 (UTC)
Thanks!
I see you have this in the page:
==New Pages==
{{Special:NewPages/25}}
==Latest Images==
{{Special:NewImages/25}}
==Recent Changes==
{{Special:RecentChanges/25}}
But there are no recent changes to display. That's what's causing the bug. If you remove those special page transclusions the error must go away.
That's bug 56167, which has been resolved in MediaWiki 1.23. You should also upgrade at least to 1.22.7, because several security bugs have been fixed for 1.22 Ciencia Al Poder (talk) 16:43, 20 June 2014 (UTC)
Thanks! 199.66.92.43 03:35, 22 June 2014 (UTC)
Here's the complete string:
UNIQ7cd9fc3a84d07057-h-0--QINUIntroduction
source is:
==Introduction== 101.229.151.181 14:58, 20 June 2014 (UTC)

[RESOLVED] hide main page title

hi how can I hide the main page title for http://pt-br.random-wikisaur.tk because when I use this code for common.css

body.page-Main_Page h1.firstHeading { display:none; }

it doesent work but it works on my English one at http://en.random-wikisaur.tk but wont work for my other page. it says on one of the pages on mediawiki that it wont work in mediawiki 1.22 or 23 I think it is the same common.css code for both my wikis please can I have some help

and please add this code


body.page-Main_Page h1.firstHeading { display:none; }

back to mediawiki so we can use it please 94.197.122.77 (talk) 14:12, 8 March 2014 (UTC)

Did you try the following code:
body.page-Página_principal h1.firstHeading { display:none; } Stryn (talk) 14:18, 8 March 2014 (UTC)
Stryn's idea is correct: It is the actual page name, which is used as CSS class in that rule. So when you have another page name, you need another rule. No magic. ;-) 88.130.88.22 14:35, 8 March 2014 (UTC)
hi it doesent work but there is a page on here that tell you that that code is no longer avaible in mediawiki 1.22 or 1.23 I think 94.197.122.91 15:16, 8 March 2014 (UTC)
nether mind it has hid the title thankyou I just cleared the cache 94.197.122.91 15:16, 8 March 2014 (UTC)
There is no code, which would have to be available; use the right rule and it will work. 88.130.88.22 15:48, 8 March 2014 (UTC)

[RESOLVED] Bundled extensions BreadCrumbs and InterWiki not working.

Just installed a new MediaWiki (MediaWiki 1.22.3 PHP 5.3.28 (cgi-fcgi) MySQL 5.5.32-31.0-log) with the extensions BreadCrumbs and InterWiki bundled. I copy and pasted code into LocalSettings that I believe is needed. (I'm new to most of this.) In Version special page I see: Interwiki (Version 2.2 20120425) and BreadCrumbs (Version 0.3.1). No BreadCrumbs appear. (On another older MediaWiki I successfully got JSBreadCrumbs extension to work, but that did not work on the new version, either.) Nothing shows up. For the InterWiki, I click on "View and edit interwiki data" in Data and Tools section and get:

Internal error [810ad34d] 2014-03-08 21:30:35: Fatal exception of type MWException. 

The site under construction is: http://albanyhilltowns.com/wikiGallupville/index.php?title=Main_Page

Below is text I pasted into Local Settings. Site is hosted by SiteGround. I have no access to anything except the files. Couldn't find anything dealing with these specific problems. Any help would be appreciated. - John

#Trying to get Breadcrumbs included with new edition to work

require_once( "$IP/extensions/BreadCrumbs/BreadCrumbs.php" );


$wgDefaultUserOptions['breadcrumbs-showcrumbs'] = true; # Set of the breadcrumbs should be shown or not
$wgBreadCrumbsAllowUPOs = true; # Allow users to edit their BreadCrumbs preferences
$wgBreadCrumbsShowAnons = true; # Show breadcrumbs to anonymous users
$wgDefaultUserOptions['breadcrumbs-preceding-text'] = ''; # Text to appear before breadcrumbs
$wgDefaultUserOptions['breadcrumbs-delimiter'] = '>'; # Set the delimiter between breadcrumbs
$wgDefaultUserOptions['breadcrumbs-numberofcrumbs'] = 8; # Set the number of breadcrumbs to be shown
$wgDefaultUserOptions['breadcrumbs-namespaces'] = true; # Show namespaces in breadcrumbs
$wgDefaultUserOptions['breadcrumbs-filter-duplicates'] = false; # Exclude a page from the breadcrumbs if it's already in the list once.
$wgDefaultUserOptions['breadcrumbs-ignore-refreshes'] = true; # Do not add a page to the breadcrumbs twice in a row

#trying to get InterWiki to work (included with edition)

require_once( "$IP/extensions/Interwiki/Interwiki.php" );
// To grant sysops permissions to edit interwiki data
$wgGroupPermissions['sysop']['interwiki'] = true;
 
// To create a new user group that may edit interwiki data
// (bureaucrats can add users to this group)
$wgGroupPermissions['developer']['interwiki'] = true;    #<---delete the comment indicator as appropriate

JElberfeld~mediawikiwiki (talk) 21:37, 8 March 2014 (UTC)

I have not checked your errors in detail, but they are most likely caused by this: The releases from last week contain the wrong extensions. The version, which is included, is not the one from the according branches, but it is some snapshot from the master branch. This breaks systems. Until this gets fixed (probably with the next release by the end of this month) you can use the extensions, which come with MediaWiki 1.22.2 instead. 88.130.88.22 22:53, 8 March 2014 (UTC)
I got BreadCrumbs to work (BreadCrumbs (Version 0.3.2)) with MW version 1.22.3, but no luck with InterWiki - tried all versions, same error as above.
EVEN WORSE: I can not edit pages because I have not confirmed my email, but I never receive a confirmation email. Using AOL mail - not in my spam folder. Retyped email, saved and resent confirmation - nothing received.
I thought of installing an older version of MediaWiki, but I am on SiteGround (ISP in England), and using Softaculous installer, my only options are 1.22.3 and 1.19. I have 6 wikis up and running using version 1.20.2 at http://www.AlbanyHilltowns.com linked using InterWiki. I wanted to add a seventh, but no luck so far. I don't want to go backwards in versions. My problem wiki is at http://albanyhilltowns.com/wikiGallupville/index.php?title=Main_Page - Am I alone with these problems? Has anybody found solutions? I am not a complete novice, but not much experience. Thanks, John. JElberfeld (talk) 21:57, 9 March 2014 (UTC)
I also tried setting up a new account with a different email using MW 1.22.3. Same problem. No confirmation email was received, so I can't do any work on the site. Very frustrating. Any solutions? JElberfeld (talk) 13:21, 10 March 2014 (UTC)
It's a work around. I set $wgEmailAuthentication = false. I'd like to keep email confirmation, but for now at least I can edit the pages. When there is a solution so I can reinstate email confirmation, please let me know. JElberfeld (talk) 23:58, 10 March 2014 (UTC)
Upgraded to 1.22.4 and the InterWiki works successfully. Not immediately - I set everything up, but it took about 20 minutes before the links worked as expected without error messages. No idea why. So be patient. JElberfeld (talk) 15:51, 13 March 2014 (UTC)
Yes, MediaWiki 1.22.4 fixed an issue with some bundled extensions being incompatible. Ciencia Al Poder (talk) 10:27, 14 March 2014 (UTC)

[RESOLVED] Limitations in common.css

Hi guys

I've got 80 entries in common.css to hide page titles like the below:

/* Remove titles on pages with special headings */ body.page-Main_Page h1.firstHeading { display:none; } body.page-Human_Resources h1.firstHeading { display:none; } body.page-IT h1.firstHeading { display:none; }

The issue i'm having is the last 3 entries in the list are not working.

Is there a limitation to how big the common.css page is? We are looking at extensions we can use to hide the page titles, but this requires support from our IT department to install - and generally takes time. Would be good to solve this without getting them involved if possible.

Cheers Annaisakiwi (talk) 22:50, 8 March 2014 (UTC)

No, I don't think there is such a limitation. The only limitation is the size of the field old_text in the database; the maximum size of this field is around 16,777 MB (not all in all, but per row, just to make that clear). If all you have is a few CSS rules, you will never, never, never come anywhere near that. From my experience I would guess: When the last three entries are not working, then the fourth-last entry is broken. Maybe a missing semicolon, maybe a missing bracket or something like that... To test you can copy your page code into an editor with syntax highlighting; that should show quickly, where the error is located. 88.130.88.22 23:07, 8 March 2014 (UTC)
Thanks for that, I've pasted my whole page into gedit and performed the highlighting - but nothing showing that I can see.
It definately feels like a limitation of sorts - if i move the end entries to the top, they work - and the pages now at the end don't.
Any other ideas? This really has me stumped Annaisakiwi (talk) 00:24, 9 March 2014 (UTC)
AND FIXED - amazingly this was due to a heading / page having a ' in it.
Cheers Annaisakiwi (talk) 00:31, 9 March 2014 (UTC)
Apostrophe is one of the signs, which are invalid for CSS class names. Other invalid signs are:
~ ! @ $ % ^ & * ( ) _ + - = , . / ' ; : " ? > < [ ] \ { } | ` #
Does MediaWiki somehow encode the apostrophe sign in the class name? 88.130.104.252 00:35, 9 March 2014 (UTC)
What MediaWiki does for the class name if there is an invalid character in it is it replaces the character with an underscore (_). So for example, if the page name is GeorgeBarnick's example page, the class name would be .page-GeorgeBarnick_s_example_page. GeorgeBarnick (talk) 01:20, 9 March 2014 (UTC)
Ok, so MediaWiki takes care to create valid class names. That means Anna from New Zealand will have to adjust her rules so that these signs are replaced by "_". 88.130.104.252 01:26, 9 March 2014 (UTC)
Thanks heaps everyone - makes alot of sense :-) Annaisakiwi (talk) 18:51, 9 March 2014 (UTC)
You can shorten the CSS code like this:
body.page-Main_Page h1.firstHeading,
body.page-Human_Resources h1.firstHeading,
etc { display:none; }
Ricordisamoa 13:51, 9 March 2014 (UTC)

Using transclusion to stop database growing huge?

Hello. I run the Logic Museum http://www.logicmuseum.com wiki. This uses some very large pages consisting of very large parts which don't change very much, with short introductions that do change quite a lot. When I edit the introduction, this adds the whole text to the version history, so the database goes up by 250k every time (for example). Can I stop the database growing so much if I put the large stable part into a separate file, then transclude the large file into the introductory file? Or does the database grow everytime I edit a file that includes a transcluded one? Thanks for any help. 86.132.251.238 (talk) 22:57, 8 March 2014 (UTC)

Hi!
> Can I stop the database growing so much if I put the large stable part into a separate file, then transclude the large file into the introductory file?
Yes, you can. With each edit the wikitext of exactly that page, which you edited gets saved in the database one more time. When this page is 250 kb in size, then the new record has a size of 250 kb; when it is only 4 kb, maybe because you split one article into many small parts, then it only grows by 4 kb.
You might also be interested in reducing the size of the database, which shows some further possibilities on how to make the DB smaller. 88.130.88.22 23:11, 8 March 2014 (UTC)
Cool many thanks. I'm intrigued by how the transcluder does this. Where does all the text come from? Does it build an html file on the fly in the browser? (This question for my interest - you have answered my main question). Thanks again. 86.132.251.238 23:15, 8 March 2014 (UTC)
The page is created by the MediaWiki parser. Basically it replaces all occurences of {{xxx}} with the content of the according page, which itself may again transclude something, which then....... ;-) The parsed version is finally sent to the browser and before that it is possibly cached so that it can be re-used without having to parse it all again. 88.130.88.22 23:19, 8 March 2014 (UTC)
Thanks! 86.132.251.238 23:22, 8 March 2014 (UTC)

Protecting pages

Hello,

I am trying to manage my company's intranet Wiki page.. the original creator is no longer here. I am definitely a beginning so please bear with me. My main task right now is to be able to "protect" some of the pages from editing by anyone except for the admin. It looks like to do that, I need to install an extension. And to do that, I need to know/have access to the original files and root folder. I don't know where any of that is. I'd like to provide the version of mediawiki we have, php, and database, but I don't know how to tell you any of that either. Would it help to start there? Or is there a simple html code I can place in a page to protect it?

Thank you, Jon 146.115.14.33 (talk) 23:29, 9 March 2014 (UTC)

Hi Jon!
Welcome aboard the MediaWiki admins!
What you want to do is easy - and even works without any extension. You btw. find version information on your wiki, PHP, Apache and so on in your wiki on the page Special:Version.
First check, that your wiki account is an administrator account. In your wiki check the wiki page Special:ListUsers. Does it list your account in the group "administrators"? 88.130.67.44 23:57, 9 March 2014 (UTC)

automatic translation

Hi,

I have a German Wiki and want to translate it to English. Is there any chance to get a script or an extension or a trick to translate the articles automatically? I only want to translate the standard words in the headlines and in the table captions, the text will be translated manually! 212.255.112.204 (talk) 09:48, 10 March 2014 (UTC)

Extension:Translate helps manual translators, and is also configurable to fetch machine translations from third-party services. Ricordisamoa 17:36, 11 March 2014 (UTC)
Great, thx! 212.255.113.142 10:08, 12 March 2014 (UTC)

Email notification on certain word

Hello all,

We want to implement a notification alert when someone is using a certain word/tag.

For example, when someone is writing an sentence which contains SQL word we need to receive an email to a specific address (sql@domain.tld) or exchange to be sent to another email addreess(exchange@domain.tld).

Regards, Andrei 193.108.52.147 (talk) 12:01, 10 March 2014 (UTC)

The question is if it is possible ?
Thanks in advance !
Andrei 193.108.52.147 13:23, 10 March 2014 (UTC)
It is possible in the sense that a lot of things are possible. However this is something that would require some custom programming since it isn't a built-in feature. MarkAHershberger(talk) 13:14, 13 March 2014 (UTC)
Rough sketch: Pick one of the hooks, through which content is handed during save, in this hook parse the content for your keyword(s) and if found send a mail. Sounds easy... 88.130.76.178 13:23, 13 March 2014 (UTC)

image borders

Hi, I am trying to get the borders to appear on images using border parameter like so "File:Image.png:border". It's not working as the border does not appear. What am I doing wrong. Thanks in advance. 208.0.98.177 (talk) 16:28, 10 March 2014 (UTC)

Hi, what you need to do is pretty simple. There's two ways to do it, actually:
[[File:Image.png|thumb]]
or
[[File:Image.png|frame]]
Hope that helps! GeorgeBarnick (talk) 16:30, 10 March 2014 (UTC)
[[File:Image.png|border]]
Ricordisamoa 17:07, 11 March 2014 (UTC)

old_user = 0 ??

Hey All,

I upgraded my MediaWiki install from an old install that hasn't been updated in years.. Not I am trying to clean up some things And I notice that there is now a pfx_text & pfx_text_new table. The NEW table has nothing in it and the text table has about a Gig of data. Now going through the text table I notice there are alot of entries where old_user = 0.. What does that mean? What user is that?

Thanks, -Bill 69.198.41.161 (talk) 18:38, 10 March 2014 (UTC)

Hi Bill!
A table called "text_new" is not used by MediaWiki. If the wiki works correctly, you can remove it. The text table is expected to contain all the texts, from nearly all the revisions in your wiki. Depending on the size of your wiki, this table can be huge. See DB for an overview of the tables.
For the text table, when you updated to a current version, you might find the notes on the page text table helpful; bottomline: You can remove this column. 88.130.82.69 22:31, 10 March 2014 (UTC)

[RESOLVED] No wiki rendered - text OK.

I'm running 1.19.12, PHP 5.5.10, MySQL 5.1.73 on site test.aa6e.net.

This site was running fine, but today I find that my pages are not displaying. The page menu at left is OK. If I select a page, the correct frame shows up with no errors, but the contents are blank. If I select "edit" or "view source", I can see that the wiki text is still there. The pages are just not rendering on screen.

Could this be related to the change to daylight savings? To the 1.19.12 update? What to check?

TIA, Martin 98.216.172.32 (talk) 02:27, 11 March 2014 (UTC)

Hi Martin,
the HTML source code of your page does not contain the page content:
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
<!-- 
NewPP limit report
Preprocessor node count: 3/1000000
Post‐expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
Expensive parser function count: 0/100
-->
<!-- Saved in parser cache with key db455160277:pcache:idhash:2-0!*!*!*!*!*!* and timestamp 20140311022943 -->
</div>
where there instead should be the actual content. This looks like somehow the complete page content is not rendered currently. Although you use a custom skin, this problem is also present for other skins, e.g. for Monobook. It also seems not to depend on a certain page; in my tests this is the output for all content pages.
I thought you might have wrong content in cache, but trying to clear the cache shows this: http://test.aa6e.net/wiki/Internet_Service_Providers?action=purge Also on the "purge cache" page the page "content" is missing. The same for special pages like Special:Version. Strange...
Yes, if you changed anything in the last time, try changing it back; maybe you set something, which somehow influences how content is rendered; I am not sure, if a daylight saving setting might be relevant here, though.
Maybe this is also somehow caused by the extensions in the 1.19.12 tarball, which are wrong. This should be fixed by the upcoming release of this evening. 88.130.82.69 03:26, 11 March 2014 (UTC)
See Manual:Errors and symptoms#All pages have no content, but when editing a page the wiki text is there Ciencia Al Poder (talk) 10:42, 11 March 2014 (UTC)
In this case, an upgrade to MediaWiki 1.22.3 or a downgrade of the PCRE extension would solve the issue. 88.130.106.27 16:12, 11 March 2014 (UTC)
[RESOLVED] Thanks to all. I applied the patch as suggested in links above, and things are working. It's not clear to me when the problem started. Did it come in through the ill-fated upgrade to 1.19.12? It seems likely. Will 1.19.13 (now overdue) repair the problem? Hopefully, it will not conflict with the patch I just installed! martin@aa6e.net 00:42, 12 March 2014 (UTC)
When you update to 1.19.13, you will have to apply your patch again as it was not backported to this branch. An upgrade to MediaWiki 1.22.3 or a downgrade of the PCRE extension would really solve the issue. 88.130.106.27 01:36, 12 March 2014 (UTC)
No, MediaWiki 1.19.12 didn't introduced the problem. The cause is a new version of PCRE that was insalled on your server, probably as a package upgrade/update. Ciencia Al Poder (talk) 10:40, 12 March 2014 (UTC)

Hi

We create a WIKIpedia in our inner intranet of our factory.

We tried to make a link from a page in the wiki to one of the directories in the local computer .

The syntax of the link that we tried (for example) was : [file://C:\temp] - to create a link to the directory temp in disk C.

It did'nt work !! What is the problem ??

(we activate our wikipedia in the intranet from the same computer)

Hopping for quick answere.

best regards

baruch B51aruch (talk) 13:32, 11 March 2014 (UTC)

I hope you did not create another Wikipedia but installed MediaWiki instead to create a wiki. Is $wgUrlProtocols in your LocalSettings.php set to allow local files? AKlapper (WMF) (talk) 10:38, 12 March 2014 (UTC)

Templates not working

Hi,

I'm a new Mediawiki user. My templates are not working, I tried to use the Multiple_image, but it shows "Template:Multiple image" and if I go to the Template:Multiple image there is nothing in the code. Probably I don't have the templates installed. How can I fix that? 150.163.55.48 (talk) 14:32, 11 March 2014 (UTC)

You copy the content of the template Foobar into a page with the name "Template:Foobar". AKlapper (WMF) (talk) 10:39, 12 March 2014 (UTC)
Import Ricordisamoa 13:38, 12 March 2014 (UTC)

Getting values from other templates in nested templates

Hi,

I have an infobox template with a field "gender" which could be male or female. In that template I'd like to use template "shoe size". I'd like to add it to the article like this:

{{Infobox
| gender = female
| shoe size = {{Shoe size|US=6}}
}}

In the "shoe size" template, I'd like to get the "gender" value from the infobox. Can I do that? I tried to use {{{gender}}}, but that will probably just look for a gender value in template "shoe size". I also tried {{{Infobox|gender}}} and even {{{Template:Infobox|gender}}} (also with two brackets only) but that's probably nonsense, at least none of the above approaches seem to work.

Any ideas anyone?

Thanks and cheers, Till Kraemer (talk) 14:47, 11 March 2014 (UTC)

No, you can't do that.
But you can include {{shoe size}} inside {{Infobox}}
{{Infobox
| gender = female
| shoe size = 6
| shoe region = US
}}
And inside Infobox:
{{Shoe size|{{{shoe region}}}={{{shoe size}}}}}
Ciencia Al Poder (talk) 10:45, 12 March 2014 (UTC)

Deleting or Editing a page on Wikisuppliers

Hi there, I'm sorry if I am asking this in the wrong place.

I want to delete a company page from wikisuppliers but there seems to be no way to do it :/ I can't even register, the website only has a login feature.

Can someone help me with this? MroloManequins123 (talk) 16:59, 11 March 2014 (UTC)

This
http://apparel.wikisuppliers.com/wiki/Special:Contributions/Admin
is the only admin in this wiki; he is the one, who can do that. However, he seems not to be very active lately... 88.130.106.27 17:16, 11 March 2014 (UTC)
Thanks for the help!
How can I contact him since I can't register a new account there? Is it possible through mediawiki? MroloManequins123 (talk) 18:08, 11 March 2014 (UTC)
When you don't have an account there...difficult.
Maybe you can use the whois information to send the person responsible for the website a mail. 88.130.106.27 19:20, 11 March 2014 (UTC)

not search wildcard begin *word

Hello, I am toni. I am using Mediawiki and I am seeing that searching It not find words when I use wildcard beginning *. for example, to find the words beginning house --> *ouse

Thank you. 217.156.195.245 (talk) 18:04, 11 March 2014 (UTC)

Correct, and I wonder what the usecase for such a search is. Could you elaborate what you want to do and why? AKlapper (WMF) (talk) 10:40, 12 March 2014 (UTC)
The first, the same that to search with * at last of the word.
the second, for example: ecology biology I put *logy 217.156.195.245 13:02, 12 March 2014 (UTC)
I see. bugzilla:4021 implies that it should work. :-/ AKlapper (WMF) (talk) 13:14, 12 March 2014 (UTC)
Thank you very much for you attencion. 217.156.195.245 13:41, 12 March 2014 (UTC)

Editing wikipedia with java api jwbf

Hi,

i'm a new user editing wikipedia using the java api jwbf,

as i'm editing it with robots, i want to practice a lot before i run my robots with real wikipedia articles,

so, i wonder if the wiki provide us some articles that you can edit in any ways and you are not being perjudicial to any other wikipedia user

regards ! Augt.pelle (talk) 20:33, 11 March 2014 (UTC)

Use Test Wikipedia or Test2 Wikipedia for testing purposes. Ricordisamoa 13:32, 12 March 2014 (UTC)
Thanks !
and i take this chance and i ask another question , that is flying in my mind
i use the java api jwbf to query the wiki,
and i was wondering why my code is wrong when i try to upload a file:
MediaWikiBot b = new MediaWikiBot("https://commons.wikimedia.org/w/api.php");
b.login("my user", "my pass");
File file = new File("my file url");
SimpleFile sp = new SimpleFile(file);
FileUpload fu = new FileUpload(sp, b);
b.performAction(fu);
The code compiles well, but when i log in the wikipedia commons page, i don't find the new file i'm uploading
Regards !!! Augt.pelle (talk) 14:29, 14 March 2014 (UTC)
commons:Special:ListFiles/Augt.pelle lists two files. Were you trying to upload something else? Ricordisamoa 14:35, 14 March 2014 (UTC)
i'm trying to upload at commons.wikimedia.org
and i'm using more than one api wrapper, but the problem is that there's no documentation, i feel like i've tryed all and nothing works,
i just want to upload files from java using a wrapper that makes me posible to intereact with mediawiki api in a friendly way Augt.pelle (talk) 15:23, 17 March 2014 (UTC)
Is your file's extension accepted at Commons? Ricordisamoa 03:01, 18 March 2014 (UTC)

Suggestions for how to replicate wiki

I am looking for suggestions on how to achieve a replica wiki. Where there is a master wiki.. but also a replica that is kept in sync with the master on another machine. Usage case is availability of the wiki if the link to the site where the master wiki is kept goes down. Database replicas? rsyncs to keep the filesystem synced? etc.. Replica wiki should be read only to prevent edits where they do not belong?

Thank you. 98.166.96.171 (talk) 02:42, 12 March 2014 (UTC)

You can have several different machines running MediaWiki behind a load balancer but interacting with a single database. So, this is really a question about how to handle database replication. MarkAHershberger(talk) 13:54, 13 March 2014 (UTC)

How to use EmbedVideo extension (or any other)?

Hi,

Basically I would like to embed a youtube video on a media wiki pages. There seem to be a number of extensions available to do this, so I just selected this mediawiki-embedvideo extension: http://www.mediawiki.org/wiki/Extension:EmbedVideo.

I followed the description downloading and saving the package and adding the require_once line to the Localsettings file. Finally I try to embed a video, as provided in the example: {{#ev:youtube|dMH0bHeiRNg}}

When doing so, I just get a full blank page, including the menu on the side of the mediawiki. When checking the special:version page, The EmbedVideo extentsion (version 1.1) is there, so that seems to be fine.

Any idea on how I can solve this?

My system: MediaWiki 1.19.8+dfsg-1 PHP 5.5.3-1ubuntu2.2 (apache2handler) MySQL 5.5.35-0ubuntu0.13.10.2 Not possible to share the link itself, it is on a restricted network. 134.58.253.57 (talk) 07:31, 12 March 2014 (UTC)

First, add
 error_reporting( -1 );
 ini_set( 'display_errors', 1 );

to your LocalSettings.php file and see if any errors are displayed. If none are, try enabling debugging and see if the file shows you anything.

Also, you should upgrade to the latest point release for MW 1.19. Since it looks like you are using a Debian package, this should happen pretty easily. https://packages.debian.org/jessie/mediawiki MarkAHershberger(talk) 13:50, 13 March 2014 (UTC)

Add some Mediawiki pages for scribunto documentation

This post by 86.135.252.13 was moved on 2015-07-11. You can find it at Project:Village Pump/Flow/2014#Add some Mediawiki pages for scribunto documentation. Ciencia Al Poder (talk) 10:48, 12 March 2014 (UTC)

help keyword not getting searched in mediawiki??

I am using Mediawiki 1.20. The "help" keyword is not getting searched in my wiki. Please tell some changes so that it starts getting searched Rebeccabrown11 (talk) 11:21, 12 March 2014 (UTC)

Are any searches successful? Are you using any extensions for search or just the built-in search?
It sounds like you are expecting some particular results for the help "keyword" but I'm not familiar with what you would want. Are you looking for something besides instances of "help" in the page text? MarkAHershberger(talk) 13:02, 13 March 2014 (UTC)

[RESOLVED] WikiEditor toolbar icons are missing

I've just updated to 1.24 today and have just noticed that my editor has no icons now. I can't be certain that the upgrade has caused this because I haven't edited any pages for a while. I have tried uploading the wikieditor extension but that has made no difference.

The toolbar actions still seem ok. If I hover over where the icons used to be, I am able to use the tooltips to see where I am on the toolbar. My wiki can be found at http://wiki.mfo.me.uk if that helps.

Cheers Roger 86.137.59.197 (talk) 14:57, 12 March 2014 (UTC)

You have updated to 1.22.4.
The problem is that in the wiki editor toolbar the actual images for the icons are not displayed.
When I check that with Firebug, then I see that there is a background image (some sprite) assigned to each of the buttons, but this image is not used:
Instead, this background style takes precedence:
background-image: none
Applied rule:
#content a:link	{background-image: none; }
When I manually disable this rule with Firebug, I see the icons again.
Now you need to find out, where this style is coming from. It might help to set the MediaWiki resource loader into debugging mode for that; however, just with adding &dbug=true I did not manage to see the toolbar at all. 88.130.121.219 15:38, 12 March 2014 (UTC)
Since the problem is also present in other skins, I concluded that the offending rule might be located in MediaWiki:Common.css and voila:
http://wiki.mfo.me.uk/index.php?title=MediaWiki:Common.css
contains exactly what is currently breaking the toolbar. You should change the rule in a way so that it does (at least) no longer apply to the toolbar. 88.130.121.219 16:06, 12 March 2014 (UTC)
Sir, you are brilliant! Thank you very much. I would never have found that!! 86.137.59.197 16:50, 12 March 2014 (UTC)
I've got the same problem after upgrading to 1.24. I've updated my MediaWiki:Common.css to be the same as the one on Wikipedia and I also updated the WikiEditor extension to the REL1_24 branch. Care to elaborate about how to fix it, possibly without changing MediaWiki:Common.css as it is working that way on Wikipedia? Richie765 (talk) 20:11, 7 December 2014 (UTC)

[RESOLVED] add google ads embedded in page content

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I would like to add google ads after the first paragraph on every page on my wiki.
I have a code that checks if a tag is there, if it isn't then the tag is added and this tag calls the code for the google ads.
However, the rest of the text on the page is not showing after the ads.
This is my code: (based on the AdsWhereever extension)
<?php
$wgHooks['ParserFirstCallInit'][] = 'AdsSetup'; $wgHooks['EditPage::showEditForm:initial'][] = 'CheckHasTag';
function AdsSetup( &$parser ) { $parser->setHook( 'ads', 'AdsRender' ); return true; }
function AdsRender($input, $args ) {    
$input ="";
$url = array();
global $wgOut;
$ad['goo1'] = '<html><br><script type="text/javascript">
			google_ad_client = "xxx";
			google_ad_width = 728;
			google_ad_height = 90;
			</script>
			<script type="text/javascript"
			src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
			</script><br></html>';
	$media = $args['media'];
	return $ad[$media];
}
// check if content has <goo1> tag
function CheckHasTag($editPage){
	global $wgOut;
	$wgOut->addScript('<script type="text/javascript">
	var editTextboxText = document.getElementById("wpTextbox1").value;
	var searchFor = "goo1";
	var searchResult = editTextboxText.search(searchFor);
	if(searchResult == -1){
		var a = editTextboxText;
		var b = "\n<ads media=goo1>\n";
		var findP = "\n"; 
		var p = editTextboxText.search(findP);
		var position = p;
		document.getElementById("wpTextbox1").value = a.substr(0, position) + b + a.substr(position);
	}</script>');
	return true;
}
LTech (talk) 08:02, 13 March 2014 (UTC)
Looking at your code, I see that:
  1. You inject JavaScript on edit pages
  2. JS inserts <ads media=goo1> inside the textarea on client side (!!) (when it doesn't exists)
    • Note that you insert an unclosed tag <ads media=goo1>. It should be <ads media=goo1 /> instead. That may be the reason for the rest of the text to not be displayed, since it's inside of that unclosed tag.
  3. On AdsRender, you're inserting HTML in place of the ads tag
Thank you so so much. <ads media=goo1 /> solved it! LTech (talk) 10:27, 24 March 2014 (UTC)
Where that code should go, and is it posibble to pass the same code to the 5th or 6th paragraph or even heading title 2001:8F8:1E23:DE9:D69:567F:9778:F6C1 (talk) 21:54, 24 August 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

how to Permanently delete a wiki page

I'm sysop (admin) in my wiki . I delete a lot of spam pages, it removes them from public but still it's not removed (still undelete option). These deleted pages are still being shown in the search results..!! Who can remove it permanently and how. Rebeccabrown11 (talk) 10:39, 13 March 2014 (UTC)

The maintenance script deleteArchivedRevisions.php allows you to remove all deleted revisions. Alternatively, the maintenance script nukePage.php allows you to delete selected pages. For this script to work, you will have to undelete the revisions first.
Another possibility - which I prefer - is this: Go to the archive table in your database, choose the revisions, which you do no longer want and delete them from the table. When you are done, run the maintenance script purgeOldText.php in order to remove unused entries from the text table. 88.130.121.219 12:01, 13 March 2014 (UTC)
Extension:DeletePagePermanently (unsafe) Ricordisamoa 13:47, 13 March 2014 (UTC)

[RESOLVED] iSC Dev BP Wiki - problem: picture & thumb

My Versions:

  • MediaWiki: 1.22.3
  • PHP: 5.5.5 (cgi-fcgi)
  • MariaDB : 5.5.33a-MariaDB

My Problem:
I can't display the image and thumb of iSC Dev BP Wiki. Read also User_talk:Kghbln/Archive/StructuredDiscussions/2014#iSC_Dev_BP_Wiki_-_problem:_picture. Suriyaa Kudo (iSC Inc.) (talk) 15:25, 13 March 2014 (UTC)

So, what are the permissions under your images directory? MarkAHershberger(talk) 16:11, 13 March 2014 (UTC)
777 Suriyaa Kudo (talk) 16:15, 13 March 2014 (UTC)
Are you running this on a RedHat server? Are you using selinux? MarkAHershberger(talk) 17:33, 13 March 2014 (UTC)
I don't know. But my website is on bplaced.net. Suriyaa Kudo (talk) 17:46, 13 March 2014 (UTC)
It's throwing a "Cannot contact the database server" error. Which is strange since other pages load fine. I'd set up a debug log as explained in Manual:How to debug, it may give you more details about what's going on just before getting the error. Maybe MediaWiki is trying to fetch data of the image from a different database?
Posting details about your configuration settings about images may help. Ciencia Al Poder (talk) 10:37, 14 March 2014 (UTC)
So I must this code from Manual:How to debug to LocalSettings.php:
$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;
$wgShowDBErrorBacktrace = true;
to show the error, right? Suriyaa Kudo (talk) 14:22, 14 March 2014 (UTC)
I was thinking about setting a debug log file. For example:
$wgDebugLogFile = "/tmp/wikidebug.log";
Be sure to point the debug log to a path writable by the web server.
$wgShowDBErrorBacktrace = true; may also help. Ciencia Al Poder (talk) 16:10, 14 March 2014 (UTC)
right. MarkAHershberger(talk) 16:15, 14 March 2014 (UTC)

I create the folder

/temp

now how can I create the

wikidebug.log

??? Suriyaa Kudo (talk) 16:21, 14 March 2014 (UTC)

If you created that /temp directory in your wiki installation, you need to make sure it is writable by the webserver (usually "chmod 777 temp" would do that) and then you need to put
$wgDebugLogFile = "$IP/temp/wikidebug.log";
in your LocalSettings.php file. MarkAHershberger(talk) 16:26, 14 March 2014 (UTC)
I added $wgDebugLogFile = "$IP/temp/wikidebug.log"; to my LocalSettings.php and changed the file /temp to 777.
What I must do now? Suriyaa Kudo (talk) 11:52, 16 March 2014 (UTC)
And I want to tell you that I cange the image databank.
Also I change & added the LocalSettings.php from Pool Wiki:
## Uploads
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
$wgForeignFileRepos[] = array(
   'class'            => 'FSRepo',
   'name'             => 'sharedFsRepo',
   'directory'        => 'images/',
   'hashLevels'       => 0,
   'url'              => 'http://suriyaakudo.bplaced.net/pool/images/',
);
$wgDebugLogFile = "$IP/temp/wikidebug.log";
$wgShowDBErrorBacktrace = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;
$wgShowDBErrorBacktrace = true;
# Add new types to the existing list from DefaultSettings.php
 $wgFileExtensions[] = 'doc';
 $wgFileExtensions[] = 'xls';
 $wgFileExtensions[] = 'pdf';
 $wgFileExtensions[] = 'mpp';
 $wgFileExtensions[] = 'odt';
 $wgFileExtensions[] = 'ods';
 $wgFileExtensions[] = 'svg';
Suriyaa Kudo (talk) 12:51, 16 March 2014 (UTC)
The configuration seems fine, although apparently you should be using ForeignDBRepo instead of FSRepo, as explained in Manual:$wgForeignFileRepos. Maybe that's the problem, and FSRepo became incompatible on a recent version.
As for the debug log, you should set it up, load a page that throws the error, and disable the debug log again, since it will grow without limit until it fills up the space on your server. Ciencia Al Poder (talk) 10:33, 17 March 2014 (UTC)
Is that ok?:
## Uploads
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
$wgForeignFileRepos[] = array(
   'class'            => 'ForeignDBRepo ',
   'name'             => 'sharedForeignDBRepo ',
   'directory'        => 'images/',
   'hashLevels'       => 0,
   'url'              => 'http://suriyaakudo.bplaced.net/pool/images/',
);
$wgDebugLogFile = "$IP/temp/wikidebug.log";
$wgShowDBErrorBacktrace = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;
$wgShowDBErrorBacktrace = true;
# Add new types to the existing list from DefaultSettings.php
 $wgFileExtensions[] = 'doc';
 $wgFileExtensions[] = 'xls';
 $wgFileExtensions[] = 'pdf';
 $wgFileExtensions[] = 'mpp';
 $wgFileExtensions[] = 'odt';
 $wgFileExtensions[] = 'ods';
 $wgFileExtensions[] = 'svg';
Suriyaa Kudo (talk) 17:40, 17 March 2014 (UTC)
Looking at Manual:$wgForeignFileRepos, ForeignDBRepo has some more parameters. Could you please follow the documentation?. Also, your code has extra spaces that will cause problems. Ciencia Al Poder (talk) 20:08, 17 March 2014 (UTC)
And now:
## Uploads
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
if ( $wgUseSharedUploads ) {
  if ( $wgSharedUploadDBname ) {
    $wgForeignFileRepos[] = array(
      'class' => 'ForeignDBRepo',
      'name' => 'shared',
      'directory' => $wgSharedUploadDirectory,
      'url' => $wgSharedUploadPath,
      'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
      'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
      'transformVia404' => !$wgGenerateThumbnailOnParse,
      'dbType' => $wgDBtype,
      'dbServer' => myDBserver,
      'dbUser' => myDBusername,
      'dbPassword' => myDBpassword,
      'dbName' => $wgSharedUploadDBname,
      'dbFlags' => ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT,
      'tablePrefix' => $wgSharedUploadDBprefix,
      'hasSharedCache' => $wgCacheSharedUploads,
      'descBaseUrl' => $wgRepositoryBaseUrl,
      'fetchDescription' => $wgFetchCommonsDescriptions,
    );
  } else {
    $wgForeignFileRepos[] = array( 
      'class' => 'FSRepo',
      'name' => 'shared',
      'directory' => $wgSharedUploadDirectory,
      'url' => $wgSharedUploadPath,
      'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
      'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
      'transformVia404' => !$wgGenerateThumbnailOnParse,
      'descBaseUrl' => $wgRepositoryBaseUrl,
      'fetchDescription' => $wgFetchCommonsDescriptions,
    );
  }
}
$wgForeignFileRepos[] = array(
   'class'                   => 'ForeignAPIRepo',
   'name'                    => 'shared',
   'apibase'                 => 'http://commons.wikimedia.org/w/api.php',
   'fetchDescription'        => true, // Optional
   'descriptionCacheExpiry'  => 43200, // 12 hours, optional (values are seconds)
   'apiThumbCacheExpiry'     => 43200, // 12 hours, optional, but required for local thumb caching
);
$wgForeignFileRepos[] = array(
    'class' => 'ForeignDBRepo',
    'name' => 'otherwiki',
    'url' => "http://pool.suriyaakudo.bplaced.net/images",
    'directory' => 'http://pool.suriyaakudo.bplaced.net/images',
    'hashLevels' => 2, // This must be the same for the other family member
    'dbType' => $wgDBtype,
    'dbServer' => $wgDBserver,
    'dbUser' => $wgDBuser,
    'dbPassword' => $wgDBpassword,
    'dbFlags' => DBO_DEFAULT,
    'dbName' => 'mydb',
    'tablePrefix' => 'mw_',
    'hasSharedCache' => false,
    'descBaseUrl' => 'http://pool.suriyaakudo.bplaced.net/Image:',
    'fetchDescription' => true
);
$wgDebugLogFile = "$IP/temp/wikidebug.log";
$wgShowDBErrorBacktrace = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;
$wgShowDBErrorBacktrace = true;
# Add new types to the existing list from DefaultSettings.php
 $wgFileExtensions[] = 'doc';
 $wgFileExtensions[] = 'xls';
 $wgFileExtensions[] = 'pdf';
 $wgFileExtensions[] = 'mpp';
 $wgFileExtensions[] = 'odt';
 $wgFileExtensions[] = 'ods';
 $wgFileExtensions[] = 'svg';
? Suriyaa Kudo (talk) 16:07, 18 March 2014 (UTC)
Does it solve the problem? If not, are the following variables properly configured?
'dbType' => $wgDBtype,
'dbServer' => $wgDBserver,
'dbUser' => $wgDBuser,
'dbPassword' => $wgDBpassword,
'dbFlags' => DBO_DEFAULT,
'dbName' => 'mydb',
'tablePrefix' => 'mw_', Ciencia Al Poder (talk) 10:28, 19 March 2014 (UTC)
This is coming: http://pool.suriyaakudo.bplaced.net/. :-( Suriyaa Kudo (talk) 15:29, 19 March 2014 (UTC)
The error is pretty informative. Could you please look at that file and line and see what's going on (and maybe try to fix it yourself)? Or at least copy the relevant lines here, otherwise how do you think we can help you? Ciencia Al Poder (talk) 10:11, 20 March 2014 (UTC)
I typed the same like this:
## Uploads
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
if ( $wgUseSharedUploads ) {
  if ( $wgSharedUploadDBname ) {
    $wgForeignFileRepos[] = array(
      'class' => 'ForeignDBRepo',
      'name' => 'shared',
      'directory' => $wgSharedUploadDirectory,
      'url' => $wgSharedUploadPath,
      'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
      'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
      'transformVia404' => !$wgGenerateThumbnailOnParse,
      'dbType' => $wgDBtype,
      'dbServer' => myDBserver,
      'dbUser' => myDBusername,
      'dbPassword' => myDBpassword,
      'dbName' => $wgSharedUploadDBname,
      'dbFlags' => ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT,
      'tablePrefix' => $wgSharedUploadDBprefix,
      'hasSharedCache' => $wgCacheSharedUploads,
      'descBaseUrl' => $wgRepositoryBaseUrl,
      'fetchDescription' => $wgFetchCommonsDescriptions,
    );
  } else {
    $wgForeignFileRepos[] = array( 
      'class' => 'FSRepo',
      'name' => 'shared',
      'directory' => $wgSharedUploadDirectory,
      'url' => $wgSharedUploadPath,
      'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
      'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
      'transformVia404' => !$wgGenerateThumbnailOnParse,
      'descBaseUrl' => $wgRepositoryBaseUrl,
      'fetchDescription' => $wgFetchCommonsDescriptions,
    );
  }
}
$wgForeignFileRepos[] = array(
   'class'                   => 'ForeignAPIRepo',
   'name'                    => 'shared',
   'apibase'                 => 'http://commons.wikimedia.org/w/api.php',
   'fetchDescription'        => true, // Optional
   'descriptionCacheExpiry'  => 43200, // 12 hours, optional (values are seconds)
   'apiThumbCacheExpiry'     => 43200, // 12 hours, optional, but required for local thumb caching
);
$wgForeignFileRepos[] = array(
    'class' => 'ForeignDBRepo',
    'name' => 'otherwiki',
    'url' => "http://pool.suriyaakudo.bplaced.net/images",
    'directory' => 'http://pool.suriyaakudo.bplaced.net/images',
    'hashLevels' => 2, // This must be the same for the other family member
    'dbType' => $wgDBtype,
    'dbServer' => $wgDBserver,
    'dbUser' => $wgDBuser,
    'dbPassword' => $wgDBpassword,
    'dbFlags' => DBO_DEFAULT,
    'dbName' => 'mydb',
    'tablePrefix' => 'mw_',
    'hasSharedCache' => false,
    'descBaseUrl' => 'http://pool.suriyaakudo.bplaced.net/Image:',
    'fetchDescription' => true
);
$wgDebugLogFile = "$IP/temp/wikidebug.log";
$wgShowDBErrorBacktrace = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;
$wgShowDBErrorBacktrace = true;
# Add new types to the existing list from DefaultSettings.php
 $wgFileExtensions[] = 'doc';
 $wgFileExtensions[] = 'xls';
 $wgFileExtensions[] = 'pdf';
 $wgFileExtensions[] = 'mpp';
 $wgFileExtensions[] = 'odt';
 $wgFileExtensions[] = 'ods';
 $wgFileExtensions[] = 'svg';
Suriyaa Kudo (talk) 16:59, 20 March 2014 (UTC)
The wiki loads now for me, so I guess you fixed it after all Ciencia Al Poder (talk) 20:37, 20 March 2014 (UTC)
But I can't upload any files! Link: http://suriyaakudo.bplaced.net/pool/index.php?title=Special:Upload Suriyaa Kudo (talk) 14:24, 21 March 2014 (UTC)
This is going to take forever... So you point me to a page restricted to logged in users, without an explanation of what happens and why you can't upload (what prevents the files from being uploaded, etc).
Ok, I've took the effort to create an account just to test what happens. And it just gives an error when uploading.
Please don't come back without setting $wgShowExceptionDetails = true; in your LocalSettings and giving a complete stack trace of the error. See Manual:How to debug Ciencia Al Poder (talk) 16:22, 21 March 2014 (UTC)
I found it!
I found this here.
For me this settings in LocalSettings.php worked:
$wgEnableUploads = true;
$wgUseImageMagick = false;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgTmpDirectory = "$IP/images/temp";
and create "temp" folder in /images.
Done it: http://suriyaakudo.bplaced.net/wikis/iscdevbpwiki/mw/mediawiki-1.22.6/index.php?title=File:Sonnenuntergang.jpg
Thanks for your help. :-D Suriyaa Kudo (talk) 12:50, 17 May 2014 (UTC)

Extensions need updating on git

Hi some extension have been updated regular on git hub but not on git please update it on git because wikibase was updated and support 0.7 on wikibase datamodel but was not updated on git and diff 90.219.225.13 (talk) 19:49, 13 March 2014 (UTC)

Where on Git? 88.130.76.178 21:06, 13 March 2014 (UTC)
That is a request that you should give directly to the Wikibase developers. For example, open an issue on github. MarkAHershberger(talk) 16:15, 14 March 2014 (UTC)

Parse Tag on saving page

Hello,

depending on wether a certain own created tag is available in a page I'd like to perfom an action on saving the page.

For this purpose the PageContentSave-hooks seems to be the right one. But how can I look there wether the tag ist in the content or not?

Or is there a better way? Finswimmer (talk) 11:23, 14 March 2014 (UTC)

Hi!
The hook Manual:Hooks/PageContentSave gives you access to the new page content before it is saved; sounds like where you want to hook in. When you hand its content to a function as shown on the manual page:
public static function onPageContentSave( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $status ) { ... }
then you will have the content object in the variable $content. Somehow it surely is possible to get the content of the page out of $content; I think that should work with one of the functions from ContentHandler.php; maybe getContentText. You can then do things with the text content like you can compare it with a string or do a preg_match on some regexp. Basically you can then use all the functions PHP offers to work on strings. 88.130.97.79 12:57, 14 March 2014 (UTC)

max-width in Vector skin to control site layout width

It's one of the dumber design aspects of MediaWiki and Wikipedia and their skins that the site fills 100% of the screen width, regardless of resolution, leading to a ridiculous appearance on high resolution monitors.
Short of a grid layout or other sophisticated approaches, what is required is a sensible max-width for the entire site layout, in the order of 1000 - 1300 px I suggest, allowing the site to scale horizontally below that but freeze on decent res screens.
I had a bunch of CSS modifications for Monobook that worked well, but they made use of the #globalWrapper which is not present in Vector. I am trying to migrate my old Monobook styling across to Vector.
I played around with adding styles to the various page elements in Vector, and even the <body> tag, but ended up frustrated trying to get the header and sidebar elements to cooperate.
Has anyone worked out some CSS for Vector that does the trick? 111.69.202.141 (talk) 11:27, 14 March 2014 (UTC)
This is as close as I can get:
/* upper blue line */
#mw-head-base {
	margin-left: auto !important;
	margin-right: auto !important;
  max-width: 1000px !important;
}
/* lower blue line + footer content */
#footer {
	margin-left: auto !important;
	margin-right: auto !important;
  max-width: 1000px !important;
}
/* main content */
#content {
	margin-left: auto !important;
	margin-right: auto !important;
  max-width: 1000px;
}
MarkAHershberger(talk) 16:12, 14 March 2014 (UTC)
Yep I got about as far myself.
  1. mw-page-base can be styled similarly but the page tabs, personal links, and the sidebar (which would now float over top of the content on lower resolutions) stump me. 111.69.202.141 14:36, 15 March 2014 (UTC)
Just came up with something I like a little better:
/* upper blue line */
#mw-head-base {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 1000px !important;
}
/* lower blue line + footer content */
#footer {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 1000px !important;
}
/* main content */
#content {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 1000px;
}
#bodyContent {
	z-index: 10;
}
#mw-navigation {
	margin-right: auto !important;
	max-width: 1190px;
        min-width: 1000px;
	position: absolute;
	top: 0;
        left: 50%;
        margin-left: -500px;
}
div#mw-panel {
	position: relative;
	left: 0;
	margin-left: -190px;
        width:160px;
}
div#mw-head {
	position: relative;
        right: 0;
        margin-right: 0;
        max-width: 1000px;
}
MarkAHershberger(talk) 20:10, 15 March 2014 (UTC)
I don't have time to do more now. And I still don't understand why you don't adjust your window to make it look better. But maybe someone else can offer more help. MarkAHershberger(talk) 16:18, 17 March 2014 (UTC)
For me, I want to do this because my browser window has other tabs that conform to modern browsing standards, so I don't want to resize my window every time I switch to or from a wikipedia tab.
If someone is able to help, I think I almost have it, on a very vanilla vector-skinned site:
http://www.aerenamasters.com/wiki/index.php?title=MediaWiki:Common.css
I can't figure out how to make the navigation behave well:
/* working ... */
#content{
        margin-left:auto !important;
        margin-right:auto;
	max-width: 950px;
}
#footer {
	margin-left: auto !important;
	margin-right: auto;
	max-width: 950px;
}
/* testing */
#mw-navigation {
        margin-left: auto !important;
	margin-right: auto;
	max-width: 1140px;
        top: 0;
}
Thanks for any help! 74.91.102.250 17:21, 22 June 2014 (UTC)
For anyone who wants to try this but doesn't know how, you need to put it on your common.css page. MarkAHershberger(talk) 16:25, 17 March 2014 (UTC)
I entirely disagree. One of the attributes of the 2022 redesign of Vector is that it does not adapt to the size of my screen past a certain amount. Rokejulianlockhart (talk) 15:39, 12 August 2022 (UTC)
For Vector skin put next lines into MediaWiki:Vector.css or into
your custom vector.css.
    /* set max width and fix the background */
    html,
    body {
    	position: relative;
    	margin-left: auto !important;
    	margin-right: auto !important;
    	max-width: 1280px;
        background-position: top left;
        background-repeat: repeat-x;
    	background-size: 100% 5em;
        background-image: url(/skins/Vector/images/page-fade.png);
        background-color: #f6f6f6;
        background-image: -webkit-gradient(linear,left top,left bottom,color-stop(50%,#ffffff),color-stop(100%,#f6f6f6));
        background-image: -webkit-linear-gradient(top,#ffffff 50%,#f6f6f6 100%);
        background-image: -moz-linear-gradient(top,#ffffff 50%,#f6f6f6 100%);
        background-image: linear-gradient(#ffffff 50%,#f6f6f6 100%);
    }
    
    /* set blue right border */
    .mw-body { border-right: 1px solid #A7D7F9; }
    
    /** fix the position of:
    			personal user menu
    			search bar
    			the pop-up indicator of language selector
    			search suggestions 
    **/
    #p-personal { right: 3pt; }
    #p-search { margin-right: 3pt; }
    .imeselector { position: fixed; }
    .suggestions { right: 3pt !important; }
If you want to apply this CSS for the restricted pages, write down next line into your `LocalSettings.php`, but first check this comment:
    $wgAllowSiteCSSOnRestrictedPages = true;
Spas.Z.Spasov (talk) 21:09, 26 September 2016 (UTC)
Thank you so much! Exactly what I was looking for. 88.145.181.85 (talk) 22:08, 12 April 2017 (UTC)
The problem that I can not solve completely is the behaviour of some pop ups as these of Extension:Popups. Spas.Z.Spasov (talk) 22:38, 12 April 2017 (UTC)
Maybe this can solve this behaviour problem : Extension talk:Popups/2018#h-How_to_avoid_the_popups_to_be_shifted_when_there_is_a_margin-2018-02-15T21:29:00.000Z Varlin (talk) 21:30, 15 February 2018 (UTC)
Spas.Z.Spasov's CSS causes some offset problems (with Extension:Popups, with some unfolding combobox and with some dialogs). This alternative option seems to cause less offsets.
/* set max width and fix the background, see skinVector.patch */
#wikirouge-bodycontent-wrapper {
	position: relative;
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 1100px;
}
    html,
    body {
        background-position: top left;
        background-repeat: repeat-x;
    	background-size: 100% 5em;
        background-image: url(/skins/Vector/images/page-fade.png);
        background-color: #f6f6f6;
        background-image: -webkit-gradient(linear,left top,left bottom,color-stop(50%,#ffffff),color-stop(100%,#f6f6f6));
        background-image: -webkit-linear-gradient(top,#ffffff 50%,#f6f6f6 100%);
        background-image: -moz-linear-gradient(top,#ffffff 50%,#f6f6f6 100%);
        background-image: linear-gradient(#ffffff 50%,#f6f6f6 100%);
    }
    
    /** fix the position of:
    			personal user menu
    			search bar
    			the pop-up indicator of language selector
    			search suggestions 
    **/
    #p-personal { right: 3pt; }
    #p-search { margin-right: 3pt; }
    .imeselector { position: fixed; }
    .suggestions { right: 3pt !important; }
But it needs to be combined with this patch :
--- skins/Vector/includes/templates/index.mustache (date 1571250157017)
+++ skins/Vector/includes/templates/index.mustache (date 1571250157017)
@@ -1,4 +1,5 @@
{{{html-headelement}}}
+<div id="wikirouge-bodycontent-wrapper">
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main">
@@ -32,5 +33,6 @@
{{! html-unported outputs <div id="mw-navigation"> and <div id="footer"> }}
{{{html-unported}}}
{{{html-printtail}}}
+</div>
</body>
</html>
Varlin (talk) 19:15, 16 October 2019 (UTC)
How do you use the patch? (Or where do you put it?)
Thanks. Vishkujo (talk) 05:41, 17 October 2019 (UTC)
You have to edit this file
skins/Vector/includes/templates/index.mustache
And add the lines marked with a " + " (here, just a div tag) at the right place.
(This syntax enables you to make it automatically using some tools) Varlin (talk) 16:48, 24 October 2019 (UTC)
The idea provided by @Varlin is great, except the part we need to edit some core files that would cause some additional actions on update. So the another way to add such wrapper is by using the a hook in the LocalSttings.php file:
/**
 * Skin Vector Max Width Wrapper
**/
$wgHooks['AfterFinalPageOutput'][] = 'skinVectorWidthWrapper::onAfterFinalPageOutput';
class skinVectorWidthWrapper{
        public static function onAfterFinalPageOutput( $output ) {
                $out = ob_get_clean();
                // change final html in $out
                ob_start();
                /* split the string contained in $html in three parts:
                 * everything before the <body> tag
                 * the body tag with any attributes in it
                 * everything following the body tag
                 * Ref.: https://stackoverflow.com/a/2216352/6543935 */
                $matches = preg_split('/(<body.*?>)/i', $out, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
                echo $matches[0] . '<div id="skin-vector-maxwidth-wrapper">' . $matches[1] . $matches[2] . '</div>';
                return true;
        }
}
Then the CSS code in Vector.css should be similar as the sown above:
/**
 * Skin Vector Max Width, see skinVectorWidthWrapper::onAfterFinalPageOutput
**/
#skin-vector-maxwidth-wrapper {
    position: relative;
    margin-left: auto;
    margin-right: auto;
    max-width: 1460px;
}
html,
body {
    background-position: top left;
    background-repeat: repeat-x;
    background-size: 100% 5em;
    background-image: url(/skins/Vector/images/page-fade.png);
    background-color: #f6f6f6;
    background-image: -webkit-gradient(linear,left top,left bottom,color-stop(50%,#ffffff),color-stop(100%,#f6f6f6));
    background-image: -webkit-linear-gradient(top,#ffffff 50%,#f6f6f6 100%);
    background-image: -moz-linear-gradient(top,#ffffff 50%,#f6f6f6 100%);
    background-image: linear-gradient(#ffffff 50%,#f6f6f6 100%);
}
@media print {
	#skin-vector-maxwidth-wrapper {
	    position: relative;
	    margin-left: 0;
	    margin-right: 0;
	    max-width: 100%;
	}
	
	html,
	body {
	    background:none;
	}
}
/**
 * Skin Vector Max Width: fix the position of:
 *    personal user menu
 *    search bar
 *    add right blue border
**/
#p-personal { right: 3pt; }
#p-search { margin-right: 3pt; }
.mw-body { border-right: 1px solid #A7D7F9; }
When I have enough time, I will create a small extension in order to provide this functionality in more elegant way. Spas.Z.Spasov (talk) 09:42, 10 April 2020 (UTC)
If your standards are low enough, simply adding a max-width to Mediawiki:Vector.css as below will at least keep the content constrained. It's not centered and the interface links will be way out to the right, but you won't have to look at sprawling content on your colleagues monitor.
#bodyContent {
  font-size: 0.81em;
  max-width:1000px;
}
Lbillett (talk) 23:36, 23 October 2020 (UTC)

An accessibility issue has just appeared in the main search box of Wikipedia. The search box now fails W3C WAI Guidelne F24: http://www.w3.org/TR/WCAG-TECHS/F24.html

I'm using a windows 7 desktop with Firefox. I have changed my windows colours to display white text on a black background.

The search box now sets characters typed to black. It does not set the background colour. Therefore the background defaults to the OS colour and I end up with black text on a black background ie. it's invisible. This is very new. The search box has been fine up until today(ish).

Note that either: a) Both foreground (text) and background colour should be set. OR b) Both foreground (text) and background colour should not be set.

Setting one but not the other results in problems for people who are not using default colour settings eg. the visually impaired.

Do not test with Chrome. Chrome fixes this problem on the fly for most web pages. Text with Firefox or IE (I do not have Safari).

To see which colours have/have not been set. Go to the Windows appearance settings and change text to lime green and background to red. Now look at the Wikipedia site. Text typed is black (not lime green) and the background is red. 212.56.109.89 (talk) 13:41, 14 March 2014 (UTC)

Hi!
I see, this is a problem, which also the HTML Validator warns you of. You should open an issue in bugzilla for that! Which of the two options do you suppose to do?
Define foreground and background color? Then they will no longer adjust to the system settings as set by the user.
Define none of the both (and so leave it up to the user or to his system defaults)? In this case what one calls "corporate design" will be reduced as the user can change these colors. 88.130.97.79 13:52, 14 March 2014 (UTC)

Database error

I am using a native install of MediaWiki v1.22.1 with PostgreSQL. I have just started actively using the site...and most everything seems to work as expected until I attempt to save an edited page that contain external links. I get an error that reads:

Database error A database query error has occurred. This may indicate a bug in the software.

   Query:
   SELECT nextval('externallinks_el_id_seq')
   Function: DatabaseBase::query
   Error: 42P01 ERROR: relation "externallinks_el_id_seq" does not exist LINE 1: ...DatabaseBase::query Brandon Sackman... */ nextval('externall... ^ 

The changes to the pages appear to be maintained...but I am curious what I could do to alleviate this error message or at least understand it a bit better. Any thoughts? 67.50.70.186 (talk) 19:17, 14 March 2014 (UTC)

This is Installation of Mediawiki 1.22.1 fails with PostgreSQL at "Creating main page": sequence externallinks_el_id_seq is missing. You should upgrade. MarkAHershberger(talk) 22:32, 14 March 2014 (UTC)

MediaWiki is a spam target unless it is set up properly.

I made a new site and it immediately got taken over by spam. It was quite a hassle to delete all the spam and all the users. Not to mention that it was very unclear how to do this.
I am wondering why the captcha is not enabled by default. It seems to me that the by default the OpenID extension, mass delete extension and the BlockandNuke extension should be enabled.
Finding, installing, figuring out how to use them tool several days of work.
Why is the default version of Media Wiki so vulnerable to spam? How can we make it so users who are not that savvy do not get completely overrun?
Thank you. B d m p (talk) 10:36, 15 March 2014 (UTC)
Spammers try to spam anywhere they can find on the Internet. It's not only Mediawiki wikis that are vulnerable to spam. They spam blogs, forums, wikis, guestbooks, email addresses, mailing lists and any other web forms which they find. See Manual:Combating spam for details about how to deal with spam. Glaisher (talk) 11:46, 15 March 2014 (UTC)
Yes, this is true. That is why spam combating measure should be enabled by default.
Understanding and effectively combating spam with the information on Manual:Combating spam is a very difficult task. I have been trying for days to make my site function properly by using the information on that page, and I am getting no where. I have installed almost all the extensions on that page.
I was able to delete all the spam pages, but I have thousands of spam bot accounts I can't delete (BlockandNuke extension is not working). Also, I enabled OpenID to stop spam bot account creation because the extension that enables the captcha doesn't actually stop the bots, but if I disable the non-OpenID accounts, then users can't make user names when creating an account with OpenID. So, now I have a catch-22, and if I enable account creation, I get spam bots. If I disable it, real uses can't make accounts with OpenID.
This is a huge mess that could have been prevented if strict spam prevention measures were enabled by default. B d m p (talk) 12:17, 15 March 2014 (UTC)
Hi!
So what would help would be having the information on how to set up a wiki in such a way that it is secure (spamwise) more reachable.
It would help to adjust the content of the original main page (this standard welcome text) to something, which also includes a link to Manual:Combating spam. 88.130.92.213 12:51, 15 March 2014 (UTC)
That would be a step in the right direction, but I think it should have spam filters on by default or be in lock down mode with an explanation, so admins can configure it before they get attacked by spam. B d m p (talk) 13:28, 15 March 2014 (UTC)
As for the spam filters, there are extensions, which are coming with MediaWiki by default and which you can configure as you like (SpamBlacklist, TitleBlacklist, ConfirmEdit or so). All you have to do is to configure them. It does not really make sense to activate them preconfiguredly in some way as then spammers would just adapt to that one preconfiguration, which would make it useless.
When you set up MediaWiki there is an option to make it an "open wiki", "closed wiki" and so on. These texts tell something about who can edit the wiki in each case. However, I do not know the exact texts right now. Maybe a recommendation at that place would make sense. 88.130.92.213 15:13, 15 March 2014 (UTC)
Note: At Meta Wikimedia, there is a bot that automatically blocks users for specific spam userpage. You may check that out, or you can talk to User:Jasper Deng, who created that bot at Meta. Goldenburg111 (talk) 15:24, 15 March 2014 (UTC)
Setting p a bot needs a rather good understanding of the MediaWiki internals, maybe a PC with some scripting language and other funky stuff. This is by no means something, that a beginner should be advised to try; it won't work, he will fail, demotivation and so on. I would start configuring the extensions, which come with the release tarball. 88.130.92.213 15:39, 15 March 2014 (UTC)
That's just an abusefilter. πr2 (tc) 15:43, 15 March 2014 (UTC)
...which can be used with Extension:AbuseFilter. However, that is advanced - compared to just using the extensions provided with the tarball. The easiest solution is deactivating registration and making registration compulsory for editing. That is two lines in LocalSettings.php - and the installer even offers you to set them with a single click (I think the option was called "closed wiki"). 88.130.92.213 16:25, 15 March 2014 (UTC)
Right. And maybe that should be the default to get people to be more aware of what they need to do if they're going to set up a wiki. MarkAHershberger(talk) 20:09, 15 March 2014 (UTC)
I've had the same problem, and I found it also very difficult to work my way through the CombatingSpam-page. But I'm glad to say that my wiki is spamfree since last october! I've installed some extensions I don't use or didn't set up properly, but I think the two extensions that did the trick were ConfirmEdit with QuestyCaptcha and SimpleAntiSpam. I have to say though that my wiki is very specialised and in German, so I could come up with some really specialised questions in German. And I see this can't be the solution for every kind of wiki: A non-specialised wiki like, let's say, wikipedia can't come up with that kind of specialised questions. LiturgicaNotata (talk) 08:03, 17 March 2014 (UTC)
Extension:SimpleAntiSpam was merged into core for MediaWiki 1.22, so it's now enabled by default. Ciencia Al Poder (talk) 10:39, 17 March 2014 (UTC)
I am trying to create a wiki, and in order to avoid spam (as happened in a past attempt a few years ago, I had tried creating a wiki which was overrun by spambots and I eventually gave up), this time I created a closed wiki where only registered users who are approved can post content. Well guess what: I was overrun by spam again. If not even a closed wiki is protected from spam then I say, there must be some weaknesses in the wiki software that spambots can take advantage of? Lwangaman (talk) 14:01, 5 June 2020 (UTC)
Sometimes weakness are caused by sysadmins that install new MediaWiki versions but leave an old installation with public access on the internet at a different path Ciencia Al Poder (talk) 15:56, 5 June 2020 (UTC)
this isn't the case here, it was a new mediawiki installation, clean from scratch. It had nothing to do with the previous attempt I mentioned. I'm seeing the "actor" table is full of "actor_name" values that begin with "en>" or "it>", but if I try the rollbackEdit.php script for any of these usernames I get the error message "invalid username". Is that because the rollbackEdit script won't accept a username that contains the ">" character, or perhaps because the "actor_user" field has a NULL value for each one of these? Lwangaman (talk) 07:40, 10 June 2020 (UTC)
Those names that begin with en> or it> are the result of imported revisions... This means the "spam" actually was imported from another wiki by you or another sysop (the only user group able to import dumps by default) by using Special:Import or importDump.php
The rollbackEdit thing may be a bug worth reporting Ciencia Al Poder (talk) 22:16, 10 June 2020 (UTC)

Embed YouTube video - with precise start time!

I tried all of extension from the list - https://www.mediawiki.org/wiki/Youtube - but still couldent find any solution. How to embed YouTube video with precise start time in medawiki??? Lurgen (talk) 13:35, 15 March 2014 (UTC)

mw-config call back error after updating from 1.22.2 to 1.22.4

Reported in bug report #62697

PHP 5.4.4-14+deb7u7 (apache2handler) MySQL 5.5.33-0+wheezy1

Updating from 1.22.2 to 1.22.4

Steps to Reproduce: 1.Starting with a working 1.22.2 install, downloaded 1.22.4 2. Merged new files 3. Ran update.php 4. In browser went to mw-config, selected language and got error

Actual Results: After selecting English the following traceback was generated

Existing wiki

[3ca6b40a] /wiki/mw-config/?page=ExistingWiki Exception from line 181 of /usr/share/mediawiki-1.22.4/includes/Hooks.php: Invalid callback in hooks for ParserFirstCallInit Backtrace:

  1. 0 /usr/share/mediawiki-1.22.4/includes/GlobalFunctions.php(3877): Hooks::run(string, array)
  2. 1 /usr/share/mediawiki-1.22.4/includes/parser/Parser.php(275): wfRunHooks(string, array)
  3. 2 /usr/share/mediawiki-1.22.4/includes/parser/Parser.php(287): Parser->firstCallInit()
  4. 3 /usr/share/mediawiki-1.22.4/includes/parser/Parser.php(4823): Parser->clearState()
  5. 4 /usr/share/mediawiki-1.22.4/includes/parser/Parser.php(367): Parser->startParse(Title, ParserOptions, integer, boolean)
  6. 5 /usr/share/mediawiki-1.22.4/includes/installer/Installer.php(608): Parser->parse(string, Title, ParserOptions, boolean)
  7. 6 /usr/share/mediawiki-1.22.4/includes/installer/WebInstaller.php(662): Installer->parse(string, boolean)
  8. 7 /usr/share/mediawiki-1.22.4/includes/installer/WebInstallerPage.php(359): WebInstaller->getInfoBox(string)
  9. 8 /usr/share/mediawiki-1.22.4/includes/installer/WebInstallerPage.php(347): WebInstaller_ExistingWiki->showKeyForm()
  10. 9 /usr/share/mediawiki-1.22.4/includes/installer/WebInstaller.php(275): WebInstaller_ExistingWiki->execute()
  11. 10 /usr/share/mediawiki-1.22.4/mw-config/index.php(61): WebInstaller->execute(array)
  12. 11 /usr/share/mediawiki-1.22.4/mw-config/index.php(29): wfInstallerMain()
  13. 12 {main}

I have rolled back to 1.22, but any ideas where to look? Gee gg (talk) 14:56, 16 March 2014 (UTC)

I currently don't have a solution and it is good, that this problm has already been reported in bugzilla, however:
You do not have to run the updater for a minor upgrade. You can just copy over the files of 1.22.4 and the update is finished. This is especially important, as 1.22.3, which had been published in between, contains security fixes, which you really should use. 88.130.87.220 15:03, 16 March 2014 (UTC)

Unable to install Language_Extension_Bundle

I followed the tutorial to install. I used the first layout. When I run the following command,

   php maintenance/update.php

It shows error:

   MediaWiki 1.22.3 Updater
   DB connection error: No such file or directory (localhost)

When I go to following:

   my_local_site/mediawiki/mw-config/

It end up with error and call stack:

   [b5c6107d] /my_local_site/htdocs/wiki/mw-config/ Exception from line 316 of /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/MagicWord.php: Error: invalid magic word 'babel'
   Backtrace:
   #0 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/MagicWord.php(239): MagicWord->load(string)
   #1 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/parser/Parser.php(4982): MagicWord::get(string)
   #2 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/extensions/Babel/BabelStatic.class.php(22): Parser->setFunctionHook(string, array)
   #3 [internal function]: BabelStatic::onParserFirstCallInit(Parser)
   #4 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/Hooks.php(199): call_user_func_array(string, array)
   #5 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/GlobalFunctions.php(3877): Hooks::run(string, array)
   #6 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/parser/Parser.php(275): wfRunHooks(string, array)
   #7 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/parser/Parser.php(287): Parser->firstCallInit()
   #8 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/parser/Parser.php(4823): Parser->clearState()
   #9 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/parser/Parser.php(367): Parser->startParse(Title, ParserOptions, integer, boolean)
   #10 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/installer/Installer.php(608): Parser->parse(string, Title, ParserOptions, boolean)
   #11 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/installer/WebInstaller.php(662): Installer->parse(string, boolean)
   #12 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/installer/WebInstallerPage.php(359): WebInstaller->getInfoBox(string)
   #13 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/installer/WebInstallerPage.php(347): WebInstaller_ExistingWiki->showKeyForm()
   #14 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/includes/installer/WebInstaller.php(275): WebInstaller_ExistingWiki->execute()
   #15 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/mw-config/index.php(61): WebInstaller->execute(array)
   #16 /Applications/XAMPP/xamppfiles/htdocs/my_local_site/htdocs/wiki/mw-config/index.php(29): wfInstallerMain()
   #17 {main}

Can you please help me fix the error and install the language extension onto my mediawiki? I am running my local XAMPP on mac osx 10. Viewpl (talk) 12:16, 17 March 2014 (UTC)

Unable to upload vbs code - ERROR:"No data received"

Hi All, I hope you can help me out to resolve this problem.

Issue

  • I'm unable to upload the vbs source code of a script I have done in my own personal mediawiki


Sympthom

  • I'm able to paste the code itself within the textarea but once I click on the "save" button I receive the following from the browser:



System Info

  • Guest OS: Linux CentOS 2.6.32-431.5.1.el6.x86_64
  • MediaWiki: v1.22.3
  • API: apache2handler
  • PHP: v5.3.3
  • DB: MySQL v5.1.73 (InnoDB)


Troubleshooting Steps Tried So Far

  • Added the vbs extension to the $wgFileExtensions variable within the LocalSettings.php file
  • Removed the vbs extension from the file blacklist array within the LocalSettings.php file:

<pre style="margin-left:0.5cm">$wgFileBlacklist = array_diff( $wgFileBlacklist, array ('vbs') );

  • Managed to narrow down the issue to the following portion of the vbs source code mentioned above:
Sub showMessage(when)
	Select Case when
		Case "begin"
			Set objShell = CreateObject("Wscript.Shell")
			intReturn = objShell.Popup(initialMessage, timeOut, title, informationFlag)
		Case "end"
			MsgBox finalMessage, informationFlag, title
	End Select
End Sub


Note: As you can see, I was able to upload (copy and paste) above the portion of the code that caused me this issue. So it's evident that a parameter or some configuration settings have to be applied in my own MediaWiki.



Any help is much appreciated! 80.169.134.162 (talk) 13:08, 17 March 2014 (UTC)

Hi!
Yes, you have to add vbs to $wgFileExtensions as by default you won't be able to upload files with this extension otherwise. The blacklist array $wgFileBlacklist overwrites what you have set in $wgFileExtensions, so it's also correct to remove vbs there. Note however that allowing people to upload text files is a security risk for you and your users. Do so only, if you really trust them.
Another aspect might be $wgMimeTypeBlacklist, which will still disallow certain files because of their mime type.However, I am not sure, if your error ERR_EMPTY_RESPONSE is caused by that; if the mime type check failed, users normally do instead get a message displayed, that mime type xyz would not be allowed... 88.130.102.132 15:02, 17 March 2014 (UTC)

Hi, Thanks for your answer.

My mediawiki is set as 'private' so I don't mind allowing people (well actually only me) to upload this kind of files.

I haven't checked the $wgMimeTypeBlacklist but I'm pretty sure it doesn't depend on this as I'm able to upload vbs content. The only problem, for some reason, is the portion of vbs code published in my post above which must certainly contain something not good to be submitted in a form. More specifically I furtherly narrowed it down to this:

<syntaxhighlight lang="vb">
      Set objShell = CreateObject("Wscript.Shell")	
</syntaxhighlight>

Again as you can see I'm able to post it here with no problem but not in my mediawiki.

Any help???

Thanks... Buffa (talk) 22:01, 17 March 2014 (UTC)

Check if your server has mod_security installed. It can cause responses to be aborted based on the contents of the page or what you send in forms. Ciencia Al Poder (talk) 11:04, 18 March 2014 (UTC)
Hi,
Unfortunately mod_security is not installed: no presence of the file mod_security.conf.
Any other idea?
Thanks. Buffa (talk) 23:41, 18 March 2014 (UTC)
look at apache's error_log to see if there's something logged there for those requests. Ciencia Al Poder (talk) 10:30, 19 March 2014 (UTC)

How to force lowercase (small letters) titles

How do I force new articles to be titled with only small letters (except the default initial capital letter)? Is there an extension to keep writers uning only capital letters in title names? Like the opposite of $wgCapitalLinks, forcing the rest of the title to be all lowercase.

Having external systems linking to articles often result in articles not found because some writers only use small letters, some only capical letters and some even a mix. Hrasmussen.dk (talk) 14:40, 17 March 2014 (UTC)

Few challenging questions.....

1). Can I allow/define specific “search” capabilities in a MediaWiki?

2). Can hierarchy and relationships be defined so as to give intelligence to Mediawiki Searches (e.g. Google searches apply results with degree of relevancy)?

3). Can I link Mediawiki to another system e.g. SalesForce and have Mediawiki search an instance of SalesForce?

4). Can I do data mining and pattern recognition on a Mediawiki e.g. link Mediawiki to massive data files and have it recognize patterns and send alerts for certain things?

Many Thanks 68.184.19.23 (talk) 17:45, 17 March 2014 (UTC)

In answer to your questions: yes. BUT, it will require some programming. I would suggest you look at the hiring a MediaWiki consultant (of which I am one). MarkAHershberger(talk) 19:53, 17 March 2014 (UTC)

Intelectual fraud and influence peddling

Hello. I'm Hugo, from Lisbon, Portugal. 35 years old.

I'd really love to contribute to Wikipedia. Actually, I'm a journalist, a writer, a poet, a musician, a songwriter... I have two poetry books published, some poems collected in anthologies (Portugal and Brazil); two hands full of published songs written and composed by me, some of them played on radio and TV; more than 40 or 50 composed and recorded songs; I've published hundreds of relevant articles (interviews to the most important musicians in Portugal and some international artists; long stories about people, politics, economy, arts, you name it; editorials...) on magazines and on some portuguese leading newspapers; I founded two small newspapers; I was even a cartoonist; whatever... There are many other people like me who don't have a single word about them or their true, sincere, honest and talented work. I know some of these people - truly talented and honest people who actually develop an intellectual or artistic work. The point is I'm shocked to see and realize that there are people highlighted on Wikipedia (the person I know best and thinking of happens to be cousin of a very important politician, of noble families), where we can read they must have accomplished amazing artistic deeds like writing books and composing music that they never composed at all. And what they actually do and did was notoriously poor, never worth mentioning. Some of these people even come connected to shortlists (linked) of the "writers of Portugal", among some of the most brilliant minds ever. And where are writers that actually write, like me? Does this sound pretentious? Well... just listen, watch, read, investigate, compare. It sounds like a natural and ethic inclination to dislike and to manifest that dislike when injustice, intellectual dishonesty, fraud or influence peddling occur before our eyes. I will not point anyone out, but I would like to know how can this happen. Some years ago a friend of mine asked me if I wanted him to create a Wikipedia page for my extinguished band, called Baby Jane, and I obviously said "sure!" He created the page and a couple of weeks later he told some kind of editor impeded the publication of that information (which was accurate and correct) because the band didn't get to publish a record (but appeared several times times on national television, played hundreds of important concerts with some of the major national bands, had dozens of original recorded songs, released on EP's and demos - some of them actually published and sold on the market along with compilations, for instance). It wasn't enough, but a guy who has nothing worthwhile that we can see or ear, and that simply takes advantage of others and their work gets to have a Wikipedia page that makes him one of the most important writers or artists in the country is frightening, shocking, fraudulent, intellectually dishonest, inadmissible! Something is wrong with Wikipedia and I want to help making sure it gets better, whenever I can and know how. Finally, I would love to contribute to Wikipedia and would appreciate if someone could help me get into the Wikipedia matters.

Hope to hear from you soon and would really appreciate if someone could explain this strange selective gate keeping phenomenon that seems to be dominating Wikipedia, even at this very small scale.

Cheers,

Hugo Hugo Simões (talk) 03:50, 18 March 2014 (UTC)

TL;DR version: He thinks he and his band who has never published a record are significant enough to the world to have their own articles in Wikipedia.
You're better off asking on Wikipedia's boards directly, eg http://en.wikipedia.org/wiki/Wikipedia:Dispute_resolution_noticeboard. This website is for the software running Wikipedia, and has no relation to Wikipedia's contents. Fereal (talk) 06:34, 18 March 2014 (UTC)
Wikipedia has relevance criteria, which every article's subject must meet. They are in no way special to any single subject, but valid for all. I don't know what the English Wikipedia says on bands, but you should be able to find out following the link in my last sentence. It might save you some time to read them before you start writing. 88.130.110.147 12:42, 18 March 2014 (UTC)

[RESOLVED] Any AJAX-based extensions for displaying enlarged thumbnail/gallery images like Wikia's Photo Gallery?

Are there any image extensions that, when the user clicks on an image, dynamically pops out its enlarged version?

Wikia is capable of doing it with its proprietary Photo Gallery extension, an example in http://elderscrolls.wikia.com/wiki/The_Elder_Scrolls_V:_Hearthfire. Are there any similar extensions available? The closest I've seen is Extension:MultimediaViewer, however it doesn't seem to work in 1.22. Fereal (talk) 06:41, 18 March 2014 (UTC)

I did this script that may work in other wikis: . It doesn't require PHP modifications. Ciencia Al Poder (talk) 11:07, 18 March 2014 (UTC)
Thanks, it works though I'll have to put it in an extension wrapper than use the css/js pages. Will probably be using it until Extension:MultimediaViewer is finalized (also the extension distributor is giving me an older version of it).
To anyone else looking to use that solution, you also need to copy the /* THICKBOX */ section in http://es.pokemon.wikia.com/wiki/MediaWiki:Common.css. Fereal (talk) 12:02, 18 March 2014 (UTC)
I have the code also on github Ciencia Al Poder (talk) 10:23, 19 March 2014 (UTC)

parameter calendar pages

Dear all

I have a problem: I would like to compine the pages of two or more calendars on one page -- example:

calendar A generates a page with different articles "storyboard-A-2014-03-01"Template:Storyboard-A Support desk/Flow/2014/03 -- based on the calendar extension. This storyboard A template combines different other pages like page A ("template:pageA storyboard-A-2014-03-01"), page B ("template:pageB storyboard-A-2014-03-01"), page C ("template:pageC storyboard-A-2014-03-01") etc.

What if I have a second calendar in the same wiki called "storyboard-B" which uses pages from calendar A but also his own pages:

"template:pageA storyboard-A-2014-03-01" "template:pageB storyboard-A-2014-03-01" but also: "template:pageM storyboard-B-2014-03-01"

If I just put it the template of A in calendar B it always refers to page B in the string ("template:pageA storyboard-B-2014-03-01" -- anyone any idea?

Thank you!

Simple Calendar Extension MediaWiki 1.16.0 PHP 5.2.14 MySQL 5.0.67 ParkStreet (talk) 07:10, 18 March 2014 (UTC)

Foreground skin

Another question:

I have installed the skin Foreground (in the skin directory on the server, in LocalSettings.php, choosen as the default skin), but I still see Monobook -- not Foreground. Anyone any idea? I have tested it with other skins -- they all work.

MediaWiki 1.16.0 PHP 5.2.14 MySQL 5.0.67

And also testet it on: MediaWiki 1.22.4 PHP 5.3.28 MySQL 5.5.31 ParkStreet (talk) 07:14, 18 March 2014 (UTC)

Hi!
What exactly have you changed to get that skin running? I found instructions here. Have you followed them?
When you still see the Monobook skin, then you have either set $wgDefaultSkin to monobook, or in your user preferences you have selected monobook as your skin. 88.130.110.147 12:38, 18 March 2014 (UTC)
Thank you for your answer! Yes, I have followed these instructions. Have set Foreground as default and choosen it in the user preferences firt -- both ways don't work ... ParkStreet (talk) 12:56, 18 March 2014 (UTC)
What happens when you create a new account - what does this new user see by default? And when you log out? Do you then see the Foreground skin?
Maybe you have some caches, which you want to empty (APC or something on the server, browser cache, proxy...). 88.130.110.147 13:23, 18 March 2014 (UTC)
Unfortunately nothing happens -- still not Foreground but Monobook ParkStreet (talk) 15:59, 18 March 2014 (UTC)
For both cases? New user and anonymous user?
That would mean that the problem is not in the user preferences, but somewhere else. I still think that somehow the default skin is not set properly (or gets overwritten or whatever). Is your wiki publicly accessible? A URL would make checking a lot easier! 88.130.110.147 16:44, 18 March 2014 (UTC)
Hi please upgrade to Mediawiki 1.19 or higher not including 1.20. 94.2.129.149 13:17, 19 March 2014 (UTC)
Yes, both cases -- unfortunately teh wiki is behind a htacces :( I'll see what I can do.
I have tried it with Mediawiki 1.22, too. But same problem ... ParkStreet (talk) 13:39, 19 March 2014 (UTC)
Nice that you updated the wiki to 1.22. This step definitely is no mistake.
Yeah, it would be a help, if you could make the wiki accessible. 88.130.66.23 14:05, 19 March 2014 (UTC)
Does it show up when you append ?useskin=foreground to the URL, or &useskin=foreground if the URL already contains a "?"?
You may want to leave also a note to User:Thingles about it. Ciencia Al Poder (talk) 10:23, 20 March 2014 (UTC)
no, unfortunately it doesn't show up when I add it ... ParkStreet (talk) 13:43, 23 March 2014 (UTC)
You can now give us a URL and I will see, if I can figure it out. I saw you already wrote the author in the mailing list. And I guess he will ask the same stuff we did here - without further information we won't be able to help you. 88.130.96.74 14:50, 23 March 2014 (UTC)

delete tabs view source, view history and read

Hello how can i delete the tabs view source, view history and read on mediawiki 1.22.3 Tickerdu22 (talk) 11:40, 18 March 2014 (UTC)

This is one of the most common, if not the most common question here.
You find ideas in Project:Support desk/Flow/2012/04#h-[RESOLVED]_How_can_I_hide_tabs_for_users_not_logged_in?-2012-04-11T15:38:00.000Z; the idea there is to take the tabs away before MediaWiki renders them. Another idea would be to hide them with CSS, which might be a bit easier. However, I would prefer the cleaner solution: Take them away before rendering. 88.130.110.147 12:23, 18 March 2014 (UTC)

Help with a request.

Hello. I am using this page in greek wikipedeia.https://en.wikipedia.org/wiki/Special:UncategorizedPages How can I request to Strikethrough if the page is categorized? Xaris333 (talk) 12:21, 18 March 2014 (UTC)

Hi!
Short answer: You can't. MediaWiki should update the list automatically when an article is saved. However, in seldom cases it might happen that this update does not work correctly. Maybe doing a null edit or a small edit helps in this case (I have not tested that).
Apart from that there is a maintenance script, which allows you rebuild category lists, however only people with access to the filesystem of the server can run it and on pages like Wikipedia it would take ages to finish, so I think this won't happen. 88.130.110.147 12:27, 18 March 2014 (UTC)

Wiki TOC Question

I was just wondering if it's possible to customize the TOC as a collapsible menu. For example:

1. Header.
2. Header

Then you click on 1 and it gives you sub-headers.

Installed software

Product Version
MediaWiki 1.20.2
PHP 5.3.27 (cgi-fcgi)
MySQL 5.1.56-log

108.49.49.5 (talk) 19:55, 18 March 2014 (UTC)

There's no extension providing such functionality, but you can write your on JavaScript to provide this functionality, or ask someone to do that, or find a JavaScript code that does that aleady. You can put it in the site's JavaScript file as explained in Manual:Interface/JavaScript Ciencia Al Poder (talk) 10:38, 19 March 2014 (UTC)
Please update to Mediawiki 1.21 or higher because 1.20 is no longer supported. 94.2.129.149 13:15, 19 March 2014 (UTC)

Restringir paginas segun sus grupos

Como crear grupos y que estos grupos solo puedan ver paginas asignadas a este grupo. Y como asignar las paginas a estos grupos?? Aflores (talk) 22:41, 18 March 2014 (UTC)

You ask how access to pages can be restricted to certain groups.
Groups can be created using $wgGroupPermissions as explained on Manual:User_rights.
You want to assign pages to user groups. This is e.g. possible using namespaces: Put the different pages into different namespaces and then use Extension:Lockdown to restrict access to these namespaces. 88.130.110.147 23:01, 18 March 2014 (UTC)

Add categories in templates does not apply

I create a template, i.E. MyTemplate with this code:

This is the text in MyTemplate.

Now I create page MyPage and insert MyTemplate:

This is my page. {{MyTemplate}}

After that I edit MyTemplate and insert a categorie:

This is the text in MyTemplate.
<includeonly>[[:Category:MyCat]]</includeonly>

If I now visit MyPage the category is not apply. (Do a refresh in the browser and so on..). Only if I edit "MyPage" and save it (without changes) the category will apply.

Is this correct? But what do I do if my Template is in hundreds of Pages I like to categorize now? Is there a maintaince script or like this to re-read the template and add the new category? Slick (talk) 12:21, 19 March 2014 (UTC)

Use API:Purge with parameters: titles = "MyTemplate" and forcerecursivelinkupdate = 1. Ricordisamoa 19:01, 19 March 2014 (UTC)
The category will show up eventually in all those articles. If you *need* for it to appear quickly, you can purge all those pages with the API, or doing null edits on those articles.
Those pages will have now pending jobs in the Manual:Job queue. When those jobs are processed, the category will show up on them. You can manually run the pending jobs with runJobs.php Ciencia Al Poder (talk) 10:27, 20 March 2014 (UTC)

Fatal Error after installation with Oracle backend

I receive the below error after installation of wiki version 1.22.4

Fatal error: Call to a member function checkTitleEncoding() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1158

In Apache error.log this message shows up

[Wed Mar 19 13:27:09 2014] [warn] [client 10.105.140.107] mod_fcgid: stderr: PHP Fatal error: Call to a member function checkTitleEncoding() on a non-object in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\wiki\\includes\\db\\DatabaseOracle.php on line 1158

PHP Version 5.4.26 Apache Version 2.2.21 mod_fcgid Version 2.3.6

Any idea where to search?

BR Roebel 80.254.154.83 (talk) 12:36, 19 March 2014 (UTC)

What do you have set $wgLanguageCode to? (look in LocalSettings.php) Ciencia Al Poder (talk) 10:17, 20 March 2014 (UTC)
  1. Site language code, should be one of the list in ./languages/Names.php
$wgLanguageCode = "da"; statjer 13:14, 20 March 2014 (UTC)
When I change value to $wgLanguageCode = "da";
I receive the following error:
Fatal error: Call to a member function checkTitleEncoding() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki\includes\db\DatabaseOracle.php on line 1158
When I change value to $wgLanguageCode = "en";
I receive the following error:
Warning: strpos() expects parameter 1 to be string, object given in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki\includes\db\DatabaseOracle.php on line 1146
Warning: strpos() expects parameter 1 to be string, object given in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki\includes\db\DatabaseOracle.php on line 1142
Warning: substr() expects parameter 1 to be string, object given in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki\includes\db\DatabaseOracle.php on line 1142
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki\includes\db\DatabaseOracle.php on line 605 statjer 13:24, 20 March 2014 (UTC)
Just to information.
All wiki tables has been created successfully and I am able to connect to the database and make simple requests as below:
<?php
$c = oci_connect("user", "password", "scan1/devdwh");
$s = oci_parse($c, "select table_name from all_tables where owner = 'WIKI'");
$r = oci_execute($s);
echo "<table border='1'>\n";
$ncols = oci_num_fields($s);
echo "<tr>\n";
for ($i = 1; $i <= $ncols; ++$i) {
	$colname = oci_field_name($s, $i);
	echo "  <th><b>".htmlentities($colname, ENT_QUOTES)."</b></th>\n";
}
echo "</tr>\n";
while (($row = oci_fetch_array($s, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
	echo "<tr>\n";
	foreach ($row as $item) {
		echo "  <td>".($item!==null?htmlentities($item, ENT_QUOTES):"&nbsp;")."</td>\n";
	}
	echo "</tr>\n";
}
echo "</table>\n";
?>
But I am not able to launch the created wiki site without have the above mentioned errors / warnings. statjer 13:41, 20 March 2014 (UTC)
go to the maintenance folder and run php eval.php
Paste this line and press enter:
var_dump( $wgContLang );
And the same with this:
var_dump( Language::factory( 'da' ) );
Paste the results here.
I'd also try to install again from scratch, downloading the tarball again, unpacking, drop the database and create it again from the installer. Ciencia Al Poder (talk) 20:53, 20 March 2014 (UTC)
Statjer (talk) 11:44, 24 March 2014 (UTC)
Install log from another attempt.
Including extensions... done
Setting up database... done
Creating database user... done
Creating tables...
Der opstod fejl i en forespørgsel til databasen. Dette kan indikere en fejl i softwaren.
Forespørgsel:
CREATE SEQUENCE user_user_id_seq MINVALUE 0 START WITH 0
Funktion: DatabaseOracle::doQuery
Fejl: 955 ORA-00955: name is already used by an existing object
Backtrace:
  1. 0 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\includes\db\DatabaseOracle.php(359): DatabaseOracle->reportQueryError('ORA-00955: name...', 955, 'CREATE SEQUENCE...', 'DatabaseOracle:...')
  2. 1 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\includes\db\DatabaseOracle.php(1084): DatabaseOracle->doQuery('CREATE SEQUENCE...')
  3. 2 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\includes\db\Database.php(3567): DatabaseOracle->sourceStream(Resource id #100, false, false, 'DatabaseBase::s...', false)
  4. 3 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\includes\installer\DatabaseInstaller.php(187): DatabaseBase->sourceFile('C:\Program File...')
  5. 4 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\includes\installer\OracleInstaller.php(286): DatabaseInstaller->createTables()
  6. 5 [internal function]: OracleInstaller->createTables(Object(OracleInstaller))
  7. 6 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\includes\installer\Installer.php(1589): call_user_func(Array, Object(OracleInstaller))
  8. 7 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\includes\installer\WebInstallerPage.php(1254): Installer->performInstallation(Array, Array)
  9. 8 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\includes\installer\WebInstaller.php(275): WebInstaller_Install->execute()
  10. 9 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\mw-config\index.php(61): WebInstaller->execute(Array)
  11. 10 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mediawiki-1.22.4\mw-config\index.php(29): wfInstallerMain()
  12. 11 {main} Statjer (talk) 11:44, 24 March 2014 (UTC)
Unfortunately this is not possible in our windows environment. When I run the php eval.php script from IE it returns the following message:
This script must be run from the command line
I have tried to drop all objects from the Oracle schema owner and made a completely new install. Now it returns the following errormessage:
A database query error has occurred. This may indicate a bug in the software.
I have also tried to install the same version 1.22.4 on a Unix environment but on a MariaDB instead of Oracle databsen with success.
But in our case it is not an option. I must run on a Oracle database.
BR
Jens Roebel Statjer (talk) 11:50, 24 March 2014 (UTC)
Maintenance scripts must be run from command line, as the error message says, and not from the browser.
The error about CREATE SEQUENCE suggests that you haven't deleted the old database/schema Ciencia Al Poder (talk) 19:44, 24 March 2014 (UTC)
This is the result from a total new install. The Oracle user has been dropped with cascade option and recreated.
Install
##Including extensions... done
##Setting up database... done
##Creating database user... done
##Creating tables... done
##Populating default interwiki table... done
##Initializing statistics... done
##Generating secret keys... done
##Creating administrator user account... done
##Creating main page with default content...
Warning: strpos() expects parameter 1 to be string, object given in C:\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1146
Warning: strpos() expects parameter 1 to be string, object given in C:\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1142
Warning: substr() expects parameter 1 to be string, object given in C:\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1142
 done
##Creating tables for enabled extensions...
When trying to enter the page this error message shows up:
Fatal error: Call to a member function checkTitleEncoding() on a non-object in C:\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1158
statjer 15:25, 26 March 2014 (UTC)
I can't set up an environment with oracle, so if you don't receive any help from others, feel free to open a bug in bugzilla. See How to report a bug Ciencia Al Poder (talk) 20:29, 26 March 2014 (UTC)

Warnings during importDump.php execution

I'm using importDump.php script to import some wiki pages and sometimes I get the following warnings:

PHP Warning: DOMDocument::load(): I/O warning : failed to load external entity "/var/www/html/wiki/languages/data/plurals.xml" in /var/www/html/wiki/includes/cache/LocalisationCache.php on line 547

PHP Warning: DOMDocument::load(): I/O warning : failed to load external entity "/var/www/html/wiki/languages/data/plurals-mediawiki.xml" in /var/www/html/wiki/includes/cache/LocalisationCache.php on line 547

It doesn't occur everytime time but it's pretty annoying. How can I fix this?

I use Mediawiki 1.21.5 Hanky (talk) 15:45, 19 March 2014 (UTC)

You say you use MediaWiki 1.21.5. Do you use this version for both, export and import? 88.130.66.23 16:34, 19 March 2014 (UTC)
No, I import from Russian Wikipedia and import to my local one, which has older version. Could this be a problem? Hanky (talk) 06:50, 20 March 2014 (UTC)
If this doesn't happen consistently, maybe there's a contention issue on that file when importing data, like that file being read for every imported revision or something like this which may be a problem in concurrent reads.
You may want to file a bug report about it.
If this happens consistently, maybe the file is missing or you don't have read permissions. Ciencia Al Poder (talk) 10:32, 20 March 2014 (UTC)
I'm getting the same issue with MW 1.25alpha, except that it's now line 656. The XML file I'm importing was exported from enwiki. Leucosticte (talk) 18:03, 4 November 2014 (UTC)
What are the file permissions of plurals.xml and plurals-mediawiki.xml? Are those paths correct? Ciencia Al Poder (talk) 10:55, 5 November 2014 (UTC)
[zsu23@ps375207:~/w/languages/data ] $ ls -l
total 28
-rw-rw-r-- 1 zsu23 pg5473640  3288 Nov  2 21:06 plurals-mediawiki.xml
-rw-rw-r-- 1 zsu23 pg5473640 22004 Nov  2 21:06 plurals.xml
Leucosticte (talk) 15:58, 5 November 2014 (UTC)

Feature request

Hi please add an updater to Mediawiki so that everytime you release an update and the current php you support it would show the latest the version to upgrade including showing the preview of Mediawiki. 94.2.129.149 (talk) 16:12, 19 March 2014 (UTC)

Do you mean something like:
A special user (an admin wih a flag indicating MediaWiki "I have file system access") logs in > Big red box:
The new version xyz of MediaWiki is available.
You should install this version as it fixes several security issues.
88.130.66.23 16:32, 19 March 2014 (UTC)

[RESOLVED] MediaWiki & Media Temple

Hey All, I am currently trying to run a wiki server off of a media temple host server. On this host I also have a website and a forum that run perfectly. However my wiki runs a bit slow from time to time and will sometimes render without CSS. Is this something Mediawiki defaults to when being handled by slow servers? Just curious if anyone else has had this problem before, I can't find anything on Google.

Cheers Danielphillipmurray (talk) 10:55, 20 March 2014 (UTC)

If CSS is not applied sporadically, then it's some issue with load.php. The server's error log may provide more information if there are errors or segfaults.
On MediaWiki 1.22, there's a problem with the Job queue that may cause slowness. Ciencia Al Poder (talk) 10:30, 21 March 2014 (UTC)
Just a bump for the same issue. Everything running fine on a gridserver account for other types of installations, but MediaWiki runs very slow & doesn't render the CSS most times. Cam427r (talk) 16:02, 25 March 2014 (UTC)
Without any more info about what does the error logs say, there's noting more we can do. Ciencia Al Poder (talk) 10:43, 26 March 2014 (UTC)
MediaWiki is known to run slowly when caching is not enabled. See manual:$wgMainCacheType. The job queue issue can also cause problems. But yes, there's lots of potential causes, hard to know without knowing more about your situation. Bawolff (talk) 04:39, 1 April 2014 (UTC)
Bump. Same issue here. I've moved several sites recently to a media temple grid server, including many joomla ones and 7 mediawikis. All mediawikis were 1.21.2 and now some are upgraded to 1.23.0. All joomlas still work fine. Wikis used to work fine for years in the old server but now they all have the same issues: very slow page loading and sometimes no css or partial css loading, especially the ones that load css from wiki pages (like from MediaWiki:Common.css etc). (The issue seems to appear more often right after editing pages).
The server's error log is clean. The only errors it shows is about robots.txt like this one: [Sun Jun 22 16:59:30 2014] [error] [client 157.xxx.xxx.162] File does not exist: /home/xxxxxx/domains/xxxxxxx/html/robots.txt
I've also tried php debugging but no error messages were shown.
When this issue appears I check the job queue (with /api.php?action=query&meta=siteinfo&siprop=statistics) and the result is always: jobs="0"
I used to have the default cache settings (i.e. CACHE_NONE which as I said worked fine in the old server). I've also tried $wgMainCacheType = CACHE_DB; (which is the only one of these that works) but the issue remains. Ioannis Protonotarios 07:32, 23 June 2014 (UTC)
For slownesss, you may try to set up Profiling, to track down what methods MediaWiki spend most of the time.
Also, during page loads, it would be useful to monitor CPU and memory usage, of both the server and the database, to detect bottlenecks or problems with other processes. Ciencia Al Poder (talk) 09:30, 23 June 2014 (UTC)
Resolved!
Short answer: Media Temple Control Panel > PHP Settings > Change from FastCGI to CGI (stable)
Long answer:
This is the response I've got from Media Temple support:
Ioannis,
Thank you for contacting (mt) Media Temple.
The mod_fcgid errors are caused by a PHP script on your website taking longer than 40 seconds to complete. If the site is running PHP as a FastCGI application, then there is a hard limit of 40 seconds for your scripts to complete, which cannot be edited on the GRID. Unfortunately, there isn't much that we can do about this issue in way of support, since the issues are directly related to the coding of MediaWiki.
You can try running PHP as a CGI module for your MediaWiki domains to see if that works for you, since it would then not be subject to the 40 second timeout setting for FastCGI. Here's a KnowledgeBase article to assist you with changing your PHP version on the GRID:
How can I specify the PHP version on the Grid?
http://kb.mediatemple.net/questions/244
If you require any further assistance, please do not hesitate to contact us by replying to this support request, or by calling us at 877-578-4000. We are here 24/7 to assist you. Thank you for continuing to use (mt) Media Temple for your hosting needs.
William T.
Customer Support @ (mt) Media Temple
877-578-4000
@MediaTempleHelp Ioannis Protonotarios 01:01, 3 July 2014 (UTC)

Help to Improve Searching

Hello, i need help to make my searching better, because when i use the search box i have the codes of my pages, but i dont need see codes, i only want see text, linkings, etc... And i need help to make a redirect on search. I need to understand how to make the search redirects mediawiki appear on the search page, for example would I seek mediawiki and beside the link shows redirect to mylink I can not do this, what I need to do?

Print Search 200.175.100.66 (talk) 11:54, 20 March 2014 (UTC)

deleteBatch.php doesn't work

I'm trying to use the deleteBatch.php maintenance script to delete atricles I imported before:

php deleteBatch.php --conf ../LocalSettings.php -u Admin -r "test" articles.txt

I get the following error:

A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_content_format,rev_content_model,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name FROM "revision" INNER JOIN "page" ON ((page_id = rev_page)) LEFT JOIN "mwuser" ON ((rev_user != 0) AND (user_id = rev_user)) WHERE page_id = '4' AND rev_id = '4' LIMIT 1 FOR UPDATE Function: Revision::fetchFromConds Error: 0A000 ОШИБКА: SELECT FOR UPDATE/SHARE не может применяться к NULL-содержащей стороне внешнего соединения

I have a clean install of Mediawiki 1.21.5 and PostreSQL as a backend.

It's strange to me that table names in this query are in double quotes and do not contain db schema name. If I remove the double qoutes, and schema name and launch that query manually, I don't get any errors.

How can I fix this problem? Hanky (talk) 12:24, 20 March 2014 (UTC)

Hi!
The interesting part of the message is this:
> Error: 0A000 ОШИБКА: SELECT FOR UPDATE/SHARE не может применяться к NULL-содержащей стороне внешнего соединения
What does that translate to? 88.130.100.49 13:27, 20 March 2014 (UTC)
It's a PostreSQL error. It's English variant: "SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an outer join". Hanky (talk) 13:37, 20 March 2014 (UTC)
While searching the English translation of that sql error I've found this bug. It seems that I have to upgrade to the latest version :( Hanky (talk) 13:45, 20 March 2014 (UTC)
Hanky (talk) 13:45, 20 March 2014 (UTC)

help -QINU fix

i got this problem :UNIQ56dc4e3929259942-todo-00000007-QINU, when i created todolist progressbar and I follow this link but still same problem. http://www.mediawiki.org/wiki/QINU_fix 81.111.57.124 (talk) 15:06, 20 March 2014 (UTC)

Did you use the method recursiveTagParse of the parser instead of Parser::pars? Ciencia Al Poder (talk) 10:15, 26 April 2014 (UTC)

Someone to help install 1.23 with VE?

Here's my problem:

I'd like to use Mediawiki 1.23alpha with the Visual Editor, for my grade 2/3 class.

Yeah, I know it's ambitious. But I know it works live on Wikipedia. I know other people can and have installed it properly.

I can't figure it out, neither can the hosting company I use.

Can anyone help by actually, .. helping me? Logging into my server and installing the ___ thing?

It's been months of hacking at this and I'm at my wits end.

Mark markjurgens@gmail.com MarkJurgens (talk) 16:34, 20 March 2014 (UTC)

Error while installing MediaWiki

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I am trying to install media wiki in my server that has Red hat Linux ver. 6.
For this I have downloaded media-wiki.
After downloading and untaring, I renamed media-wiki directory to aps and kept it at: /var/www/htmlwiki/aps/ directory. Then, Google Chrome browser, I did:
http://14.139.223.112/wiki/aps/mw-config/index.php
It said:
Fatal error: Class 'DOMDocument' not found in /var/www/html/wiki/aps/includes/cache/LocalisationCache.php on line 587
I found a solution in the media-wiki manual and tried:
yum install php-xml
That said:
Error Downloading Packages:
php-xml-5.3.3-3.el6_1.3.x86_64: failure: Packages/php-xml-5.3.3-3.el6_1.3.x86_64.rpm from server: [Errno 256] No more mirrors to try.
What should I do next to install it correctly? 113.21.79.140 (talk) 19:25, 20 March 2014 (UTC)
This is not a MediaWiki problem.
I would ask in a Redhat forum why installation of the php-xml package does not work. Google also has a lot of hits on this one already: https://www.google.com/search?q=%22install%22+%22Error+Downloading+Packages%22
See also the cross post at http://stackoverflow.com/questions/22542973/mediawiki-not-installing 88.130.100.49 19:44, 20 March 2014 (UTC)
Obrigado pela ajuda!!!! Funcionou!!!! 189.125.114.245 (talk) 19:30, 10 May 2016 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Bug in wikieditor for mobile and problem with search bar on mobile

Hi there is a bug in mediawiki where on a mobile when editing the page it would show the basic and default wiki editor instead of the new wiki editor and when typing something in the search bar it doesent come up with suggestions . The problem is on English Wikipedia I am not sure if it happens on any other wiki. Because I haven't tested it on it. Please fix it 86.135.252.13 (talk) 22:06, 20 March 2014 (UTC)

Problems with rebuildImages.php

I have problems with the rebuildImages.php maintenance script in Mediawiki 1.21.5 with PostgreSQL.
This script fails on some images in this query:

INSERT INTO "image" (img_name,img_size,img_width,img_height,img_bits,img_media_type,img_major_mime,img_minor_mime,img_timestamp, img_description,img_user,img_user_text,img_metadata,img_sha1) VALUES ('HMS_Voracious_SLV_Green_1945.jpg','5711993','5252','3608','8','BITMAP','image','jpeg','2013-07-09 08:37:01 GMT','(recovered file, missing upload log entry)','0','127.0.0.1','a:2:{s:15:"JPEGFileComment";a:1:{i:0;s:138:"Capturefile: D:\glass neg raws\Allen C. Green Series\bSoftware: Capture One PRO for Windows";}s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}','9r3obqv4ikfdtkx45tlgho2clgka0lc')

The error is:

ERROR: invalid input syntax for type bytea LINE 1: ... file, missing upload log entry)','0','127.0.0.1','a:2:{s:15...

I can manually execute this query if I set empty img_metadata column data.

I launch this script for a huge amount of images and it fails for about 1 of approximately 1000 images. What is the problem with it?


--UPD--

I've discovered that if I remove this part from the query it runs ok:

D:\glass neg raws\Allen C. Green Series\bSoftware: Capture One PRO for Windows

This is a part of image metadata. Why does it cause sql problems?


--UPD2--

Actually it's enough to remove backslashes from that line in order to successfully execute that query. Hanky (talk) 08:30, 21 March 2014 (UTC)

This looks like MediaWiki isn't properly escaping strings in that SQL command, since backslashes are usually escape characters and have a special meaning to the database engine.
Please, report a bug and make it block bug 384 Ciencia Al Poder (talk) 10:43, 21 March 2014 (UTC)

PEAR

Could you plz explain me how to install PEAR channal follow this link, http://www.mediawiki.org/wiki/Extension:Gliffy#cite_ref-mod_3-0 143.210.117.83 (talk) 11:36, 21 March 2014 (UTC)

usually with apt-get install php-pear or zypper install php-pear Ciencia Al Poder (talk) 10:18, 26 April 2014 (UTC)

Nuke mass deletion doesn't appear

The company that has created this wiki (http://www.ichscotlandwiki.org/index.php?title=Intangible_Cultural_Heritage_in_Scotland) has recently installed in it the extension Nuke by following these steps (https://www.mediawiki.org/wiki/Extension:Nuke). However, if the new "Mass delete" is clicked the result is a blank page (http://www.ichscotlandwiki.org/index.php?title=Special:Nuke). Does anyone have some suggestion for solving this? Thanks in advance for any reply. Tanonero (talk) 20:10, 21 March 2014 (UTC)

Hi!
A blank page usually is caused by a PHP error. See Manual:How_to_debug for steps on how to get information about the actual error message! 88.130.95.0 22:59, 21 March 2014 (UTC)
Your wiki is in version 1.15, that's too old for the Nuke version available in MediaWiki.org
You should upgrade your wiki at least to 1.19. 1.15 may contain vulnerabilities. Ciencia Al Poder (talk) 18:04, 22 March 2014 (UTC)
According to the extension page, old versions of Nuke should be compatible with MW 1.15. However, 1.15 may not, but will contain security vulnerabilities. You should really upgrade! 88.130.101.90 00:57, 23 March 2014 (UTC)
Thanks everyone. Tanonero (talk) 11:13, 23 March 2014 (UTC)

[RESOLVED] Retrieved from message appearing after upgrade

Hello,

I upgraded a wiki from 1.15.1 to 1.22.4 . Other than a problem with the default skin, it seems fine.

However since then an annoying message appears at the bottom of every page: Retrieved from "http://... etc ". I notice this doesn't appear on other wikis. How can I determine what is generating this, and turn it off?

Versions: MediaWiki 1.22.4 PHP 5.4.20 (apache2handler) MariaDB 5.5.33-MariaDB

Extensions: ImageMap and SyntaxHighlight_GeSHi (both upgraded to latest)

OS SUSE 13.1

Thanks, Les 59.167.170.148 (talk) 07:52, 22 March 2014 (UTC)

That text is present in all mediawiki installations, but hidden by default.
MediaWiki has this CSS rule applied: .printfooter { display: none; }
Are you using a skin other than Vector? Ciencia Al Poder (talk) 18:09, 22 March 2014 (UTC)
Hi,
Thanks very much. Yes I was trying to use other skins. I have more problems with skins than I thought. I think I need to research my upgrade process.
I consider this answered.
Les (will use a login in future ...) 59.167.170.148 02:48, 23 March 2014 (UTC)

Internal Error 500

Hi all, I have a fresh install of the latest dis. of mediawiki, however i now suddenly have a problem after installing composer. When i try to create a new page, it redirects to "500 Internal Server Error" without creating the new page. Can anyone assist? I got full root to the server. Agreements (talk) 12:27, 22 March 2014 (UTC)

You should look for the error message so we can figure out what's happening. See Manual:How to debug.
What's your MediaWiki version and the version of Composer? Ciencia Al Poder (talk) 18:13, 22 March 2014 (UTC)

[RESOLVED] How do I enable the edit throttle

The page http://www.mediawiki.org/wiki/Autoconfirmed implies that mediawiki can throttle edits. Currently my LocalSettings.php file includes the lines:

$wgAutoConfirmAge = 60*60*24*30; # about 1 month, in seconds.
$wgAutoConfirmCount = 3; # edits.
$wgRateLimits['edit']['newbie'] = array( 1, 60*60*24 ); # one edit per day.
$wgRateLimits['edit']['ip'] = array( 1, 60*60*24 ); # one edit per day

What I expected to happen with the above settings is that a new spam account might be able to slip in one spam per day, but the mediawiki software would block any other attempt to create a new page or edit a pre-existing page until tomorrow.

What I see actually happening is that one spammer can register a new account, and then through that one account create several pages full of spam within the hour.

How do I enable the edit throttle at http://opencircuits.com/ ? MediaWiki 1.19.2; PHP 5.3.27 (cgi-fcgi); MySQL 5.1.56-log. DavidCary (talk) 17:20, 22 March 2014 (UTC)

For $wgRateLimits to work, it requires memcached. I've updated the docs explaining it. Maybe you don't have memcached in your wiki?
You may be interested in reading manual:Combating spam. Extension:QuestyCaptcha is a good extension preventing bot edits. Ciencia Al Poder (talk) 18:38, 22 March 2014 (UTC)
Dear Ciencia Al Poder,
Thank you for the recommendation to try QuestyCaptcha. After I switched from ReCaptcha to QuestyCaptcha with a long list of home-grown questions, I got *much* less spam.
As you guessed, I -- as recommended at at memcached -- don't have memcached installed.
I am curious: Why do these rate limiter / edit throttle extensions require memcached?
Would it make make any sense to write a new rate limiter / edit throttle extension that did not depend on memcached? DavidCary (talk) 04:04, 26 March 2014 (UTC)
It requires memcached because it stores in memory the amount of edits, moves, etc per user and period. It could be stored in database instead, but it may be a noticeable performance penalty compared to store that small amount of data in memory.
Storing things in memory is done with memcached, because in PHP, when the page request ends, all variables in memory are freed. Ciencia Al Poder (talk) 10:30, 26 March 2014 (UTC)

universal language selector problem for character ਜ਼ in punjabi

This post by Revibot was moved on 2015-07-11. You can find it at Extension talk:UniversalLanguageSelector#h-Input_methods_using_`_(grave_accent)-2014-03-20T13:17:00.000Z. Nemo 17:40, 22 March 2014 (UTC)

Different URL and Page Names

Hi all, I have a problem with URLs and Page Titles.

For compatibility reasons I cannot have urls like: wiki.mysite.com/index.php?title=Instalação on my website.

I must to create a URL like this: wiki.mysite.com/index.php?title=install, but I want the page that this url points to, to be named "Instalação" instead of "Install". I simply can't find how to do that.

Is there a way to create simple, short page titles (therefore having simple urls) and also edit the page title?

Thank you! 74.50.123.9 (talk) 05:56, 23 March 2014 (UTC)

Have you tried with a redirect? Ciencia Al Poder (talk) 13:34, 23 March 2014 (UTC)
It sounds to me like you want to have short words as titles (maybe for convenience or so) and longer texts as titles of the actual pages. In this case, redirects are what you want.
In order to "edit" the page title, you actually have to move the page. For example: Create a page called "Start" andthen move it to the title you actually want, e.g. "Starting point in our great wiki". During moving you have an option to let MediaWiki create the redirect from the old name to the new name automatically for you. 88.130.96.74 14:58, 23 March 2014 (UTC)
Thanks guys! I'll try that! 186.231.124.212 18:44, 23 March 2014 (UTC)
Try
{{DISPLAYTITLE:Instalação}}

You may have to set $wgRestrictDisplayTitle in your LocalSettings.php:

$wgRestrictDisplayTitle = false;

Ricordisamoa 22:09, 23 March 2014 (UTC)

HOW to embed opencell id api with my android app using php

can anyone has idea on how to embed opencellid api with my android app using php as backend it is an urgent task to be accomplished.I'm working on it for hours.In the http://opencellid.org/ site i had followed instructions on how to join they had given steps but my motto is to integrate the opencell id in my app using php if needed. Ramunune (talk) 06:25, 24 March 2014 (UTC)

Hi Ramunune, this page is about the MediaWiki software. Is your question MediaWiki-related? If not you might receive help in some support forum related to opencellid instead. AKlapper (WMF) (talk) 10:20, 24 March 2014 (UTC)
i have seen that opencellid is powered by mediawiki for that reason i made a query Ramunune (talk) 10:34, 24 March 2014 (UTC)
Their *wikipage* is powered by MediaWiki, as they decided to not reinvent the wheel and still have time left to work on the opencellid API, I guess... ;) AKlapper (WMF) (talk) 10:59, 24 March 2014 (UTC)
if you have any ideas on my question can you please direct me to any links where my problem can be solved Ramunune (talk) 08:15, 25 March 2014 (UTC)
You posted the link yourself already: http://opencellid.org/ AKlapper (WMF) (talk) 12:28, 25 March 2014 (UTC)

Mass Edit and Save pages to run $wgHooks['EditPage::showEditForm:initial'][]

I have an extension that checks the page text and if a specific text isn't there it will add it. I'm usingthe hooks $wgHooks['ParserFirstCallInit'][] = 'AdsSetup'; $wgHooks['EditPage::showEditForm:initial'][] = 'CheckHasTag'; The extension runs if I go to each page, edit and then click 'save page', however, I have hundreds of pages on my wiki. How do I force an edit page and save on all the pages so the extension will run without me having to go to each page individually? LTech (talk) 10:41, 24 March 2014 (UTC)

If your hook works as a pre-save transform (but I don't think so) regardless if it's used through the GUI, then pywikibot/touch.py should work. Ricordisamoa 14:40, 24 March 2014 (UTC)
I would like to only re-save pages in the 'main' namespace, and not all of them. Is this the best tool for this? It looks quite complex to install and run. LTech (talk) 18:38, 24 March 2014 (UTC)
You could use JavaScript to load forms and submit them automatically. Ricordisamoa 13:43, 17 April 2014 (UTC)

[RESOLVED] MediaWiki upgrade fails with Database error

Hi team,

I am trying to upgrade my Mediawiki version from 1.17 to 1.22. I have tried upgrading this in the past to other versions, but have received the same errors. This time I thought I would give it a concerted effort.

Everything works fine prior to the upgrade, but this is the error I get after performing the upgrade.

[ff90aba5] /pwiki/index.php Exception from line 788 of C:\inetpub\wwwroot\pwiki\includes\db\Database.php: DatabaseBase::factory no viable database extension found for type 'mysql'

This is an internal site for our IS department.

Can anyone shed some light on how to upgrade successfully?

Environment is the following:

Windows Server 2008 R2 IIS 7.5 PHP 5.3.6 MySQL 5.5.11 MediaWiki 1.17 (Upgrading to 1.22) 65.91.7.194 (talk) 15:57, 24 March 2014 (UTC)

Hi!
The error "DatabaseBase::factory no viable database extension found for type 'mysql'" happens, because you have selected MySQL as database, but obviously MySQL is not available in your environment. This happens when PHP does not feature MySQL support. Make sure to activate MySQL support in PHP; I guess it is installing a PHP module (e.g. called "php5-mysql") and restarting the server or compiling PHP again with the module. 88.130.94.198 16:57, 24 March 2014 (UTC)
Thank you for the reply, but since this is an upgrade that works fine pre-upgrade, I am not sure how PHP doesn't include running on MySQL.
So MySQL is in my environment, currently running fine, and the upgrade breaks it.
PHP_MySQL is enabled, the PHP_INI references the correct DLL.
Can anyone help to figure this out?
Thanks! 65.91.7.194 17:52, 24 March 2014 (UTC)
I do believe you, but MediaWiki does not. What do you get when you put a file with this content on your webserver
<?php phpinfo() ?>
and when you then call this file with your webbrowser? Does it contain a section on MySQL? Does it also say that MySQL would be "enabled"? 88.130.94.198 18:22, 24 March 2014 (UTC)
Hi Team,
The PHPINFO tag was not working at all, even thought the Wiki pages work.
So uninstalled PHP completely, and reinstalled everything, and then I was able to upgrade.
Very strange, but it is now resolved.
Thanks! 65.91.7.194 18:42, 4 April 2014 (UTC)

[RESOLVED] Expand collapsed elements by anchor

I have a 10 divs with the mw-collapsible mw-collapsed class, they are all working fine but I would like to expand a specific div depending on the anchor in the link.

Is this possible? 108.174.24.202 (talk) 16:01, 24 March 2014 (UTC)

I found the solution by adding a function to Common.js:
$( document ).ready(function() {
   $(expandByAnchor()).removeClass('mw-collapsed');  
});
 
var expandByAnchor = function() {
   if(window.location.hash) 
   {
      var hash = window.location.hash; //Leaves # character
      return (hash);      
   } 
   else
   {
      return ('');
   }
};
108.174.24.202 19:19, 24 March 2014 (UTC)

mediawiki 1.22.4 Unable to create the localisation store directory "$IP/cache"

I installed Mediawiki 1.22.4 and I am getting the following error: /LocalisationCache.php: Unable to create the localisation store directory "$IP/cache" For now, I have created a symlink pointing to $IP of Mediawiki 1.19.1 version as a quick fix. However, I am not sure how to fix this in a legitimate way. I do not see any $IP directory after downloading the newer version i.e. 1.22.4. Any suggestions? Extra note: I formerly had mediawiki 1.19.1. But since I had no data, in place of upgrade, I did a fresh installation of mediawiki 1.22.4. This caused only the Database to upgrade during the configuration 129.174.150.136 (talk) 20:07, 24 March 2014 (UTC)

$IP is a MediaWiki variable in PHP files that should expand to the installation directory. It's really weird that you got the "$IP" in a error message without being substituted by the actual installation path. Ciencia Al Poder (talk) 10:20, 26 April 2014 (UTC)
if you have the any extensions update them. 94.197.122.88 10:44, 26 April 2014 (UTC)

difference between chrome and firefox

if my WKI is shown in Chrome 33 the left navigation resides at the end of the page. With IE and Firofox the navigation is displayed as expected. http://wiki.dc-car.de/index.php?title=Hauptseite

Need your help! Claus Ilchmann 46.237.205.102 (talk) 08:26, 25 March 2014 (UTC)

CirrusSearch Not Work

This post by タチコマ robot was moved on 2015-06-15. You can find it at Extension talk:CirrusSearch/2014#h-Installing_Cirrus_Search_on_Windows-2014-03-24T11:46:00.000Z. Ciencia Al Poder (talk) 10:20, 25 March 2014 (UTC)

How to prepare link to xls file ? That -> When I click path, file xls will be open in Excel. 195.20.110.102 (talk) 11:16, 25 March 2014 (UTC)

That depends on having Excel installed in your computer and your browser being condfigured to open it when a .xls file is opened. Ciencia Al Poder (talk) 10:44, 26 March 2014 (UTC)
If you upload xls files to your wiki (note there is security risk of macro viruses if you let anyone do that), you can link via [[media:Filename.xls]] (assuming user has excel installed) Bawolff (talk) 04:38, 1 April 2014 (UTC)

list all pages on main page alphabatically

mediawiki version: 1.22.0 PHP: 5.3.3 (apache2handler) MYSQL: 5.1.69

Hello,

I am looking to list all pages created by users show on main page of my mediawiki site alphabetically. can anyone please suggest on how to achieve this?

Thanks, abhi 198.179.137.247 (talk) 15:34, 25 March 2014 (UTC)

You can achieve that adding {{Special:Allpages}} to the page.
Another option is to use any Extension:DynamicPageList. Ciencia Al Poder (talk) 10:46, 26 March 2014 (UTC)

MediaWiki 1.22.4, MySQL 5.5.35, PHP 5

MediaWiki application – documents database.

Wiki pages may include links for downloading documents (doc, pdf, xls) from external ftp server.

These links should only be accessible for administrators, so simple users cannot access these links.

How to make that?

Users/passwords at our ftp server are made same as at our wiki engine to access ftp server automatically without the need to login manually.

What we already did:

 Example of links [ftp://user:password@IP address:port/folder/file.pdf DOCUMENT NAME]

‘user:password@IP address:port’ should not be at source code at all!

Please, help, who has any ideas, appropriate extensions or advise who knows …

Thanks Volodymyr~mediawikiwiki (talk) 17:41, 25 March 2014 (UTC)

Hi!
I could imagine the following:
Maybe you could use JavaScript (jQuery?) to modify FTP/SFTP links the way you like. However, that means you would have to have the user's password available in JavaScript in cleartext. My gut feeling is that this is no good idea.
Another possibility: Use a hook, which allows you to modify links while MediaWiki creates them. Manual:Hooks/LinkerMakeExternalLink might be a choice. In this hook, check $url to see, if it's a FTP/SFTP link and if so, use $wgUser to change $url so that it contains the current user's username/password the way you showed above.
However, note that this will have the drawback that you MUST deactivate caching - otherwise MediaWiki will serve users pages with the links, which have been created for other users. Not only that they would then be allowed to access the files although they should not, even worth: They will also be able to see the other users' passwords. 88.130.74.194 18:01, 25 March 2014 (UTC)
Please, can you give more direct advises for editing Linker.php and codes for using hooks in wikitext?
You can try at my installed wiki http://testpool.orgfree.com (all passwords at main page)
I guaranty free sightseeing around Kiev and Maidan and stand treat in local pub))) Volodymyr (talk) 18:56, 27 March 2014 (UTC)
Hi!
There is no need to edit Linker.php; just put something like this in your LocalSettings.php file:
$wgHooks['LinkerMakeExternalLink'][] = 'modifyFTPLinks';
function modifyFTPLinks( &$url, &$text, &$link, &$attribs ) {
  global $wgUser;
  if(substr( $url, 0, 6 ) === "ftp://") {
    $username = $wgUser->whoIs();
    // Not sure if that works...
    $password = $wgUser->mPassword;
    $urlWithoutProtocol = substr($url, 6);
    $url = "ftp://" . $username . ":" . $password . "@" . $urlWithoutProtocol;
  }
 return TRUE;
}
The code is untested, but I think you see what I mean. 88.130.123.198 22:28, 27 March 2014 (UTC)
$wgHooks['LinkerMakeExternalLink'][] = 'modifyFTPLinks';
 
function modifyFTPLinks( &$url, &$text, &$link, &$attribs ) {
  global $wgUser; 
  if(substr( $url, 0, 6 ) === "ftp://") {
    $username    = $wgUser->mName;
    $password    = $wgUser->mPassword;
    $ipAddress   = "Insert address here";
    $port        = "Insert port here";
	
    $urlWithoutProtocol = substr($url, 6);
    $url = "ftp://$username:$password@$ipAddress:$port/$urlWithoutProtocol";
  }
  return true;
}
Fereal (talk) 00:21, 28 March 2014 (UTC)
This is a silly thing to hide. Users can get passwords by hitting view source in their browsers. You cannot tell the web browser what the password is, without telling the user, as the web browser is controlled by the user. Bawolff (talk) 04:36, 1 April 2014 (UTC)
The code is not meant to hide anything. As OP stated, the FTP's username and password are tied to MediaWiki, and the user's credentials are the one that will be used. The code dynamically redirects based on the user logged in.
In other words, the wiki source will look like
[ftp://folder/file.pdf DOCUMENT NAME]

And it would be redirected to ftp://mediawikiusername:mediawikipassword@ipaddress:port/folder/file.pdf. It would be up to the FTP server to allow or deny the access. Yes, the user can see the hashed password, but it's his own password. Fereal (talk) 06:22, 1 April 2014 (UTC)

> the user can see the hashed password, but it's his own password.
...as long as caching really is deactivated! When MediaWiki only caches one such page and there is a way to get that page from cache again, you have a major security problem as this can basically leak all your users' passwords! You must make really, really sure that caching definitely is deactivated completely. This again will have negative impact on performance. 88.130.101.135 12:01, 1 April 2014 (UTC)
Couldn't you just disable per-page caching whenever the ftp condition is met
global $wgOut;
$wgOut->enableClientCache(false);
Extensions_FAQ#How_do_I_disable_caching_for_pages_using_my_extension.3F Fereal (talk) 13:42, 1 April 2014 (UTC)
My apologies, I obviously didn't read closely enough.
Note, for this to work you need to disable both parser cache ($parser->disableCache()) and client cache. Bawolff (talk) 22:19, 1 April 2014 (UTC)

[RESOLVED] PHP mail()

Hello, when I established my wiki, I met a problem that when I creat a new user and input my email account, it will shows that: 邮件发送器的返回信息:在 PHP 的 mail() 函数中的未知错误 which means that there are some unknown errors in PHP mail() function. Did you meet the same problem? Please give me some help! Thanks a lot. 114.66.4.217 (talk) 06:34, 26 March 2014 (UTC)

Take a look at Manual:$wgSMTP and see if you've configured it correctly. Ciencia Al Poder (talk) 10:45, 27 March 2014 (UTC)
Hello again!Thanks for your help and I checked code about SMTP as following:
/**
* SMTP Mode.
*
* For using a direct (authenticated) SMTP server connection.
* Default to false or fill an array :
*
* @code
* $wgSMTP = array(
* 'host' => 'SMTP domain',
* 'IDHost' => 'domain for MessageID',
* 'port' => '25',
* 'auth' => [true|false],
* 'username' => [SMTP username],
* 'password' => [SMTP password],
* );
* @endcode
*/
$wgSMTP = false;
This is the code about SMTP in DefaulingSettings and does it mean that the service of SMTP was not used?
And I checked errorlog, there was an error that:sh: 1: /usr/bin/sendmail: not found
I was really confused due to my limited knowledge ;( 114.66.4.217 06:31, 31 March 2014 (UTC)
DefaultSettings.php is a file containing the default settings for MediaWiki. You must not change that file, but modify the value of the variables you want in LocalSettings.php instead.
You may need to set up $wgSMTP depending on your scenario, specially if your mail server needs authentication for sending mails. Ciencia Al Poder (talk) 09:40, 31 March 2014 (UTC)
Thank you for your kind reply!
I fixed that error finally! The wrong thing was that I added a sentence as
$wgSMTP = true; 114.66.4.217 07:56, 4 April 2014 (UTC)
Thank you for your kind reply!
I fixed that error finally! The wrong thing was that I added a sentence as
$wgSMTP = true; 114.66.4.217 07:56, 4 April 2014 (UTC)
Hi, I recommend to take a look at Manual:How_to_debug and provide very basic information, like PHP and MediaWiki version, plus finding out how to get way better debug information for PHP's mail issues. AKlapper (WMF) (talk) 11:46, 27 March 2014 (UTC)
Thanks for your kind help!
I checked errorlog ,and found out the error message that
sh: 1: /usr/bin/sendmail: not found
Any help will really help me! Thanks a lot again!:) 114.66.4.217 06:34, 31 March 2014 (UTC)
If "/usr/bin/sendmail" is "not found" you might want to install it? AKlapper (WMF) (talk) 07:59, 31 March 2014 (UTC)
Would you mind to give me some advice to install it?
I copied sendmail.php from php/lib/php/Mail to /usr/bin/sendmail, but it still did not work...not found again...T-T 114.66.4.217 08:59, 31 March 2014 (UTC)
Use the packet manager of your linux distribution: apt, yum, zypper... Ciencia Al Poder (talk) 09:42, 31 March 2014 (UTC)
Assuming this is a Unix/Linux based system (due to /usr/bin/), how would you install any other application on your system? The same way you install Sendmail... Cannot give better instructions as I know nothing about your system. AKlapper (WMF) (talk) 10:00, 31 March 2014 (UTC)

How to Display Realnames rather than Usernames in mediawiki ?

Hey am newbie in the mediawiki!
Could any one help me how to make Real Names as display names in the wiki.
As of now it was displaying the user names as display, due to security reasons I want to make realnames to display?
Any clue will be more helpful! Kumaaar (talk) 07:56, 26 March 2014 (UTC)

Hi!
I think it would be possible to display the real name instead of the username at some places, but not at all of them. E.g. for the menu at the top right corner of the page, you could use a hook and change the link text. But for RecentChanges already I don't know how one could suppress the names (without changing MediaWiki Core files [which is bad]). And then there still are Contribution pages and the API, which also provide information about usernames.
It all boils down to: If someone really wants to know usernames, he will get them.
Why do you think showing usernames would be a security problem? 88.130.74.194 11:26, 26 March 2014 (UTC)
Also note that displaying real names in RecentChanges, page histories and logs can cause confusion when different users have the same real name (if they're able to change it) Ciencia Al Poder (talk) 10:28, 27 March 2014 (UTC)

[SOLVED]Mediawiki 1.19.1 - MySQL Database Connection error

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Dear support desk team,
I have MySQL server 5.1.73 running on my CentOS machine, and am trying to get Mediawiki installed on another system, to connect to this database server.
However, from the same system, I can connect to the database server, with the same credentials, from the console.
What could be stopping MediaWiki from connecting to the remote database server, eventhough I mention the correct hostname, username and password in my LocalSettings.php?
## Database settings
$wgDBtype           = "mysql";
$wgDBserver         = "xxxx";
$wgDBname           = "wiki";
$wgDBuser           = "wikiDbUser";
$wgDBpassword       = "wikiDbUser";
The error message is as follows (The hostname is intentionally marked as xxxx).
DB connection error: Can't connect to MySQL server on 'xxxxx' (13) (xxxxxx).
Check the host, username and password and try again.
Many thanks for your help!
Kind regards Kyn~mediawikiwiki (talk) 12:38, 26 March 2014 (UTC)
Could someone help me out here, please? Do you need more information? Kyn (talk) 10:01, 27 March 2014 (UTC)
Error 13 means "Permission denied"
When you say "from the same system, I can connect to the database server, with the same credentials, from the console", are you saying you're connecting from the server where Mysql is running, or where MediaWiki is installed? Ciencia Al Poder (talk) 10:38, 27 March 2014 (UTC)
many thanks for your time and reply..
I am trying to connect from Server A where Mediawiki is installed, to Server B which runs the MySQL server.
I have access to the wiki database on Server B, from Server A, through the console (terminal window), with the same credentials, I specified in LocalSettings.php.
However, mediawiki gives me this error no. 13, when trying to connect to the wiki database on Server B.
Many thanks again... 192.54.144.229 12:39, 27 March 2014 (UTC)
Various posts suggest that the problem is with SELinux, and you should disable it (or configure it somehow to allow PHP to connect to mysql): , Ciencia Al Poder (talk) 10:37, 28 March 2014 (UTC)
Hi Ciencia,
Thank you so much for your time and effortǃ You have solved my issueǃ
From a comment on the post, I did the following without having to disable SELinux.
setsebool -P httpd_can_network_connect=1
which allows Apache to connect to my remote MySQL server.
Many thanks againǃǃǃǃǃǃ Kyn (talk) 15:44, 28 March 2014 (UTC)
Savior.
Thanks for this.
I have been wondering around it 157.48.207.200 (talk) 18:46, 17 August 2020 (UTC)
You're savior man 157.48.207.200 (talk) 18:45, 17 August 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Is it possible to use personal css and/or js to change the destination of a link in the interface? Say, if I wanted to make my uploads link to my contributions (dumb example, but yeah). I know how to remove a link and put a new one around the same place, but that's not precisely what I want here... Purplewowies (talk) 20:28, 26 March 2014 (UTC)

Making the "Contributions" portlet link to "Special:MyUploads":
$('#pt-mycontris a').attr('href', mw.util.getUrl('Special:MyUploads'));
Ricordisamoa 15:25, 30 March 2014 (UTC)

Create Account Process Issues

I do not want a new user to be able to create/edit the wiki until their email address is confirmed.I believe I have done all that is required but it does not seem to work.

I have checked Enablemail=true to get basic email features. Added $wgGroupPermissions['*']['edit'] = false; to stop automatic registration. Added $wgEmailAuthentication=true; to enable email authorisatoin Added $wgEmailConfirmToEdit=true; to require confirmation before editing.

When new Create Account form comes up it asks for email address but still lets people edit page and seems to set them as Autoconfirmed User Group.

http://www.sagesaffron.co.uk/wiki/index.php?title=Main_Page Wki version 1.21.1 PHP 5.3.13 My Sql 5.5.32

Can you help as I cannot see what I am doing wrong SageUK (talk) 16:56, 27 March 2014 (UTC)

$wgEmailConfirmToEdit = true; should make it like the person is blocked unless their email is confirmed. Its separate from the $wgGroupPermissions route, and the auto-confirmed group. To trigger the autoconfirmed group to pay attention to email, you have to modify $wgAutopromote.
It might help to figure out the issue if you posted your LocalSettings.php (remove any passwords, $wgSecretKey) Bawolff (talk) 03:54, 1 April 2014 (UTC)

How to change format of lastmod's date/time

How can you change the date/time format of last mod?
Eg, changing "This page was last modified on 20 March 2014, at 16:00." to "This page was last modified on March 20, 2014, at 4:00PM."
Edit: Date can be set at preferences, but is there something for time format? Fereal (talk) 00:24, 28 March 2014 (UTC)
Hi!
I assume you are speaking about the line below each wiki page. I don't know, if there is an option for changing the date format of this setting currently, but you can read the PHP code to find out... 88.130.123.198 01:31, 28 March 2014 (UTC)
Remembered that the date format can be set in user preferences, so it can be set in $wgDefaultUserOptions for anon visitors.
I'm still looking to modify the time format, as not everyone is comfortable with 24-hour format. Fereal (talk) 01:36, 28 March 2014 (UTC)
Umm, that's not really that configurable. Basically the choices are controlled by $datePreferences, with the definition of the choices in the $dateFormats array in languages/messages/MessagesEn.php Basically, the letter H symbolize 24 hour, and the symbole g would symbolize 12 hour per Help:Extension:ParserFunctions#.23time Bawolff (talk) 04:34, 1 April 2014 (UTC)
Okay, so I'm looking for a less ambiguous answer, more on the binary yes or no type.
Can I or can I not set the time format without modifying core/implementing an extension? Fereal (talk) 06:52, 1 April 2014 (UTC)
You cannot change it without modifying core except to one of the predefined forms (So you can change between ydm, mdy, etc)
As a minor exception, you could potentially use lua or {{#time to try and and wiki code to mediawiki:lastmodifiedat to parse the date, but that may be hard Bawolff (talk) 22:04, 1 April 2014 (UTC)
$wgOut->parse("{{#time: H:i:s, j F Y}}") is not user specified.
$wgOut->getLanguage()->userTimeAndDate($time, $wgUser, array("format" => "dD")); user specified but allows only predefined in Messages*.php formats (ydm, mdy).
So stupid. 2nd 11:09, 21 June 2014 (UTC)
Possible solution:
$userCorrection = explode("|", $wgUser->getOption("timecorrection"));
$userCorrection = strtotime("+".$userCorrection[1]." minutes") - time();
$date = trim(strip_tags($wgOut->parse("{{#time: H:i:s, j F Y|+".$userCorrection." sec}}")));
2nd 13:13, 21 June 2014 (UTC)
In the following environment:
  • MediaWiki 1.35.8
  • Extension:ParserFunctions 1.6.0
I added the following to LocalSettings.php :
$wgLocaltimezone = "America/Denver";
$wgLocalTZoffset = -360;
And changed the system message MediaWiki:Lastmodifiedat to:
This page was last edited on $1, at {{#time: h:ia|$2}} ({{#time: e|now|en|local}}).
This now shows the message at the bottom of wiki pages as:
Example

This page was last edited on 22 March 2023, at 03:16pm (America/Denver)

Hobart (talk) 21:51, 22 March 2023 (UTC)

pagina "ora legale nel mondo"

nella pagina dedicata a "ora LEGALE nel mondo" https://it.wikipedia.org/wiki/Ora_legale_nel_mondo

mi sembra di aver visto un errore..

cito (circa a metà pagina): Russia In Russia l'ora legale è stata introdotta per la prima volta il 1º luglio 1917 per decreto del Governo provvisorio russo ed abbandonata tramite un decreto del Sovnarkom cinque mesi dopo, applicato il 27 dicembre dello stesso anno. È stata poi reintrodotta in era sovietica il 1º aprile 1981, per decisione del Consiglio dei ministri sovietico, e la pratica è continuata anche dopo lo scioglimento dell'URSS; sono state adottate le stesse regole dei Paesi europei, con l'unica differenza che il cambio di orario avveniva alle 02:00 ora locale. L'8 febbraio 2011, il Presidente della Russia Dmitry Medvedev ha annunciato l'abolizione dell'ora solare in Russia, disponendo l'ultimo avanzamento di orario per il mese successivo.[17] Dopo questa riforma, diverse città russe adottano un fuso orario avanzato di due ore rispetto a quello geografico.

in particolare: L'8 febbraio 2011, il Presidente della Russia Dmitry Medvedev ha annunciato l'abolizione dell'ora SOLARE ( o LEGALE ?!? ) in Russia, disponendo .... legale o solare? in russia hanno abolito l'ora legale e quindi c'è sempre l'ora solare?! ?? BooC (talk) 13:17, 28 March 2014 (UTC)

If I understand correctly, this is better discussed on the discussion page for that talk. Please bring this up on https://it.wikipedia.org/wiki/Discussione:Ora_legale_nel_mondo AKlapper (WMF) (talk) 13:59, 28 March 2014 (UTC)
i can't understand how it works (discussion/thread/errors ... no idea) .. anyway in my opinion that page seems to be not correct ...
i cannot "bring it up" .. i'll try but probably it's going to become a mess
thanks AKlapper/WMF (is that your nick?) BooC (talk) 14:17, 28 March 2014 (UTC)
BooC has in the meantime posted his question on that page; looks good now. :-) 88.130.95.49 14:24, 28 March 2014 (UTC)

Hello,

I would like to know if it is possible (and if so how) to format a #formlink button. The default makes a grey button on the left side. Is it possible to align the button to the right side of the page? What about changing the font or button color? Any help would be appreciated.

Thanks and regards, Triangulus 193.29.76.37 (talk) 16:42, 28 March 2014 (UTC)

Yes, you can use CSS to alter the format of HTML elements. You may need to learn how to write CSS rules. Once you know that, you can post the CSS code in one of the pages described in Manual:Interface/Stylesheets Ciencia Al Poder (talk) 09:46, 31 March 2014 (UTC)
Thanks, for the reply. Can you please provide a hint as to how to create a call to the specific formlink/button element in the Common.css?
If it helps, what I want to accomplish is to add a button to a page which will be located above a right floated infobox element. The called form will create/edit designated content of the infobox.
Details of my formlink:
{{#formlink:form=Review Date|link text=Add or change Review Date|link type=button|target=Project:Support_desk/Flow/2014/03|popup}}
Many thanks in advance,
Tri 193.29.76.37 15:38, 1 April 2014 (UTC)
Correction: The formlink should be {{#formlink:form=Review Date|link text=Add or change Review Date|link type=button|target={{#parsoid\0fragment:0}}|popup}}
FULLPAGENAMEE grabbed the name of this thread. 193.29.76.37 15:45, 1 April 2014 (UTC)
I don't know what utput produces {{#formlink: }}, since as you can see, it doesn't work here. Providing a link to a wiki where I could see that code working would help. Ciencia Al Poder (talk) 09:20, 2 April 2014 (UTC)
formlink is a function of the Semantic Forms extension.
Unfortunately our company wiki is internal, but I have found recreated the functionality here: http://scratchpad.referata.com/wiki/Formlinktest 193.29.76.37 15:00, 2 April 2014 (UTC)
Wrap the button inside this: <div style="float: right;"> {{#formlink: ... }} </div>
And place it before the infobox. Ciencia Al Poder (talk) 09:36, 3 April 2014 (UTC)

centralauth database help

hi do you know what databse this

Previous global account changes 15:50, 29 March 2014 Me (Talk | contribs | block) deleted global account "Usuário:Me@global" (none)

uses for centralauth because I have added my password in the reason place. please help I need to delete the table. so that no one see my password. 86.135.255.226 (talk) 16:27, 29 March 2014 (UTC)

I just need to find the table in the databse that holds the delete centralauth global accounts and so I can delete the reason too 86.135.255.226 17:38, 29 March 2014 (UTC)
log reasons will usually go in the logging table not in the central auth tables.
We discourage people from editing db tables directly. Instead consider giving yourself deletelogentry rights (and suppressrevision rights if you don't trust your admins), and using RevisionDelete to remove the log Bawolff (talk) 04:26, 1 April 2014 (UTC)
ok thanks 94.197.122.74 12:05, 9 April 2014 (UTC)

Update fails with 'Error code: ERR_CONTENT_DECODING_FAILED'

Hi,

I have a problem updating a rather old (v1.6.10) MW installation to v1.22. I don't have command line access to the webserver, so have to use the web updater.

All goes fine at first: I provide the update key, then 'Environmental checks and database connection are okay. At the 'Upgrade existing installation' stage, the updater confirms: "There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.22.5, click Continue." ... but the update fails, with the following error message: Error code: ERR_CONTENT_DECODING_FAILED

I have tried 3 different browsers (Chrome, FF and Safari); same problem each time, so doesn't seem to be a browser issue.

A previous support post here suggested setting $wgDisableOutputCompression = true; in LocalSettings.php. This doesn't fix the problem for me.

Any suggestions? Thanks...

Del 86.20.29.159 (talk) 17:06, 29 March 2014 (UTC)

Do you know where the error message comes from? When I search it together with "MediaWiki", I get only 6 results; it is also there for several other systems (Drupal, WordPress) and not only MediaWiki. As to what you write, it also is not browser-dependant. So I think it is a problem in the server.
The error you get is error 330. According to internet posts, it happens when your HTTP request's headers claim that the content would be gzip-encoded, but it isn't. Turn off gzip encoding on the server level or make sure the content is in fact encoded. 88.130.94.19 18:53, 29 March 2014 (UTC)
Thanks...
Yep - it's a server error. I don't have admin rights for the server, so can't change or configure compression settings.
Strange it doesn't affect all of the pages during update process; the first 5 steps work fine. I guess these aren't compressed...
I tried both enabling & disabling gzip compression in LocalSettings.php, with same result.
Fortunately not a big site, so last resort is to transfer the old content into the new installation. *sigh*
D 86.20.29.159 22:19, 29 March 2014 (UTC)
For the time being, I would ask the host, what he would say, how to solve the problem. I think, things would be easier, if gzip compression would be disabled. So I would disable gzip compression in LocalSettings.php for the time being.
There are also some guys from Wikimedia Foundation, who come around here sometimes; maybe they know more... 88.130.64.196 13:30, 30 March 2014 (UTC)
Is it at all possible to use the command line update.php script to update your wiki? (I assume this is a problem only during the upgrade, not during normal browsing of your wiki).
Its kind of odd getting this error during the installer, as MediaWiki is already supposed to be disabling output compression during install.
If you can't make the command line installer work, I guess it would be time for debugging steps - Do you have any errors in php error log. Can you look at the headers of the relavent request (using developer tools that come with your browser for example) and see what the content-encoding header for that page. Can you see what the raw response body (what the web server actually sends) for that page, and if so, is it really just gzipped twice, or something else. Bawolff (talk) 04:23, 1 April 2014 (UTC)

Page hits are displayed with 1

After the upgrade of an wiki from MW 1.21 to 1.22 the access statistics displayed at the bottom of every page, i.e. the indidual hitcounter, is 1 ("This page was accessed once") for every page in the wiki. However, when I look at the "page" table in the database the actual number of hits is still in the "page_counter" fields. "Special:PopularPages" also displays only 1 for every page. Did somebody experience the same and is there a way to get the wiki display the correct and still stored numbers?

I did not touch any settings during the upgrade, however it was the very first time I used the webupdater (just out of curiosity). [[kgh]] (talk) 09:17, 30 March 2014 (UTC)

Sounds like what you did worked out fine; these numbers also should be taken from the field "page_counter" in the page table.
I would now read the source code, which builds that part of the wiki page and see, when (or why) you have a "1" there. I could imagine that somehow MediaWiki works with a value of "TRUE" there, which PHP can convert into "1". However, just a guess.
Btw: Which skin are you using? Vector or an own skin? Please make sure that this skin has been updated as well (also that the skin file Vector.php has been updated). 88.130.64.196 13:33, 30 March 2014 (UTC)
Well, I just found the cause of the issue and all actual page hits are back. It is basically a no-frills wiki with only small CSS-adjustments in "MediaWiki:Vector.css". I use $wgCacheDirectory to store the I18n cache in the local file system. For some reason it was "falsely" created upon my upgrade two days ago. So, I just deleted the cdb-files and now everything is fluffy again with the now newly created cache files. I wonder why this did not happen before with previous upgrades. I suspect this may have something to do with the webupdater, though this does not really make sense to me. However I could have figured this out by myself to tell you the truth.
Thank you for your suggestions anyway! [[kgh]] (talk) 13:39, 31 March 2014 (UTC)

Mass disappearance of pages in mediawiki upgrade

Greetings. I spent most of this weekend manually upgrading from 1.12 to 1.22.5. Finally, the wiki appears to be upgraded. However, almost all of the pages and images from 1.12 on the 1.22.5 install are missing. Also, when I got to Preferences, I get two error messages: Notice: Uncommitted DB writes (transaction from DatabaseBase::query (User::loadFromDatabase)). in /home2/babylon6/public_html/democraticvistas/includes/db/Database.php on line 3944

Notice: DB transaction callbacks still pending (from Title::invalidateCache). in /home2/babylon6/public_html/democraticvistas/includes/db/Database.php on line 3953

Wiki is here: http://democraticvistas.net/index.php?title=American_Literature_(1865_-_1914) MySQL version 5.5.36 PHP version 5.4.26

I'm not a tech person but have educated myself in the basics by working with Wordpress, BuddyPress, Mediawiki, etc. for five or six years. I'd like to make this install work. But, perhaps it is better to rewind and upgrade incrementally rather than in one great leap forward? In other words, help! Thanks in advance. Profhanley (talk) 15:46, 30 March 2014 (UTC)

Hi!
The PHP notices are not relevant for you; you could change the error reporting settings of PHP, if you do no longer want to see them.
Upgrading in one step (instead of in different steps) should be fine.
Some extensions are currently still missing, e.g. the <videoflash> tag is not rendered currently. However, the page, that you linked to, does contain some content and I can also see it and the pages linked on that page. For which pages do you have problems? 88.130.64.196 17:44, 30 March 2014 (UTC)
Thanks. The site functions as a kind American lit anthology authored by students in successive classes. So, for instance, the Texts page should have links to about 20 to 25 pages with texts (The Waste Land,short stories, etc.). I can't explain why just the just the Whitman - "Song of Myself" page remains. In addition, there were author pages (Twain, Whitman, Chopin, etc.). The Contexts link should, again, contain links to various historical, thematic, etc., pages that the students authored. All of these pages - -and work - -have disappeared. I'm stymied. Profhanley (talk) 18:28, 30 March 2014 (UTC)
You say that the pages now after the update contain wrong content. As far as I understand you, they should contain other text (more text or so).
This looks as if something got broken inside the database during the upgrade. However, I must say that I have never seen a case, where suddenly old revisions of pages were used after an upgrade. In this case, entries in the database table "text" should be missing, the revision table should point to other texts and when you try to access a page you should see errors over errors. But you don't.
Your Recent Changes page goes back to 2010 or so. It does not show any edits after January 2nd 2011. Is this the current state of your wiki or have you maybe used an old version of the database for this upgrade?
I would now replace this database with the backup from before the upgrade, make sure that this backup really is current and then run the upgrade script on this database again. 88.130.64.196 21:52, 30 March 2014 (UTC)
Yes, I haven't used it for a class in three or four semesters. I used the database with edits up to 1/2/11 for the upgrade. I guess I will rewind the whole site to previous version 1.12 and restart the upgrade. (I did have problems with connecting to the database in the first couple of upgrade attempts.) Thanks. I'll post here when I get some more positive results. Profhanley (talk) 01:16, 31 March 2014 (UTC)
Page looks fine to me now (afaict). Did you fix your issue? Bawolff (talk) 04:11, 1 April 2014 (UTC)

Are their any audio player extension support mediawiki's usage track function?

For example the Air_raid_alarm_in_China.ogg post below have a "File usage on wikis" list. Are their any other extension support such function?

https://commons.wikimedia.org/wiki/File:Air_raid_alarm_in_China.ogg

Currently we are using Extension:FlashMP3. This extension will not show which page used the file which made usage track difficult. Deletedaccount4567435 (talk) 03:54, 31 March 2014 (UTC)

So the string is "File usage on other wikis" instead and that comes from Extension:GlobalUsage - should be unrelated to some player extension. AKlapper (WMF) (talk) 10:11, 31 March 2014 (UTC)
It's supported by any proper media handling extension. Basically, if the extension you use includes the image on a page by doing code like [[File:Foo.mp3|...]], then it will work. FlashMP3 is using <flashmp3> syntax, which is not the proper way for including media files, and hence the usage tracking doesn't work.
Extensions that do do it properly are:
As a clarifying note, "File usage on other wikis" comes from GlobalUsage, but the plain "File usage" section is built in to core and you don't need any extensions for that. Bawolff (talk) 04:08, 1 April 2014 (UTC)
Awesome! Thank you both! Zoglun (talk) 02:12, 30 May 2014 (UTC)
Question: How can I enable MP3 support for Extension:TimedMediaHandler? Zoglun (talk) 06:49, 15 June 2014 (UTC)

Session Hijacking error after Update 1.19.14

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello,
after updating my Intranet-Wiki to Mediawiki 1.19.14 I receive an error on every Password Reset. This can be reproduced by all users:
There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again.
I already tried different things, but can't find a solutiong. My /tmp is writeable.
I am using Mediawiki 1.19.14, PHP 5.3.10, MySQL 5.5.35 on an Ubuntu 12.04 LTS.
Can anybody please help on this issue?
Thanks in Advance. 194.138.39.53 (talk) 05:54, 31 March 2014 (UTC)
Who triggers that error? MediaWiki itself? Your browser? AKlapper (WMF) (talk) 10:04, 31 March 2014 (UTC)
The error ist triggered by Mediawiki. I commented out the Diffs which came with MW 1.19.14 to includes/special/SpecialChangePassword.php and the errors dissapear. 194.138.39.53 10:18, 31 March 2014 (UTC)
https://www.mediawiki.org/wiki/Release_notes/1.19#Changes_since_1.19.13 lists bugzilla:62497 as the culprit. You might want to provide browser information and bring it up there. AKlapper (WMF) (talk) 10:29, 31 March 2014 (UTC)
This was a mistake in the backport to MW 1.19.14. I already sent a patch for it to Markus to see if we can get the fix released. If you want to fix it in the mean time, open up includes/specials/SpecialChangePassword.php go to line 154 which should be:
			$loginOnChangeToken = LoginForm::getLoginToken();
And change it to:
			$loginOnChangeToken = Html::hidden( 'wpLoginOnChangeToken', LoginForm::getLoginToken() );
Grunny (talk) 11:30, 31 March 2014 (UTC)
This fix works, thank you very much! 194.138.39.53 12:36, 31 March 2014 (UTC)
The error here occurred in a MediaWiki v1.16.5 install in BlueOnyx server. The Apache error log exceeded 3.2GB was corrected by purging it with:
>/var/log/httpd/error_log 117.193.4.10 (talk) 09:31, 25 June 2016 (UTC)
I just tried to install 1.27, clean install, and I also got this error. What I did notice was that at one point the installer asks "End now" or "ask more questions." If I tried to install through the whole installer, I would get this error. If I stopped the installation after the "End now", I would not get this session error. It is really annoying that this problem still exists in version 1.27. Zzmonty (talk) 18:36, 16 August 2016 (UTC)
I was having the exact same problem with 1.27.1 and comparing the resulting setting files showed the difference to be in $wgMainCacheType. Logins worked when caching was disabled, and after a bit more poking around it seems to be a problem with APCu session caching not working. The following is what did it for me:
$wgMainCacheType = CACHE_ACCEL;
$wgSessionCacheType = CACHE_DB; 205.213.104.120 (talk) 19:38, 28 September 2016 (UTC)
This fix worked for me, thanks. 2A02:1810:A438:8E00:A054:5808:5A:8989 (talk) 10:02, 12 November 2016 (UTC)
This correction worked for me, also. 174.77.79.55 (talk) 16:32, 30 September 2016 (UTC)
The problem does not still exist in 1.27. It's a different problem (likely due to AuthManager code changes) with the same message displayed. Malyacko (talk) 06:43, 17 August 2016 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

SVG blurry

I uploaded an SVG file to our corporate wiki (intranet, MediaWiki 1.12.0) after I asked IT staff to enable that file extension. It converts it to a very blurry PNG instead. When I click on the original file on the image page, the browser renders the PNG sharp, but when I look at it on the image page or wherever I insert it on a wiki page, I see that very blurry PNG image.

My idea was that I'd replace every PNG file (that I previously rasterized manually) with an SVG that will stay sharp regardless of browser zoom.

After searching for the reason, I found somewhere that an SVG file is converted to a PNG file in case some old browser doesn't render SVG *ugh*IE*ugh*, but this the polar opposite of my intention. In our company it's guaranteed that SVG will render. Is there a way to turn of this conversion? --Zom-B (talk) 08:54, 31 March 2014 (UTC)

tracked as bug 3593
You can also try Extension:NativeSvgHandler Ciencia Al Poder (talk) 09:55, 31 March 2014 (UTC)
What is "that extension" (name?) when you talk about enabling it? 1.12 is really ancient history so no idea how MediaWiki behaved in which situation back in those days... :) AKlapper (WMF) (talk) 10:01, 31 March 2014 (UTC)
That [file] extension. Zom-B (talk) 11:06, 31 March 2014 (UTC)
SVG handling really hasn't changed that much since it was introduced.
Various svg renders are of varying qualities. Telling mediawiki to use a different one may improve quality. However that's ultimately not what you're after. Bawolff (talk) 04:01, 1 April 2014 (UTC)

How to create Help: pages in my wiki?

I'm creating a wiki about the WWII here: http://wikimemoria.weboil.it It's localized in italian language. In "navigation" box on the left there's a link to help pages ("Aiuto"). Following the link i reach the page http://wikimemoria.weboil.it/anpi/Aiuto:Indice (i suppose "Help:Index" in english language). The page is empty, I cannot create or edit any Aiuto:_something_ page even if logged in as WikiSysop. The error message says I don't have permissions to create that page. I would like to use the Aiuto: (Help:) pages to give information about formatting text, upload images and so on. I need help to create the help pages, I found no help page concerning help pages. Please help :)

Thanks in advance. Alfredo.paduano (talk) 12:48, 31 March 2014 (UTC)

According to http://wikimemoria.weboil.it/anpi/Speciale:ElencoPermessiGruppi , nobody on your wiki has the rights to create a non-talk namespace page. help pages are non-talk namespace pages. Give some folks the createpage rights in $wgGroupPermissions Bawolff (talk) 03:59, 1 April 2014 (UTC)

Database password is clear

I found that the password is readable in LocalSettings.php file, but it would be better if it was encrypted. There is some way to convert it in encrypted format?
Many Thanks.
MediaWiki: 1.22.5
PHP: 5.5.8 (cgi-fcgi)
MySQL: 5.6.15-log Salclem2 (talk) 22:07, 31 March 2014 (UTC)
No there is not and it also would not make sense: At least at that point where MediaWiki wants to access the database, it must have the password in clear text. Basically everyone, who has access to LocalSettings.php, will also be able to edit the according PHP file, in which this database access happens so that he would get the password anyway.
What you however should do is this: Make sure that file and directory permissions in your wiki folder are tight enough. Especially for LocalSettings.php, permissions of 640 should be enough. 88.130.72.59 22:23, 31 March 2014 (UTC)
Also see Manual:Securing database passwords. The best practice is to move the secrets out of the web root directory. That's about all you can do.
In the bigger picture, this is known as the "Unattended Key Storage" problem. It is a wicked hard problem in security engineering. Also see Peter Gutmann's Engineering Security book. He discusses the problem in detail.
Noloader (talk) 20:55, 2 April 2021 (UTC)
Category:Support desk archives Category:Support desk archives with broken file links