Jump to content

Project:Support desk/Flow/2012/08

Add topic
From mediawiki.org
This page is an archive.
Please ask questions on the current support desk.

Class option for images

Hi!

The full syntax for displaying an image is: [[File:filename.extension|options|caption]]. This syntax doesn't support class option. For example, option class="photo" in img tag is needed for microformats. Is there any way to add this option by using any existing extension or by configuring MediaWiki installation? Zserghei (talk) 10:23, 1 August 2012 (UTC)

Class option for images

Hi!

The full syntax for displaying an image is: [[File:filename.extension|options|caption]]. This syntax doesn't support class option. For example, option class="photo" in img tag is needed for microformats. Is there any way to add this option by using any existing extension or by configuring MediaWiki installation? Zserghei (talk) 10:23, 1 August 2012 (UTC)

Microformats are over-rated ;)
you'd have to write an extension. See manual:Hooks/ImageBeforeProduceHTML and more generally how the code in the file includes/Linker.php works. Bawolff (talk) 14:35, 2 August 2012 (UTC)
I should mention that you could probably use manual:$wgAllowImageTag, but that doesn't integrate with MW's local image support very well Bawolff (talk) 14:30, 7 August 2012 (UTC)

mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device

Hi,

I have installed version 1.19.1 on my host (windows based host) by I receive warning on top of the page when I go to wiki page at http://help.flexrule.com/wiki

Any idea why I get "mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device" warning?

Regards, Arash 220.244.187.239 (talk) 19:39, 1 August 2012 (UTC)

There's been several reports of mcrypt failing on windows. See bugzilla:35894.
Assuming it lets you install, don't worry about the error, and after install, edit LocalSettings.php and change $wgSecretKey to something random. Bawolff (talk) 14:27, 2 August 2012 (UTC)
Hi,
I have entered some data already, does this change to $wgSecretKey would make new entries unusable?
Regards,
Arash 203.34.100.2 23:28, 2 August 2012 (UTC)
It may cause people who are logged in to become logged out (They would have to re-login). It should not affect anything else.
There's information on what $wgSecretKey is used for here. Bawolff (talk) 12:15, 3 August 2012 (UTC)
Locate the file includes/CryptRandom.php.
Find the following line (probably around line 285):
$iv = mcrypt_create_iv( $rem, MCRYPT_DEV_URANDOM );
Change it to:
$iv = mcrypt_create_iv( $rem, MCRYPT_RAND ); 88.200.210.178 09:14, 25 January 2013 (UTC)
So if I cannot modify "CryptRandom.php" I still will have to make sure that $wgSecretKey is not leaked as in versions prior to MW 1.17 (well, I should do so anyway, but I guess you will get the point). [[kgh]] (talk) 11:05, 16 May 2014 (UTC)

Change fallback language

Hi. How can I change fallback language in my wiki? AS (talk) 19:46, 1 August 2012 (UTC)

The only way I can think of at the moment is a dirty hack using Apache's mod-alias
Alias /wiki "/var/www/w/mediawiki-1.19.1/index.php?uselang=fr&title="
Alias /w/index.php? "/var/www/w/mediawiki-1.19.1/index.php?uselang=fr&"
I am not going to test this so unless someone else decides to help you you are on your own from here.
----
Okay. Look for the following in your LocalSettings.php file.
# Site language code, should be one of ./languages/Language(.*).php
$wgLanguageCode = "en";
As long as the language you want to use is supported changing "en" to say "fr" (French) should work. Allen4names (talk) 02:41, 2 August 2012 (UTC)
$wgLanguageCode change language of all messages. I want to change language only for untranslated ones. AS (talk) 10:09, 2 August 2012 (UTC)
You would have to modify the file languages/messages/Language<LangCodeYouHavewgLanguageCode-setto>.php . Look for the line $fallback = '<lang code>';. It's probably near the begining.
Note, modifying language files in this manner is unsupported, and will probably break (be reset to the normal default) when you upgrade mediawiki. (I'm not sure if the localization cache will automatically clear itself. I think it does, but if it doesn't you may have to run the rebuildLocalisationCache.php maintinance script)
(You probably already know this, but in the interest of completeness) If there's a specific message you want to change the value of, you can edit it by going to the page Special:allmessages. Bawolff (talk) 14:22, 2 August 2012 (UTC)
Thanks! I thought this LanguageXX.php files are in some way cached from online storage xD AS 15:21, 2 August 2012 (UTC)
In general MW just uses the local files (While they are actually further cached internally in the db/memcached). However some wikis (like WMF wikis) use an extension called extension:LocalisationUpdate which automatically syncs those files with http://translatewiki.net Bawolff (talk) 16:02, 2 August 2012 (UTC)
A bug has been filed for this. Allen4names (talk) 07:02, 3 August 2012 (UTC)
That bug is actually for something different but related (How wikidata does fallback for multilingual data items, vs this is about how fallback is done for interface messages) Bawolff (talk) 12:12, 3 August 2012 (UTC)

Don't show on action=edit pages or special pages

I am adding facebook comments to my skin file. However, I don't want it to show on special pages and edit pages. How do I code this in php? Thanks LTech (talk) 08:29, 2 August 2012 (UTC)

I did almost the exact same thing on my wiki. The easiest way to exclude something from special and edit pages versus article pages is a simple if statement in your skin code. All you need to check for is:
if ($this->data['isarticle']) { ... }
That should only be true for actual articles. Hope this helps. Unifiedrepublic (talk) 05:32, 7 August 2012 (UTC)

Internal error message

Dear all,


We use a MediaWiki at openDemocracy (http://wiki.opendemocracy.net/).

We recently transferred our site (www.opendemocracy.net) and the Wiki to a new server. Since doing that we have got the following internal error message whenever we try and save edits to the Wiki. I just wondered whether anyone had experienced the same thing and had any recommendations for action?


Internal error Detected bug in an extension! Hook ConfirmEditHooks::confirmEditMerged failed to return a value; should return true to continue hook processing or false to abort. Backtrace:

  1. 0 /srv/www/vhosts/wiki.opendemocracy.net/includes/EditPage.php(956): wfRunHooks('EditFilterMerge...', Array)
  2. 1 /srv/www/vhosts/wiki.opendemocracy.net/includes/EditPage.php(2483): EditPage->internalAttemptSave(false, false)
  3. 2 /srv/www/vhosts/wiki.opendemocracy.net/includes/EditPage.php(449): EditPage->attemptSave()
  4. 3 /srv/www/vhosts/wiki.opendemocracy.net/includes/EditPage.php(340): EditPage->edit()
  5. 4 /srv/www/vhosts/wiki.opendemocracy.net/includes/Wiki.php(510): EditPage->submit()
  6. 5 /srv/www/vhosts/wiki.opendemocracy.net/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
  7. 6 /srv/www/vhosts/wiki.opendemocracy.net/index.php(116): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
  8. 7 {main} 86.29.226.196 (talk) 10:08, 2 August 2012 (UTC)
Make sure you're copy of the ConfirmEdit extension (aka the captcha thing) made it over in the move, is appropriate version for your wiki, is set up correctly, etc. Bawolff (talk) 14:24, 2 August 2012 (UTC)
Hi Bawolff,
Thanks for this. However, I'm not entirely sure where to look to find the copy of the ConfirmEdit extension? It doesn't seem to be accessible via the Preferences? Where can you usually check to make sure that it is set up correctly?
Andrew 82.26.128.136 08:14, 8 August 2012 (UTC)
 08:14, 8 August 2012 (UTC)
You can see if it is installed or not by looking at the page Special:Version on your wiki.
Look in the file LocalSettings.php for a line that looks something like require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" ). Try deleting the line, and see if it makes your error go away (Try this for all the extensions you have installed. However make back ups of LocalSettings.php first).
The actual extension is probably installed in mywikifolder/extensions/ConfirmEdit. You may want to try downloading a new version from extension:ConfirmEdit. Bawolff (talk) 12:16, 8 August 2012 (UTC)

Hello,

I would like to put the link beyond the image to get through the headline on the same page below.

I suppose, to get to another page I would have to insert e.g.: .

Do you know if there is the possibility to do the same for the Headline of the same page, on which the image is placed?

Thanks in advance 81.14.229.74 (talk) 12:41, 2 August 2012 (UTC)

Like [[file:Example.png|link=#Before_you_post]]? that makes:
Which goes to the headline up top of this page. Bawolff (talk) 14:12, 2 August 2012 (UTC)

IIS / send e-mail

Hi,

I'm using IIS 7 (not Apache) to run mediawiki in my local web but I'm having a little problem when anyone registers. I get this message: "Failed to connect to mailserver at "family-pc" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()". What can I do to fix this problem?

ps: "family-pc" is my hostname 201.81.241.214 (talk) 14:52, 2 August 2012 (UTC)

Basically there is something wrong with how email is configured (When a new person registers, we send an email asking them to confirm their email).
Possible solutions are:
  1. Tell MediaWiki not to use email by setting $wgEnableEmail to false.
  2. Fix your email settings. It sounds like the issue is that php is trying to send email by connecting to a smtp server on the localhost, without there being one. You need to change the SMTP setting in php.ini to point to a real mail server. See http://php.net/manual/en/mail.configuration.php Bawolff (talk) 13:00, 3 August 2012 (UTC)
Thank you, the first solution worked fine to me. :) 187.121.84.42 16:13, 3 August 2012 (UTC)

How to edit skins without access to the file

I have a wiki on a wiki farm, and I want to change the Vector skin to make the colors dark instead of white. It says to edit Mediawiki:vector.css but it doesn't actually have the CSS code, it just says "CSS placed here will affect users of the Vector skin".

So how am I supposed to edit it? 50.80.25.170 (talk) 00:18, 3 August 2012 (UTC)

That's where you place CSS code to override the default CSS code.
You can view the default css code in the file skins/vector/screen.css (as well as skins/common/commonInterface.css, skins/common/commonContent.css and skins/common/commonElements.css) on your install. However, please do not edit these files. It will break things, particularly if you ever update your MediaWiki install. Instead put any css you want to override into MediaWiki:Common.css Bawolff (talk) 12:26, 3 August 2012 (UTC)
Instead put only the CSS you want to override into your wiki's MediaWiki:Common.css. Krinkle (talk) 02:34, 4 August 2012 (UTC)
Ok, thanks. 50.80.25.170 13:58, 5 August 2012 (UTC)

ConfirmAccount + FlaggedRevs

Hi there, I am using MediaWiki since a couple of days an I am somehow confused. :-) What I would like to have is a Wiki where everybody can edit everything, but all changes must be checked and accepted by registered users. Otherwise the changes are not visible. There should not be so many users. Only a couple should review and confirm or reject changes. When a new user is registering, this should be confirmed by the admin or any equivalent user. Now my question? What extensions do I need? I installed ConfirmAccound and FlaggedRevs but it does not work at all. It doesn't matter what rights I give a user or a user group (either viy the Special:UserRights or the LocalSettings.php: Every visitor of the site can edit everything. Do you know any complete and comprehensible description how I can setup my system according to the mentioned wishe?

Thanks a lot in advance Best regards from Germany

Peter 176.3.13.177 (talk) 11:49, 3 August 2012 (UTC)

Articles will not save if they are large

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 all and thank you for your help. If I let the length of any my articles extend too long (approximately 4000 characters) I get the following error...
Some parts of the edit form did not reach the server; double-check that your edits are intact and try again.
And all the data is lost. I checked all the php.ini/LocalSetting.php and could not find any reason for this.
I am running
MediaWiki: 1.19.1
PHP: 5.3.13 (cgi-fcgi)
MySQL: 5.1.63-cll
Unfortunately I can't provide a link due to the sensitive nature of the wiki. I do have another wiki setup on the server however and that one does not have this problem. I tried reinstalling the wiki completely and that did not solve anything.
I would appreciate any help - Thank you - Jman Jman444 (talk) 14:46, 3 August 2012 (UTC)
Basically MediaWiki says that if when you hit submit, the edit box doesn't seem to be submitted.
I think the most likely cause (this is a guess) of this is something wrong with the webserver, cutting off post data if its beyond a certain size Bawolff (talk) 17:40, 3 August 2012 (UTC)
WelI have an account on the same server running a wiki perfectly running from the same global php.ini...I can't imagine what is causing this. Jman444 (talk) 18:00, 3 August 2012 (UTC)
Sorry, your last post confused me. Are you saying that you have another instance of MediaWiki, running on the same web server, with the same php configuration, that does not have this issue?
If so, that is quite odd. Do you have the same extensions installed on both (and specificly, do you have any captcha extensions installed, simply because they mess with how editing works, so that would be one of the first places I'd look [however, I've never heard of a captcha extension causing this sort of issue])? Are the MediaWiki instances the same versions? Bawolff (talk) 18:14, 3 August 2012 (UTC)
You are correct, same server, two separate installs of MediaWiki. Both are bone stock, no modifications what so ever. Jman444 (talk) 19:54, 3 August 2012 (UTC)
Did you set $wgMaxArticleSize? wargo (talk) 19:59, 3 August 2012 (UTC)
It wasn't in my LocalSetting.php, I added with a large number 9999999999 and it didn't change anything. Jman444 (talk) 01:30, 4 August 2012 (UTC)
Maybe try a smaller, more "realistic" size for $wgMaxArticleSize? The variable is in kilobytes, so the number you said you used is over 9000 gigabytes. Try 104857600, which is the equivalent of 100GB maybe. Not sure if that would have any effect on it.
Also, I've heard of similar issues like this and experienced them first-hand on a wiki I work at, where the issue is related to the lack of enough RAM on the server. How much RAM does the server you're using have, and do you know if you could increase it? GeorgeBarnick (talk) 21:28, 23 February 2014 (UTC)
I just ran into the same problem, which could be fixed by reducing the MTU (cf. this how-to for OSX). Daniel Mietchen (talk) 13:29, 19 April 2013 (UTC)
I had the same problem, read the results here and posted my solution. It disappeared?
I use Google Chrome as my primary browser. After reading the results here I tried to also load the page with Microsoft Explorer. That solved the problem. I left the Google page open so I did not lose the information and copied it over to the same page open in Explorer. It loaded without problem and was then available on Chrome.
http://cefresearch.ca/wiki2/index.php/Chronology_1916 is the page I am working on when the error appeared. Rlaughton (talk) 21:17, 23 February 2014 (UTC)
hi i am not able save the large amount of tabular format data in mediawiki could you please find out the way and do the needful thanks 182.72.144.61 18:25, 18 June 2014 (UTC)
What's your issue? Could you please describe with details any error message you get or what happens? Ciencia Al Poder (talk) 09:40, 19 June 2014 (UTC)
For the record. The error message refers to an "edit form". Are you perhaps using Semantic Forms or some other extension enabling you to edit content through a form? I(If so, that would be an important bit of information) Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 09:14, 20 June 2014 (UTC)
haha. I just had a problem by the same description. It was my typo in php.ini.
post_max_size = 200MB
// Should not have a B at the end or it's interpreted as 200 bytes. Ahbejuan (talk) 22:30, 10 March 2017 (UTC)
Hi,
if you somehow still get this error, check if the line
post_max_size = 200M
exists in you php.ini. if not adding this line will solve this issue. i had this issue. accidentally removed the line. 139.167.7.167 (talk) 11:20, 26 July 2017 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

[RESOLVED] Need to replace redirect file Redirect arrow without text.svg

I need to locate System Message page or the file within the MediaWiki program that has the Redirect arrow which is displayed on all redirect pages. I have a black .css themed wiki and the redirect file which I think is File:Redirect arrow without text.svg which shows up as so and I would like to replace it with this one. I've asked this question before but either missed the answer or didn't have any. Any help would be greatly appreciated. Thank you - FlightTime (open channel) 04:13, 4 August 2012 (UTC)

Someone else may know how to do this with javascript but I know that Apache can be configured to do this. See the code below.
Alias /w/skins/common/images/redirectltr.png "/var/www/images/redirectltr.png"
You do need to have mod_alias enabled for this to work. Allen4names (talk) 05:10, 4 August 2012 (UTC)
Which image to use is hard coded in Article::viewRedirect, so Allen4names' suggestion, or even just plain just replacing the image in skins/common/images/redirectltr.png (just be careful on upgrade) may be a good approach.
JS wise the code to do this would look like:
$( function($) { $( 'div.redirectMsg img' ).attr( 'src', 'http://mynewimage.png' ) } );
However, there might be a couple miliseconds before the js takes affect where the old image is shown. It might also be possible to do something with css which wouldn't have that problem, maybe something like:
div.redirectMsg img { visibility: hidden }
div.redirectMsg { background-image: url( "http://myimage.com/foo.png" ); background-repeat: no-repeat }
(you might have to play with margins/padding/background-position to make that align right).
It's also possible to write an extension using the ArticleViewCustom hook (but that hook is not in the most ideal place, so you may end up duplicating quite a bit of code) On the pro side, you can directly output an <img> tag with whatever src attribute you want (or any other html you want). Bawolff (talk) 14:27, 7 August 2012 (UTC)
Thank you Bawolff, I went with "skins/common/images/redirectltr.png" and after I re-sized the file it worked, not great but better than before :)
UPDATE: - went from this to this Thank you both much better. Mlpearc (powwow) 04:44, 13 August 2012 (UTC)

Allowing up load of text file with reg extention

MediaWiki 1.19.0

PHP 5.3.13 (apache2handler)

MySQL 5.1.49


I want to upload a ".reg" file.

Mediawiki objected first by saying it wasn't an allowed filetype.

I then added .reg to the $wgFileExtensions array in LocalSettings.php

But now i get

"File extension ".reg" does not match the detected MIME type of the file (text/plain)."

And still it refuses to upload.

How do I get it to stop that and just accept the upload? (Short of disabling mime in general) EnBruger (talk) 16:16, 4 August 2012 (UTC)

Try adding entries to includes/mime.types mapping .reg to text/plain Bawolff (talk) 13:49, 7 August 2012 (UTC)
Brilliant! Thanks a lot :) EnBruger (talk) 13:57, 8 August 2012 (UTC)

Loading Wiki on a Stick... and nothing.

I try to open Wiki and it hangs on "Loading Wiki on a Stick..." I opened it with notepad and all the info is still there. Is there some way I can recover it? Im using Firefox 12.0. 99.249.26.94 (talk) 02:46, 5 August 2012 (UTC)

Creating a widget that randomly displays banners for other websites

I recently installed Extension:Widgets, and added banners for several websites as widgets. Is there a way that I can create a widget that will display a random widget as a way of creating a banner exchange?

http://en.sturmkrieg.com/Sturmkrieg:Banners Lieutenant Aleksandr Reznov 03:47, 5 August 2012 (UTC)

LanguageKO.php

In 1.19.1, LanguageKo.php does not exist. Does Mediawiki not need it? Tree1891 (talk) 03:57, 6 August 2012 (UTC)

I did not find LanguageEn.php in mediawiki-1.19.1/languages/classes/. So what? Allen4names (talk) 05:53, 6 August 2012 (UTC)
I have debug data like below.
...
Class LanguageKo not found; skipped loading
... Tree1891 (talk) 07:04, 6 August 2012 (UTC)
Again, so what? Did you have a problem with installation? Editting? Did your wiki crash? Allen4names (talk) 17:11, 6 August 2012 (UTC)
It just means that the Korean localization doesn't differ from the english localization in some of the more complicated ways. There should not be such a file, and the warning message is normal (however you should only see such a warning if you enabled debug logging).
The Korean localization is entirely contained in languages/messages/MessagesKo.php.
(If your curious about what the warning means. Basically, once Language::preloadLanguageClass realizes that LanguageKo.php doesn't exist, it asks the autoloader to give a go at loading the class (in case it is defined by an extension). The autoloader outputs that warning any time it cannot find a class. However in this case its perfectly normal for the autoloader to not be able to find the class). Bawolff (talk) 13:47, 7 August 2012 (UTC)

Be Our Hero! Please?

Dear MediaWiki Geniuses,

Forgive my stunning lack of knowledge in this field, but I come to you all on a hope and a prayer. A little over 3 years ago, an ex-coworker used this delightful MediaWiki software to build an internal site intended to share the technical knowledge at our workplace (engineering - underground pipelines). For a while, we all added to the site (stored locally on his computer and accessed through our network) and it prospered. After he left, the site fell out of style, time passed, computers were moved, and now nobody can access the site.

Basically, I'm wondering if it's possible to revive this thing, at the very least running off my computer. I have the hard drive on which all of the information and software is stored, I'm fairly competent with computers, can follow directions with the best of them and have done basic coding, but I have no idea where to go from here. I'm guessing it's either an easy fix of properly directing my browser to the file that grants me access to this long lost site, or I should just install a brand new version of the whole thing and can somehow drag all the old information into the new one. Or I should tell my boss I'm an idiot and can't bring this back, and hope he forgets about it by the time we have my year-end review.

So far as I can tell from digging around the folders, here are the versions we've got:

PHP 5.2.5 Apache 1.4.2 MediaWiki 1.11.1 MySql 5.0

Please help if you have any idea if what I'm asking is possible and how I should begin. Thank you all ever so kindly and have a pleasant day.

-Andy 63.124.6.12 (talk) 15:29, 7 August 2012 (UTC)

Hi Andy,
Ok, first step would be to figure out if your apache server starts automatically, or if you have to do something to start it. What precisely one would have to do to start apache varries quite a bit between platforms (I'm assuming this is windows, I have no idea what is normally done to start apache on windows, but if its a WAMP style package, there is probably an icon to double click somewhere).
Once you've gotten apache going (Or even if you haven't, you can still try this on the asumption that maybe it starts automatically), you have to figure out where apache is serving the webserver to (specificly what port). Most likely its on port 80, so try just pointing your web browser to http://localhost . failing that, http://localhost:8080 is also common (If it comes up with a page that is not your wiki, but still a page, you can try variants on that like http://localhost/wiki or http://localhost/w/ .
localhost is just short hand for the current computer you are on. If you want others to be able to access the wiki from another computer, you have to figure out what the current computer's IP address is. You can do that via the ipconfig command line program.
-----
If all else fails, keep in mind that all data from your wiki (except for images) is stored in the database, so if you can backup your mysql database, you can probably re-install mediawiki and keep all your data (Also make sure to keep the file LocalSettings.php which includes all the config settings for your wiki) Bawolff (talk) 17:12, 7 August 2012 (UTC)
Bawolff,
Thank you infinitely for the words. After much trying and failing, it seems the best bet is going to be to completely reinstall mediawiki and try to pull over everything from the last one. I've successfully gotten the new wiki up and running (using xampp) - version 1.19.1.
So far as I can tell, everything we did before was version 1.11.1, and I still have all the files and folders and pictures. Is it going to be possible to pull in all the pages from our earlier wiki? How? Anything specific I need to watch for?
Thank you endlessly in advance,
-Andy 63.124.6.12 18:54, 29 August 2012 (UTC)
Yes it should still be possible - However what you need is the database files, not the mediawiki files.
If you have the db set up with all the old wiki data, when you're installing the new version of MediaWiki, keep the old LocalSettings.php file from the previous wiki (assuming the information in it about the db is still accurate) and when you run the installer, the mediawiki installer should detect the old version and upgrade it.
Otherwise you could try replacing the db of an already installed new version of MediaWiki with the old DB, and then run update.php which will upgrade the db to be compatible with the new version of MediaWiki. Bawolff (talk) 19:29, 29 August 2012 (UTC)
I've tried installing the new version, and I can get Mediawiki to recognize that there is an old database, but either I'm directing it to the wrong database or not doing it properly. All I can end up with is a brand new, unpopulated Wiki.
New approach: is there any way to just read the text of what was on the old wiki's pages? There were only a couple dozen pages, so re-creating wouldn't be too difficult, if I could see the text that was entered.
I'm also not EXACTLY sure what constitutes a "database" (files in folders? something only readable by software, etc), so be specific in where I should be looking if this is possible.
Really, I can't thank you enough. You've been very helpful so far. Apologies for my green-ness in this avenue.
-Andy 63.124.6.12 21:48, 19 September 2012 (UTC)
It may help if you can find the "my.cnf" file. There should be a line that looks like the following.
datadir = /var/lib/mysql
I do not know the windows equivalent but I need to type this into the command line using Ubuntu.
sudo ls /var/lib/mysql
One of the files should match the database file named in LocalSettings.php.
$wgDBname = "my_wiki";
I hope this helps. Allen4names (talk) 05:47, 20 September 2012 (UTC)
> One of the files should match the database file named in LocalSettings.php.
If you are using MySQL, it actually should be a whole folder. Inside you have different files for the table definitions and contents. ;-)
You can copy this folder to create a kind of backup of your database, but this is not the recommended way of doing this. I would use a tool like phpMyAdmin. Your ex-coworker probably installed this together with Apache, MySQL and PHP, so that you can access it with your webbrowser by going to the according URL when the Apache and MySQL servers are running. This URL can vary; a common name is http://localhost/phpmyadmin. 88.130.82.83 00:11, 21 September 2012 (UTC)

Subquery in extension

What's the best method to run a subquery in an extension.

I got an extension that uses the externallinks table. The query looks like this:

		$query = "`el_to` LIKE '%foo%'";

		$res = $dbr->select(
				'externallinks',
				array(
					'el_from',
					'el_to',
				),
				array(
					$query
				),
				__METHOD__,
				array(
					'ORDER BY' => 'el_to DESC, el_from DESC',
					'LIMIT' => $limit,
					'OFFSET' => $offset,
				)
		);

Now I want to exclude a custom namespace so I need to run a subquery for page.page_namespace. Is there a function for it I could use? Subfader (talk) 10:19, 8 August 2012 (UTC)

[RESOLVED] Shoutbox-Extension wont work

Hello,

I'm not entirely new to MediaWiki but I recently started my very first on my own. Now this Wiki is for students of my university to have a basis to share documents like examns or other works. To give them an easy way to communicate with each other beside the official forum, I want to provide a Shoutbox at the main page of my Wiki.

I've created an account at Shoutbox.us and followed the steps that are listed on the Extension-article:

http://www.mediawiki.org/wiki/Extension:ShoutBox


However, after adding the require-function to my LocalSettings.php, my Wiki wont work and I receive the following message:


Deprecated: Call-time pass-by-reference has been deprecated in /home/www/cwcity/hosting/b/i/hph/htdocs/extensions/ShoutBox.php on line 214

Fatal error: Call to a member function addMessage() on a non-object in /home/www/cwcity/hosting/b/i/hph/htdocs/extensions/ShoutBox.php on line 77


My first thought (after checking wether I made a mistake) was that the version numbers weren't supported:


MediaWiki: 1.19.1

PHP: 5.3.15 (cgi-fcgi)

MySQL: 5.1.61-0+squeeze1-log


Since the extension is rather old, my version numbers are quite ahead of the minimum requirements of the extension.


Got any clue what might have gone wrong? Thanks, hpH 193.25.183.52 (talk) 12:27, 8 August 2012 (UTC)

Try using the version at http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ShoutBox/ instead.
The version you have probably has a line like $wgMessageCache->addMessage( ..) which support was dropped for sometime around 1.18 I think (It's very unclear why extensions were doing things like that, it shouldn't have been needed really ever) Bawolff (talk) 12:56, 8 August 2012 (UTC)
Cheers mate, it works.
BR, hpH 80.108.144.139 16:40, 8 August 2012 (UTC)

[REGARDED AS SOLVED] Extension:RSS - "allow all URLs" wont work

{{{text}}}

Hello,

one problem solved, the next matter appears. Now I want to add a RSS feed extension to my Wiki. As for the installation part, no trouble. I downloaded it here:


https://github.com/Wikinaut/mediawiki-extension-RSS


According to the RSS.php I got the newest version from April 24th. Now as I wanted to test with the first feed I used this code:

<rss>http://blog.wikimedia.org/feed/</rss></pre>


First, I receive this error:


:: '''Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.'''


After refreshing, the error however changes to a more informative matter:


:: '''http://blog.wikimedia.org/feed/ is not in the whitelist of allowed feeds. There are no allowed feed URLs in the whitelist.'''


So I googled and I found what caused it - suprise - the URL wasn't added to the whitelist. I did that now and it looks something like this:


<pre>$wgRSSUrlWhitelist = "blog.wikimedia.org/feed/";</pre>


This should do it for a start. I'm not even thinking about using another feed, I just want to see those fancy WikiMedia news now. But unfortunatly, they wont appear.


:: '''http://blog.wikimedia.org/feed/ is not in the whitelist of allowed feeds. //blog.wikimedia.org/feed/ is the only allowed feed'''


I tried quite a few things:
<pre>* $wgRSSUrlWhitelist = "blog.wikimedia.org/feed/";
* $wgRSSUrlWhitelist = "http://blog.wikimedia.org/feed/";
* $wgRSSUrlWhitelist = "*";
* $wgRSSUrlWhitelist = array( "*" );
* $wgRSSUrlWhitelist = array("*");
* $wgRSSUrlWhitelist = array("blog.wikimedia.org/feed/");

Whatever I do, I don't get it to work. It beheaves very strangly, as I add the array ("*") and it still gives me the same error message with that the feed I want to use is not the one that is on the list (instead of telling me that there aren't any on that list at all). And yes, my WikiMedia version matches the requirements.

What can I do? Thanks in advance, hpH 80.108.144.139 (talk) 18:00, 8 August 2012 (UTC)

Hey,
that's what I get if I enable the debugging in the LocalSettings.php:
MWHttpRequest::factory: allow_url_fopen needs to be enabled for pure PHP http requests to work. If possible, curl should be used instead. See http://php.net/curl.
Backtrace:
#0 /home/www/cwcity/hosting/b/i/hph/htdocs/extensions/RSS/RSSParser.php(297): MWHttpRequest::factory('http://blog.wik...', Array)
#1 /home/www/cwcity/hosting/b/i/hph/htdocs/extensions/RSS/RSSParser.php(155): RSSParser->fetchRemote('hph:rss:http...')
#2 /home/www/cwcity/hosting/b/i/hph/htdocs/extensions/RSS/RSSHooks.php(79): RSSParser->fetch()
#3 [internal function]: RSSHooks::renderRss('http://blog.wik...', Array, Object(Parser), Object(PPFrame_DOM))
#4 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/parser/Parser.php(3736): call_user_func_array(Array, Array)
#5 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/parser/Preprocessor_DOM.php(1110): Parser->extensionSubstitution(Array, Object(PPFrame_DOM))
#6 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/parser/Parser.php(2978): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#7 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/parser/Parser.php(1094): Parser->replaceVariables('<rss>http://blo...')
#8 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/parser/Parser.php(345): Parser->internalParse('<rss>http://blo...')
#9 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/WikiPage.php(2914): Parser->parse('<rss>http://blo...', Object(Title), Object(ParserOptions), true, true, 369)
#10 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/PoolCounter.php(187): PoolWorkArticleView->doWork()
#11 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/Article.php(587): PoolCounterWork->execute()
#12 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/actions/ViewAction.php(40): Article->view()
#13 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/Wiki.php(484): ViewAction->show()
#14 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/Wiki.php(278): MediaWiki->performAction(Object(Article))
#15 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/Wiki.php(593): MediaWiki->performRequest()
#16 /home/www/cwcity/hosting/b/i/hph/htdocs/includes/Wiki.php(503): MediaWiki->main()
#17 /home/www/cwcity/hosting/b/i/hph/htdocs/index.php(58): MediaWiki->run()
#18 {main}
193.25.183.52 06:02, 9 August 2012 (UTC)
That's a rather different issue from the first one reported.
For the second issue, you need to either install php curl extension (reccomended. See php site) or enable allow_url_fopen in your php.ini config file. (If you're on a shared host you may need to talk to your hosting provider) Bawolff (talk) 14:12, 10 August 2012 (UTC)
Hi, please indicate your exact versions:
PHP, MediaWiki, RSS extension.
In my reference installation. it works perfectly.
make sure to have this order of statements in order to really overwrite the built-in default settings for the whilelist with your wanted values:
require_once("$IP/extensions/RSS/RSS.php"); /* git version from https://github.com/Wikinaut/mediawiki-extension-RSS  */
$wgRSSUrlWhitelist = array( "*" ); /* see documentation for security issues */
$wgRSSUrlNumberOfAllowedRedirects = 1;
$wgRSSAllowLinkTag = true;
$wgAllowImageTag = true;
Wikinaut (talk) 18:42, 10 August 2012 (UTC)
This thread is being copied over to Extension_talk:RSS/Archive_2/Flow_export#[RESOLVED_WORKSFORME]_"allow_all_URLs"_wont_work in order to have E:RSS issues together and organized. Please reply over there. (LQT move failed for me) Bawolff (talk) 19:03, 10 August 2012 (UTC)
Hey guys,
  • MediaWiki: 1.19.1
  • PHP: 5.3.15 (cgi-fcgi)
  • MySQL: 5.1.61-0+squeeze1-log
Thats that. But I 'figured' out the whats the problem. It is as Bawolff stated, the hoster disabled the function to open the URLs. cURL wouldn't work either and their policy is to keep those ports closed. As long as I am at this provider I won't be able to use the RSS-extension. They mentioned fsockopen as an alternative, but I can't use that as I have not enough of some digital currency there.
Thanks though, as soon as I change the hoster I'll get back to you with feedback. 93.185.143.65 13:24, 12 August 2012 (UTC)

[RESOLVED] Image upload not working after upgrade (SLES 11)

I just did a uber upgrade of my wiki machine. We upgrade from Mediawiki 1.13 to 1.19
Updated SuSE from 9.4 to 11.2, Apache 1.3 to 2, and a minor PHP upgrade 5.0 to 5.3
After that I can't upload pictures, I've read much about the same issue but can't seems to find the answer.
When I upload a picture I get this error message: "The file you uploaded seems to be empty. This might be due to
a typo in the filename. Please check whether you really want to upload this file."
I tried many things, chmod -R 777 ./images, setting up some var in LocalSettings.php

$wgUploadPath = "$wgScriptPath/images";
$wdUploadDirectory = "/XXXX/mediawiki/images";

Is there a way to get more information about errors?
I can't give acces to this wiki its an internal wiki.
Thank everyone for any help.

Update:
Followed everything in here: http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
No luck... 74.121.164.141 (talk) 11:39, 9 August 2012 (UTC)

Ok I've been able to enable some kind of error reporting and I get this when I try to upload an image.
Notice: Undefined index: tmp_name in /srv/www/htdocs/mediawiki/includes/WebRequest.php on line 1153
Notice: Undefined index: size in /srv/www/htdocs/mediawiki/includes/WebRequest.php on line 1140
Notice: Undefined index: error in /srv/www/htdocs/mediawiki/includes/WebRequest.php on line 1167
I tried to look at the files, but Im in no way a PHP guy so... if anyone can shed some light i'd be very grateful.
It looks like this:
if( !$this->exists() then return 0 else return $this->fileInfo['size'];
if( !$this->exists() then return 0 else return $this->fileInfo['tmp_name'];
if( !$this->exists() then return 0 else return $this->fileInfo['error'];
They are quite simple... so I dont get it ?! 74.121.164.141 13:05, 9 August 2012 (UTC)
Check your temporary directory (which ever one is used by php. It should probably be specified in php.ini) is writable by the webserver. Also double check all the upload related settings in php.ini to make sure they are correct.
(If that's the issue, it may indicate a bug in mediawiki, as mediawiki should handle such situations more gracefully. Of course this is a guess, so it could be some whole other issue) Bawolff (talk) 14:06, 10 August 2012 (UTC)
Can someone explain how that issue can be fixed.
I am seing it, too. 193.106.140.9 12:45, 7 June 2013 (UTC)
I'm also seeing that in my logs as well.
We migrated a server from an earlier version, and both the /tmp directory and the images directory (under the vhost's directory) have 777 permissions. File size restriction is no issue either, I can't even upload a 44kb jpg. It says, "The file you uploaded seems to be empty.. yadda yadda". None of the suggestions I've seen anywhere have helped at all.
I've been over my php.ini and LocalSettings.php files a hundred times. I can't find anything amiss.
Does this somehow require ImageMagick or something? Because the new server doesn't use that and those specifically relevant settings are commented out.
I'm thinking bug.
We're running mediawiki version 1.21.1, with PHP 5.2.0. 199.20.122.229 17:30, 13 August 2013 (UTC)
I'm having the same exact issue. Is there an update on this? 71.57.13.95 21:34, 10 September 2013 (UTC)
"The file you uploaded seems to be empty..." message indicate that the file hasn't arrived to MediaWiki.
This can be caused by wrong rewrite rules or weird mismatch in mod_alias (example: the wiki is configured at http://example.com but the server redirects you to http://www.example.com, the POST data is lost)
Another problem may be the temp directory configured in PHP for uploads (wrong permissions, etc), but I'm not sure if it would give some other error message. Ciencia Al Poder (talk) 08:51, 11 September 2013 (UTC)
I have the re-write rules setup for short URLs, so this could be it. Any proposed solution? 71.57.13.95 16:15, 11 September 2013 (UTC)
I'd try disabling rewrite rules.
Another thing you can try is to create a simple upload form for testing if uploads work, following this example. Ciencia Al Poder (talk) 16:48, 11 September 2013 (UTC)
Disabling short URLs didn't fix the problem. I'm still seeing the same errors in the apache logs.
[Wed Sep 11 16:29:00 2013] [error] [client 10.136.68.49] PHP Notice:  Undefined index: tmp_name in /oprdy/w/includes/WebRequest.php on line 1213, referer: https://wiki.url.com/index.php5/Special:Upload
[Wed Sep 11 16:29:00 2013] [error] [client 10.136.68.49] PHP Notice:  Undefined index: size in /oprdy/w/includes/WebRequest.php on line 1200, referer: https://wiki.url.com/index.php5/Special:Upload
[Wed Sep 11 16:29:00 2013] [error] [client 10.136.68.49] PHP Notice:  Undefined index: error in /oprdy/w/includes/WebRequest.php on line 1227, referer: https://wiki.url.com/index.php5/Special:Upload
205.172.134.23 21:39, 11 September 2013 (UTC)
Have you tried creating a simple upload form page from my last message?
Also, I've found this, an issue with PHP under SuSE affecting file uploads. I don't know if it's relevant to you [1]. Ciencia Al Poder (talk) 10:03, 12 September 2013 (UTC)
OMG! The googlef00 is strong with you sir. I am in fact using SuSE with that exact version of PHP! I will work with my system admin to get it resolved. Thank you!!! 71.57.13.95 16:47, 12 September 2013 (UTC)
That is exactly my OS (SLES11 sp2) and PHP version (5.3.8) as well!
Thank you Ciencia !!! You da man. 199.20.122.229 21:05, 12 September 2013 (UTC)

How to ensure the consistency of informations ?

With a example it's easier.

I use mediawiki for regrouping technical informations.

If I create one page and describe into "How to resolve a problem with my computer  ! ". Can I introduce a notion of Time ? Today, the solution is right ! But if I change my computer this information can be deprecated for me but useful for other people ? Lutch 2904 (talk) 12:11, 9 August 2012 (UTC)

I'm not sure what you mean, but mediawiki offers some parser functions for dealing with time. See help:Magic words and especially help:Extension:Parser functions#.23time Bawolff (talk) 14:07, 10 August 2012 (UTC)
Hi, thanks for your answer but it is not quite what i search.
I explained again my problem. If my wiki is used to document the operation of software created by the company. How to ensure consistency between the documentation wiki and version of Soft?
Do I create one page per Version and rewrite all ? (Not all software changes, only some parts, like the features). Lutch 2904 (talk) 07:45, 13 August 2012 (UTC)
Oh, I think I understand better now.
How to manage documentation becoming out of sync varries a lot between different projects. There is no one good answer.
On this wiki, we use little markers to denote what version docs were written for. For example:
MediaWiki version:
1.15
MediaWiki version:
1.11
MediaWiki version:
1.19
For an example of these templates in use, see Manual:Categorylinks_table.
For certain things, we also just use separate pages, or subpages. For example MediaWiki_1.19 vs MediaWiki_1.20. We also use categories to organize things, such as Category:MediaWiki_configuration_settings_1.5.0.
Other people use entire namespaces (and in extreme cases entire wikis) for documenting different versions of their product. I believe blenderwiki used to do that. Now they seem to use subpages in a namespace-esque way ( http://wiki.blender.org/index.php/Doc:2.6/Manual vs http://wiki.blender.org/index.php/Doc:2.4/Manual However, that has the disadvantage of requiring a lot of rewriting (templates can mitagate that somewhat). Bawolff (talk) 13:00, 13 August 2012 (UTC)

Get value from a textarea

Hi there,

I would like to know if has Mediawiki framework any function to get the value from a textarea? I've created a form, using the functions Xml::openElement and Html::textarea, and when I submit this form, I need to know how is the value from the textarea.

Has any function done for this, or I have get the value by JavaScript function ?

Thanks a lot


Cristiano Crismagnabosco (talk) 18:46, 9 August 2012 (UTC)

Manual:$wgRequest Subfader (talk) 19:09, 9 August 2012 (UTC)
Thanks, that's right Crismagnabosco (talk) 19:34, 9 August 2012 (UTC)

Extension:RSS - "allow all URLs" wont work

This post by Bawolff was moved on 2012-08-10. You can find it at Project:Support desk/Flow/2012/08#h-&#91REGARDED_AS_SOLVED]_Extension:RSS_-_"allow_all_URLs"_wont_work-2012-08-08T18:00:00.000Z. Bawolff (talk) 18:45, 10 August 2012 (UTC)

Concerning; Conflicts of Project Management

This inquiry is directed towards the Dispute Resolution committee(s) of this and other WikiMedia sites.

Accordingly; I recent signed on as a member of the 2012 Extension Page Review Drive project here on the mediawiki site, under the direction of User:Varnent and proceeded nonchalantly and without bias intent to try new extensions, reporting 'some' of those that did not work with MW1.19. I had positive results until approached by User:Jasper Deng who did accuse me of a gross misrepresentation (see; Concerning; Extension:SecurePoll).

There is an obvious conflict of Project Management in this case. I do not have any legal issues with the aforementioned editor, nor the original author of the extension(s) in question. I only intended to notify other editors and users that the published version was not completely cited for useability by using site authorized templates.

In addressing the editor's usage of Wikipedia material, there are more conservative [2] than accusations being drawn. As a footnote, Wikipedia does not conduct oversite for MediaWiki.

Please consider establishing a new Project Resolution process to avoid possible edit conflicts. Such a resolution may include a new showcase project for system or featured extensions, so reducing unsolicited traffic, notification for project members and providing administrative overhead for developers.

Disciplinary reliefs will not be sought in this matter. Habatchii (talk) 00:51, 11 August 2012 (UTC)

[As an aside, the more apropriate place for this is Project:Current issues, but to be frank you're unlikely to get any traction on this]
You claim SecurePoll is incompatible with MediaWiki 1.19. Jasper Deng claims it is compatible (or more precisely, he finds it hard to believe that it is incompatible). Do you have any evidence to suggest that it is not compatible?
Secure poll is an extension used by Wikimedia to conduct elections for electing board members. In any case, if it is incompatible, it will most likely be made compatible come next election. Bawolff (talk) 14:16, 13 August 2012 (UTC)
Continued at Project:Village Pump/Flow/2012#c-Habatchii-2012-08-11T02:07:00.000Z-Concerning;_Conflicts_of_Project_Management Krinkle (talk) 06:22, 31 August 2012 (UTC)

$wgCookieDomain setting has no effect

Setting the value of $wgCookieDomain isn't providing any effect for me. For my test setup on my local machine, MediaWiki defaults to 'practicalplants.local'. Setting $wgCookieDomain to '.practicalplants.local' (leading .) has no effect. I've also used $wgSessionName to change the session cookie name, which does work.

Any clues as to why it might not be working? Anything I can do to debug?

Thanks, Andru 5.8.188.150 (talk) 13:06, 11 August 2012 (UTC)

Hello! I appreciate this is a really open question - is there anything I can do to help whittle down the cause? The inability to correctly set my cookie domain iss causing issues with my SSO solution. 37.1.177.154 16:24, 16 August 2012 (UTC)
First of all do you have any authentication extensions installed. If they handle the cookies themselves, they may override MW's settings for the cookie domain.
>MediaWiki defaults to 'practicalplants.local'.
MediaWiki should default to not setting a cookie domain whatsoever.
You're sure you are setting $wgCookieDomain at the very bottom of LocalSettings.php?
What does the set-cookie http header that MediaWiki sends look like? Bawolff (talk) 12:45, 17 August 2012 (UTC)
as Bawolff mentioned:
Make sure you are setting $wgCookieDomain at the very bottom of LocalSettings.php !!
solved the problem for me. 62.178.87.226 22:10, 9 September 2012 (UTC)
sorry, did not!
you cannot login at en.mywiki.org and use the cookie for de.mywiki.org.
COOKIES are domain related. 62.178.87.226 19:14, 10 September 2012 (UTC)
Note, cookies are specific to the wiki in question (specificly its linked to the database name - so you can have multiple wikis on same domain) - this is separate from the cookie domain. Bawolff (talk) 17:05, 13 September 2012 (UTC)
The two wikies namespace have to be the same, for instance:
$wgMetaNamespace = "wiki"; 193.144.79.198 16:30, 24 January 2014 (UTC)
no. that shouldnt matter. its the wiki id that has to be the same. Bawolff (talk) 21:27, 3 February 2014 (UTC)

Hey folks,

I basicly want to have two colors in my wiki: one color for normal links and one color for not-existing sites. Now I tried to do that, but it doesn't work as I hoped. I added to my Common.css:


/* standard link colors */
.mw-body a:link { color: #0645AD; } /* normal unvisited links */
.mw-body a:link:visited { color: #0645AD; } /* visited links */
.mw-body a:link:active { color: #0645AD; } /* active links */
.mw-body a:link.new { color: #CC2200; } /* new links */
.mw-body a:link.interwiki { color: #0645AD; } /* interwiki links */
.mw-body a:link.external { color: #0645AD; } /* external links */
.mw-body a:link.stub { color: #0645AD; } /* hovered links */
 
.mw-body a:link {color: #0645AD}
.mw-body a:visited {color: #0645AD}
.mw-body a:hover {color: #0645AD}
.mw-body a:active {color: #0645AD}


What am I doing wrong? If I apply the changes, nothing happens (I do refresh the page correctly).


BR, hpH 93.185.143.65 (talk) 14:45, 12 August 2012 (UTC)

Most likely the rule is not specific enough (aka a different css rule is overriding it). Try doing rules like .mw-body a:link { color: #0645AD !IMPORTANT; } (It could be something else, trying the !important will narrow it down). You can also use firebug to inspect which css rule takes precedence for a specific element (really helpful for debugging css)
Another thing to try is to use the css validator: http://jigsaw.w3.org/css-validator/ which will tell you if you made any syntax mistakes (and probably give a list of all css rules in affect on the webpage). Bawolff (talk) 14:10, 13 August 2012 (UTC)
Alright so I tried it and it works in a way. Links that exist won't change the color when visited which is what I wanted. But there are two things that aren't satisfying. First, the link color of new-visited links changes to blue aswell which indicates the article exists while this is not so. Second, the rules don't apply to the menu links. When I click on special sites or Discussion I still get the old colors, so it has no effect there.
Can you tell me where this is determined in the files on the server? I think it's better to do this within the files and not the wiki. DMR (talk) 10:46, 15 August 2012 (UTC)
>Can you tell me where this is determined in the files on the server? I think it's better to do this within the files and not the wiki.
We highly reccomend against modifying the files on the server for stuff like this. It will break when/if you upgrade mediawiki, and anything you can modify in one of those files you can modify on the wiki. (However, if I really can't convince you of that, these files are in the skins subdirectory. Personally I'd recomend taking a look at what rules are used there, and adapting them into mediawiki:Common.css.)
To stop the "new" links from changing colour, you should also add a rule like a:visited.new { color: #CC2200 !important; } (Or figure out the exact specificity needed to override just the colour for normal links, and not the colour for links with special classes).
>Second, the rules don't apply to the menu links
That is what the .mw-body part of the rules you were using means (They mean only apply to links inside mw-body, which does not include menus and stuff outside of the wikitext controlled area). if you drop that part of the rule, it will apply to all links (So rules like a:link { color: #0645AD !IMPORTANT; } ) Bawolff (talk) 12:25, 15 August 2012 (UTC)
Thank you very much, it works now just fine. The only thing that isn't working is the Talk page; when I click on an empty Talk page, the color turns to blue.
But I can live with that. Thanks again. DMR (talk) 18:14, 15 August 2012 (UTC)
The tabs use slightly different html. You can use selectors like: div.vectorTabs li.new a for them. Bawolff (talk) 18:20, 15 August 2012 (UTC)

How can I set up multi-wiki by one Mediawiki source code?

Fore example I want to set up 3 wikis.

en.moywiki.org
zh.moywiki.org
ja.moywiki.org

Can I install the wiki source code in home/wiki/. Then put separate config in different directory. Different wiki will use different database but same source code.

Will this be possible?

Now I can let en.moywiki.org direct to /home/en, but I can't make it work. Deletedaccount4567435 (talk) 00:25, 13 August 2012 (UTC)

Do you want a CommonSettings.php file for your wikis? Allen4names (talk) 02:44, 13 August 2012 (UTC)
Yes. There's a variety of ways to do this.
Wikimedia uses a heavy-weight approach known as $wgConf. It allows setting up different per-wiki configurations. However, this can be a little confusing to set up, and the documentation for $wgConf is a tad sparse.
Note, if you want to use certain cross wiki extensions (such as Extension:GlobalUsage), you may need to go the $wgConf route.
Another way that is more common in really small cases, is to have three separate directories all containing symlinks to the wiki code, but with each directory containing its own LocalSettings.php.
You can even have just one directory with wiki code, and the LocalSettings.php file, but have an if statement in the LocalSettings.php file. Something like (haven't tried that, so probably made a typo somewhere)
if ($_SERVER['SERVER_NAME'] === 'fr.mywiki.com' ) {
 $wgArticlePath = 'blah';
 $wgScriptPath = 'blah';
 $wgDBName = 'foo;
 // and so on
} else if ...
You may also want to read about manual:$wgSharedTables, manual:$IP, and manual:Wiki family Bawolff (talk) 14:03, 13 August 2012 (UTC)
Thank you!
I don't want to put 3 wiki in one directory. That will make it difficult to maintain in further.
Now we are running the zh version in a VPS which is short in disk space.
single localsetting.php will cause some cache problem.
Now all the tutorial that I found are talking about 3 different mediawiki using CommonSettings.php . I want to use single set of mediawiki code+3different localsetting.php which could let me change some mediawiki source code for all wiki easily. Zoglun (talk) 04:16, 14 August 2012 (UTC)
There should be no problem with doing that. Just have to make sure all the different entry points resolve to the same mediawiki directory.
>single localsetting.php will cause some cache problem.
What do you mean?
Now all the tutorial that I found are talking about 3 different mediawiki using CommonSettings.php . I want to use single set of mediawiki code+3different localsetting.php which could let me change some mediawiki source code for all wiki easily.
You could have one LocalSettings.php file, which based on a switch statement loads one of LocalSettingsEn.php, LocalSettingsZh.php or LocalSettingsJa.php depending on what site is visited. Most setups recomend putting some settings in a common settings file (otherwise you have duplication) but you can certainly just have a bunch of totally independant settings files for each wiki. Bawolff (talk) 12:34, 14 August 2012 (UTC)

Are there any working rating extensions?

In my Wiki there will be a lot of files and I think that I should give the users the option to rate those files. So what I'm thinking of should be looking like this:

Documentation
  • Docu 1 (May 2012) (4 of 5 stars)
  • Docu 2 (July 2012) (1 of 5 stars)


With the stars I mean of course a graphic of 5 stars and some of them are in color while the rest are grey.

Now by googling I found one extension that sounds interesting, but the stars are too big to are put in normal text. Do you know any alternatives?

BR, DMR (talk) 08:39, 13 August 2012 (UTC)

bump DMR (talk) 10:46, 15 August 2012 (UTC)

MediaWiki CMS issue

How i add a banner (728x90) or ads using google dfp on header and footer section to all pages of mediawiki cms.

Please any one help me.

Thanks in advance Asishint (talk) 12:43, 13 August 2012 (UTC)

Don't know what google dfp is, but...
The header can be edited by editing the page named MediaWiki:Sitenotice on your wiki (Must be wikitext).
Arbitrary html can be added to the footer via the page MediaWiki:Copyright.
See manual:System messages for details. For more detailed modifications you may have to make your own skin. See manual:Skinning
If you're looking for ads, there are several extensions available that support adding advertisements.
------
p.s. It should be noted that MediaWiki is not designed to be a CMS and lacks some of the features typically associated with CMS's. Bawolff (talk) 13:44, 13 August 2012 (UTC)

I'm began creacy...where is the problem in session_save_path?

I had installed Mediawiki. But when i try to save a page I have two tipes of errors.

If I'm not logged i riceve "Sorry! We could not process your edit due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in."

If I'm logged i recive: "Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service.

I'm traing to configure in in this way the LocalSettings.php but...is the same :( Many Thanks! Help me!

<?php

session_save_path("tmp");

  1. This file was automatically generated by the MediaWiki 1.19.1
  2. installer. If you make manual changes, please keep track in case you
  3. need to recreate them later. 2.224.75.22 (talk) 19:59, 13 August 2012 (UTC)
Help me please :( 2.224.75.22 05:38, 14 August 2012 (UTC)
The "Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service." message probably indicates it is not a session save path issue, but something wrong with your hoster, or a proxy between you and your hoster. Bawolff (talk) 19:55, 14 August 2012 (UTC)

documeting our network

Apache version 2.2.17 MySQL version 5.1.62 php5 5.3.5-1 MediaWiki 1.19.1

I would like to document our network with mediawiki.

coupling plane 1

Building Closet Space Topology Device Port

coupling plane 2

Building Closet Space Topology Device Port

We would like to have the data in the database and use a Search box to query or modify our data.

Can someone help us or are there some examples on the internet? Chaiwalla (talk) 11:08, 14 August 2012 (UTC)

I'd recommend Semantic MediaWiki, which supports the addition and querying of structured data like this. Sam Wilson 02:55, 15 August 2012 (UTC)

MW 1.19 - LocalS3Repo - Thumbnails issue

Hi :)

I'm using mediawiki 1.19 with LocalS3Repo plugin to store uploaded files on a s3 bucket.

There is a problem with thumbnails creation. Upload of a no-image file is ok, and thumbnails creation works when I don't use LocalS3Repo.

I have the fallowing error when I upload a file :

Error creating thumbnail: convert: no decode delegate for this image format `/tmp/magick-YNjolhWr' @ error/constitute.c/ReadImage/532. convert: missing an image filename `/tmp/s3thumb-jquWIp' @ error/convert.c/ConvertImageCommand/3011.

When I googled the error, I saw that I was not the only one with this issue, secondlife.com has it : "http://wiki.secondlife.com/wiki/Category:Images_that_trigger_MediaWiki_errors"

After severeal hours of search, I've absolutely no idea why thumbnails creation is broken.

Do you know where I can find help for this plugin ?

Thanks. Pierrefreund (talk) 12:41, 14 August 2012 (UTC)

Perhaps extension:LocalS3Repo hasn't been updated to deal with recent changes to how MediaWiki deals with filerepos that was introduced in MediaWiki 1.19.
The error message seems to indicate that image magick is having trouble finding the file in question.
You could try asking at extension talk:LocalS3Repo (although that doesn't seem to be monitored), or tracking down the author of said extension. Bawolff (talk) 13:41, 15 August 2012 (UTC)

Magic word for time zone

Is there any magic word for the time zone that appears in the user signature? (UTC in this case). --Gikü (talk) 14:33, 14 August 2012 (UTC)

Not currently as far as I'm aware. #timel from extension:ParserFunctions can output the timezone offset as part of some of its formats, but can't output just the timezone. (There used to be a bug for that not working, but i think it got fixed) Bawolff (talk) 15:06, 14 August 2012 (UTC)

Using $wgSMTP with Godaddy email account

I am trying to setup the wiki to use the email address no-reply@server.sturmkrieg.com, but I'm not sure what to put for each setting. Does anyone know what to put? What domain do they use for their email? Lieutenant Aleksandr Reznov 01:22, 15 August 2012 (UTC)

Have you read Manual:$wgSMTP?
>I am trying to setup the wiki to use the email address no-reply@server.sturmkrieg.com,
That is unrelated to the $wgSMTP setting. That is controlled by $wgPasswordSender. Bawolff (talk) 13:28, 15 August 2012 (UTC)
Yeah.
I used this:
$wgSMTP = array(
 'host'     => "secureserver.net", // could also be an IP address. Where the SMTP server is located
 'IDHost'   => "server.sturmkrieg.com",      // Generally this will be the domain name of your website (aka mywiki.org)
 'port'     => 25,                 // Port to use when connecting to the SMTP server
 'auth'     => true,               // Should we use SMTP authentication (true or false)
 'username' => "no-reply@server.sturmkrieg.com",     // Username to use for SMTP authentication (if being used)
 'password' => "my_password"       // Password to use for SMTP authentication (if being used)
);
I thought this needs to be set in order to make it actually from that email address, otherwise it's just from the server and looks like it's from that address.
Do I also need to set $wgPasswordSender to that address? I assume that I would need to do that. Инкуиситор Саша Ехренстеин аус дем Стурмкриг Сектор (Talk) (Contributions) 21:58, 15 August 2012 (UTC)
I believe 'username' is only for the username used during authentication. I don't think it has anything to do with the from address used on emails (With that said, your username could very well be whatever the from address is, so that may be the correct thing for it).
Normally $wgPasswordSender would be what controls the from address, not anything to do with the SMTP config. So yes you would need to set that appropriately.
Usually the thing sending mail via SMTP will identify itself in the HELO command. This is usually not related to who the email is listed as being "from", but if you really want to, you can add a 'localhost' key to the $wgSMTP array to control that:
$wgSMTP = array(
 'host'     => "secureserver.net",
 'IDHost'   => "server.sturmkrieg.com",
 'localhost' => "server.strumkrieg.com",
 // rest of the stuff you had above.
Bawolff (talk) 12:48, 16 August 2012 (UTC)

Extension's stylesheet media types being ignored by JS loader?

I'm not really sure yet what's going on here, but I think that mw.loader.load() is ignoring the media types that are specified in an extension. Everything works correctly with debug=true.

The $wgResourceModules entry looks like this:

$wgResourceModules["skins.$skinname"] = array(
    'styles' => array(
        'superfish.css' => array( 'media' => 'screen' ),
        'screen.css'    => array( 'media' => 'screen' ),
        'print.css'     => array( 'media' => 'print' ),
    ),
    'scripts' => array(
        'superfish.js',
        'intranet.js',
    ),
    'remoteBasePath' => "$wgScriptPath/extensions/$wgValidSkinNames[$skinname]",
    'localBasePath' => dirname(__FILE__),
);

With debug turned off, it's loading the stylesheets correctly as <link rel="stylesheet" ...> elements, but they also get included as part of the javascript that gets included at the end of the page. The second time they get included, in the JS, the media types are being left out, and so the print styles are being loaded for all requests.

I'm no doubt missing something obvious here! Any help would be greatly appreciated. Sam Wilson 02:25, 15 August 2012 (UTC)

As RoanKattouw said in #mediawiki connect:
(11:41AM) RoanKattouw: samwilson: The solution to that is to separate the CSS into a separate module
and call addModuleStyles() (which I suspect you're already using) on the style module
(11:41AM) RoanKattouw: samwilson: Also you shouldn't have @media in your CSS files, you should use
separate files for each media type and list them in your resource definition. See resources/Resources.php
in MediaWiki core for examples
(11:42AM) RoanKattouw: samwilson: Specifically, you can define a style file with 'foo.css' =>
array( 'media' => 'handheld' ) and that'll do the @media wrapping for you
So my solution was this:
$wgResourceModules["skins.$skinname.styles"] = array(
    'styles' => array(
        'superfish.css' => array( 'media' => 'screen' ),
        'screen.css'    => array( 'media' => 'screen' ),
        'print.css'     => array( 'media' => 'print' ),
    ),
    'remoteBasePath' => "$wgScriptPath/extensions/$wgValidSkinNames[$skinname]",
    'localBasePath' => dirname(__FILE__),
    );
$wgResourceModules["skins.$skinname.scripts"] = array(
    'scripts' => array(
        'superfish.js',
        'intranet.js',
    ),
    'remoteBasePath' => "$wgScriptPath/extensions/$wgValidSkinNames[$skinname]",
    'localBasePath' => dirname(__FILE__),
);
and then loading them like so:
$out->addModuleScripts("skins.$this->skinname.scripts");
$out->addModuleStyles("skins.$this->skinname.styles");
And all works as it should! Sam Wilson 07:43, 15 August 2012 (UTC)

Class=mediawiki dont work correct

After update from 1.8 to 1.9 class=mediawiki works not correct,because float-right or center without any changes.

Tables only on left site on page.

Bug? or update error? 78.51.129.183 (talk) 10:31, 15 August 2012 (UTC)

MW 1.9 is 5 years old. Did you mean 1.19?
------
I don't believe we have a css class named "mediawiki" (although I could be mistaken). Are you sure its not a class you yourself added?
If any css files in the skins subdirectory were modified for custom styles, they will be overwritten during an upgrade. Any custom CSS should be in the page MediaWiki:Common.css on your wiki in order to be safe from upgrades. Bawolff (talk) 13:13, 15 August 2012 (UTC)
Yes sorry Mistake is the 1.19.1 – 2012-06-13 and all mod files on the skin and localsettings was safe on local Storage before upgrade.
is posible a donwgrade to the old version 1.8 ? 78.51.129.183 16:16, 15 August 2012 (UTC)
Downgrading to 1.18 would probably be fine. Downgrading to 1.8 probably won't work. Most schema changes are backwards compatible, but every now and then there are some that aren't (or that are only backwards compatible with limited efficiency like the categorylinks change).
The upgrade between 1.18 -> 1.19 involved the following schema changes:
 200                         array( 'addIndex', 'logging',       'type_action',      'patch-logging-type-action-index.sql'),
 201                         array( 'doMigrateUserOptions' ),
 202                         array( 'dropField', 'user',         'user_options', 'patch-drop-user_options.sql' ),
 203                         array( 'addField', 'revision',      'rev_sha1',         'patch-rev_sha1.sql' ),
 204                         array( 'addField', 'archive',       'ar_sha1',          'patch-ar_sha1.sql' ),
 205                         array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' ),
 206                         array( 'modifyField', 'user_groups', 'ug_group', 'patch-ug_group-length-increase.sql' ),
 207                         array( 'addField',      'uploadstash',  'us_chunk_inx',         'patch-uploadstash_chunk.sql' ),
 208                         array( 'addfield', 'job',           'job_timestamp',    'patch-jobs-add-timestamp.sql' ),
 209                         array( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ufg_group-length-increase.sql' ),
All of these should be backwards compatible with 1.18 (Although the user_options field was dropped, that hasn't been in use since like 1.15). Thus you should be able to just change your version of MediaWiki to 1.18 and everything would still work. However: The same is not true of MediaWiki 1.8, and I would be shocked if 1.8 worked with a 1.19 schema Bawolff (talk) 16:28, 15 August 2012 (UTC)

Blank pages displayed on android devices

Someone recently pointed out to me that our wiki now only displays blank pages for android devices. It appears to work fine using anything else. I've also checked to see what google bot sees and it only sees blank pages too which has caused the wiki not to be displayed in search results now. I'm not sure how long it has been like this, so tried disabling all extensions we used, but that didn't help. Any ideas what could be causing it?

Can you try enabling php error reporting and list any errors reported? See How to debug Bawolff (talk) 18:57, 15 August 2012 (UTC)

Do not submit

Hi folks, I'm trying to develop an extension, and I can't abort the submit if the validation that I have to do returns false. The validation is being done in jscript.

This is a summary of my code.

myExtension.php:

$wgOut->addScript('<script src="'.$wgScriptPath.'/extensions/myExtension/myExtension.js" type="text/javascript"><script>' );

..

$form = Html::openElement('form', array('method'=>'post', 'name'=>'myForm', 'id'=>'myForm', 'action'=>$this->save('action=submit'))) .
	Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
..
# TEXTBOX
Xml::label( 'My label:', 'myLabel' ) .
Html::input( 'myText', '', 'textbox' ) . '<br />' .
..
# Submit Button
Xml::submitButton( 'Save' , array( 'style' => 'width: 80px;', 'onclick' => 'clicar()' ) ) .
..				
Html::closeElement( 'form ');
$wgOut->addHTML( $form );
}

myExtension.js:

function clicar() {
	return (document.getElementById('myText').value != '');
}

How do I have to do to abort the submit? I don't want to request the server if the user doesn't fill some fields. If anyone could help me, I will be grateful.

I'm using MW 1.17.2

Thanks ;) Crismagnabosco (talk) 20:34, 15 August 2012 (UTC)

anyone to help? 201.55.240.5 17:29, 17 August 2012 (UTC)

[SOLVED] White mw-collapsible-toggle

How can I change the font color of the (1.18) collapsible toggle? I've attempted to do so already, but nothing I've tried works (I'm relatively new to CSS).

EDIT: Solved. Dzylon (talk) 20:54, 15 August 2012 (UTC)

Setup fails!

Hello, When first starting MediaWiki 1.19.1, I get the initial page and can progress to installation. However when I reach this page it's not completed correctly. I tried this on another linux machine without any issues but on my hosted server it fails. I am not able to enter and data for admin user/password or details of my DB server - the page is effectively blank with empty bullet points.

Here is the HTML code for the page :

<h2>Welcome to MediaWiki!</h2><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a><div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="mw-infobox config-error-box"><div class="mw-infobox-left"><img src="../skins/common/images/critical-32.png" alt="Information" /></div><div class="mw-infobox-right"><p><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a>
</p></div><div style="clear: left;"> </div></div><div style="clear: left;"> </div><div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>
<div class="config-message"><a rel="nofollow" target="_blank" class="external autonumber" href="">[1]</a></div>

93.152.167.149 (talk) 07:13, 16 August 2012 (UTC)

This is can be caused if the version of PHP you are using has PCRE compiled without unicode support (I've been told this is the case for pre-built packages on red hat/cent os). Try downloading php from a different source.
Sorry about the total fail of this error. Hopefully next version will degrade more gracefully and give a descriptive error (Its on my list of thing to fix). Bawolff (talk) 16:36, 16 August 2012 (UTC)
Is there a way to locate if this is the cause of the error? I am getting the same error (text messages aren't even parsed on the install screen) but it is not my server and I'd rather be sure before contacting them. --134.76.0.221 13:38, 17 August 2012 (UTC) (thx in advance for any help) 134.76.0.221 13:38, 17 August 2012 (UTC)
If you enable php error reporting, you will also get a warning that looks something like:
PHP Warning: preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
Which would confirm that PCRE lacking unicode support is the issue at hand
However, the only thing that can cause the all text being replaced with [1] thingy is PCRE missing unicode property support as far as I am aware, so I'm pretty sure that is the issue.
We are getting many reports of this issue with MediaWiki 1.19 (MW 1.19 is the first version that uses unicode regexes for parsing external links). Bawolff (talk) 14:10, 17 August 2012 (UTC)
You are rigth. Using the installer of .18.4 confirmed the source of the error. Thanks for your Reply. 134.76.0.221 17:23, 21 August 2012 (UTC)

How many user can i create?

Hello,

How many users can i create in which categories?

tks. 200.236.209.211 (talk) 13:52, 16 August 2012 (UTC)

Hi. I'm missing the crate account/log in on my wiki - only log in is visible. Users are suddenly unable to see the create account/log in link. I have $wgGroupPermissions['*']['createaccount'] = false; in Local Settings. I can access the create account/log in by bringing up Special:UserLogin in when I am logged in. But if I'm not logged in and bring it up (going to its direct url), I get a permissions error saying the action is limited to Administrators. I feel I must have erased or altered something, and I can't figure out what it is. I'm using the latest version (just upgraded). My wiki is wiredwiki.as.uky.edu.

Any idea what I changed that seems to have escaped me? Something obvious I'm missing? 199.76.150.35 (talk) 17:14, 16 August 2012 (UTC)

Hi,
By adding $wgGroupPermissions['*']['createaccount'] = false; you have removed this option for all users, as "*" is for all,
probably you can try adding these lines :
$wgGroupPermissions['users']['createaccount'] = false;
$wgGroupPermissions['Admin']['createaccount'] = true;
Also let us know, if you want to block it for all the users or only for few ? 120.61.18.53 19:57, 16 August 2012 (UTC)
Thanks for your response. Tried it and didn't work. The link still doesn't come up and when I pull the page directly, if not logged in, I get "you do not have permission to create this user account, for the following reason:
The action you have requested is limited to users in the group: Administrators."
I must have messed something up. I shut down registration for a few months via the code that allows you to do so, but when I took the code off, I lost the create account option. This is the code I used to shut down registration for awhile:
# Disable for everyone.
$wgGroupPermissions['*']['edit']              = false;
# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
$wgGroupPermissions['user']['edit']           = false;
# Make it so users with confirmed e-mail addresses are in the group.
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
# Hide group from user list. 
$wgImplicitGroups[] = 'emailconfirmed';
# Finally, set it to true for the desired group.
$wgGroupPermissions['emailconfirmed']['edit'] = true;
# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;
98.19.156.140 15:35, 17 August 2012 (UTC)
I believe what 120.61.18.53 means is $wgGroupPermissions['sysop']['createaccount'] = true; instead of $wgGroupPermissions['Admin']['createaccount'] = true;. User:Iggyvolz, but you'll probably find me on Wikia 21:23, 20 August 2012 (UTC)
 00:36, 9 July 2015 (UTC)

wiki text translator for MW 1.16

I am using MW 1.16 version is there any extension available for translating the wiki page text in differnt languages, With the available extensions i was only able to translate the navigation text, please advice ! 120.61.18.53 (talk) 19:51, 16 August 2012 (UTC)

Extension:Translate allows you to create translations of pages (I believe, I've never used it, but its in use in several high profile wikis).
If you're looking for automatic translation, there's things like Extension:Live_Translate (I've also never used it).
-----
There are certain hacks to make pages translated based on the language in special:preferences without any extensions. Specificly see int: in help:Magic Words. Using such facilities are quite hacky/ugly, but they are used succesfully to translate templates at Wikimedia Commons Bawolff (talk) 20:06, 16 August 2012 (UTC)

index only view-able from localhost

Greetings,

I am running MediaWiki on a WAMP server, Windows 7, Apache 2.2.22, MySQL 5.5.24, and PHP 5.4.3 and everything works great, as long as I am at the localhost. When I try to view it from another computer on the network using either the IP address [192.168.x.x/wiki] or the WINS host-name [host/wiki] I get nothing, the browser either times out or gives me a 404 error. I can view anything in the parent directory and even anything else in the wiki directory [host/README] works without a problem. If I rename index.php to something else Apache will even give me a full listing of the wiki folder in my browser!

I just can't figure this out, I've tried:

-turning off Windows firewall -creating a brand new installation (it worked but I couldn't figure out how to migrate my content) -changing $wgServer from "localhost" to my IP address -creating a .htaccess file with one line: "DirectoryIndex index.php"

Also, I for some reason go to a specific page from another computer but it is just text, no formatting, like it can't get the stylesheet. Mkriegs (talk) 23:53, 16 August 2012 (UTC)

interesting development: I can rename the current index.php and create a new one with some jibberish in it and it'll go straight there... this is so confusing Mkriegs (talk) 00:07, 17 August 2012 (UTC)
Also, I for some reason go to a specific page from another computer but it is just text, no formatting, like it can't get the stylesheet.
This is caused by $wgServer being set to localhost instead of your public IP address or WINS host name.
If you just get a blank page, that may indicate a php fatal error. See How to debug which will say how to enable php error reporting, which may give a more useful error.
Also check if when you visit the website, if its redirecting you somewhere. What can happen on some versions of MediaWiki is that if $wgServer, $wgArticlePath, or $wgScriptPath is set incorrectly, one may get redirected to an address (like localhost) which is only valid from some computers. Bawolff (talk) 12:42, 17 August 2012 (UTC)
Well I monkeyed with it so much last night that I officially made the problem worse, so since there wan't a great deal of content I just copied and pasted everything into notepad. Going to start over with a fresh install, I'll be sure to look at those variables you mentioned.
Thanks,
Matt Mkriegs (talk) 13:38, 17 August 2012 (UTC)
Note the content in the wiki is stored entirely in the db (Well except for images), while all the settings and what not are stored in LocalSettings.php. The upshot of this is if you delete your MW install but keep the database, but when you re-install use the same db server and db name, all your content should be preserved, but with setting that reflect the fresh install. Bawolff (talk) 14:06, 17 August 2012 (UTC)
See now, that's what I thought, but doing a fresh install -> restore DB backup -> restore localsettings.php and I still had no content even if I typed in a page that I knew existed (could see it with PHP-MA). Anyways, my fresh install + manual (notepad.txt style) migration is working great :)
I think what I learned from this is that if you're developing on localhost, but want to be accessible over WINS or IP, don't use localhost/... use what you want to be visible as. Does that sound accurate to any of you veterans? It appears to me that localsettings.php gets populated as you use the wiki, is this true? Because $wgServer and those variables weren't present in my "as-downloaded" localsettings.php Mkriegs (talk) 14:23, 17 August 2012 (UTC)
I think what I learned from this is that if you're developing on localhost, but want to be accessible over WINS or IP, don't use localhost/... use what you want to be visible as. Does that sound accurate to any of you veterans? It appears to me that localsettings.php gets populated as you use the wiki, is this true? Because $wgServer and those variables weren't present in my "as-downloaded" localsettings.php
The installer is the only thing that writes to LocalSettings.php. If $wgServer is not present in LocalSettings.php we guess what the correct value should be on every request (So if you access the site as localhost, it magically becomes localhost just for that request, and if you access via IP later, it becomes that IP, and so on). By and large everything should just work in regards to $wgServer if it is not present, even if you access the site via different host names. (In fact not putting it in LocalSettings.php was the default up until recently. I'm not sure why we changed doing that).
With that said, if you always access it by the hostname you want (in particular, you especially do that while running the installer), there is no possibility of MediaWiki getting confused at any point. Bawolff (talk) 14:47, 17 August 2012 (UTC)

Trouble's Installing

I have downloaded and extracted the files for mediawiki to a subdirectory, www.example.com/wiki. When I go to install it I get this error: http://darkswordshelp.com/wiki/mw-config/index.php

This is the second time this has happened. I did this once, removed all the files and reuploaded them to my FTP, but I have the same results. 71.38.122.251 (talk) 03:06, 17 August 2012 (UTC)

Double check that session.save_path config directive in your php.ini file is set to something that exists and is readable and writable by the web server user. Bawolff (talk) 12:37, 17 August 2012 (UTC)

SVG rendering error

Can somebody please help me get my wiki to display SVG files?  I'm having error after error, and I don't understand how SVG works yet.

  • Be advised: this is a private wiki that is offline (similar to a wiki-on-a-stick), running on Windows XP through the MoWeS Portable II server package.  The wiki version is MediaWiki 1.16.0.

I've successfully set my LocalSettings.php file to allow SVG uploads, and am using a few simple test images pulled straight from Wikipedia.

The Configuration settings and Image Administration Manuals here on MediaWiki have not been helpful at resolving the problem, and have only yielded more complicated errors that are not mentioned in those manuals.

My current LocalSettings.php configuration settings for SVG files reads as follows:

$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'ImageMagick';
$wgSVGConverterPath = "C:\mowes\ImageMagick";
$wgSVGConverters = array( 'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output');

The current error is:

Error creating thumbnail: convert: no delegates configuration file found (delegates.mgk).
convert: no delegate for this image format (SVG).
convert: Missing an image file name. — Terminator484 (talk) 03:32, 17 August 2012 (UTC)
Addendum
ALL image thumbnail rendering is also broken.  The error is vague and unhelpful:
Error creating thumbnail: The system cannot find the path specified.
Undoing the changes made to LocalSettings.php failed to correct the problem.
Please help. — Terminator484 (talk) 06:07, 17 August 2012 (UTC)
The error
Error creating thumbnail: convert: no delegates configuration file found (delegates.mgk).
convert: no delegate for this image format (SVG).
convert: Missing an image file name.
I think means that you have image magick set up incorrectly (As in the convert program itself, not MediaWiki). Basically convert is missing a file that tells it how to thumbnail various image formats. Try re-installing image magick.
Error creating thumbnail: The system cannot find the path specified.
Did you set $wgImageMagickConvertCommand to something appropriate? Bawolff (talk) 12:34, 17 August 2012 (UTC)
How do I re-install ImageMagick on Windows?  Version 4.2.9 came as part of the MoWeS package; and I don't know how to upgrade anything on a server.
I didn't even have $wgImageMagickConvertCommand set to anything... but when I added that line, the error for thumbnails changed to:
Error creating thumbnail: convert: Unrecognized option (-set).
And the error for SVGs stayed the same.
Hiding the $wgSVGConverterPath = "C:\mowes\ImageMagick"; line changed the SVG error to:
Error creating thumbnail: Invalid Parameter - whiteTerminator484 (talk) 23:35, 17 August 2012 (UTC)
> Error creating thumbnail: Invalid Parameter - white
After reading about passthru(), it seems there are some PATH issues. You can fix this bug by forcing the search path via $wgSVGConverterPath. For example, $wgSVGConverterPath = 'C:/Program Files/ImageMagick-6.4.5-Q16/' fixes it for me. 88.130.108.32 21:59, 14 September 2012 (UTC)
I already tried that; see previous replies. — Terminator484 (talk) 21:31, 18 September 2012 (UTC)
 00:30, 3 October 2012 (UTC)
Setting $wgSVGConverterPath = "C:\mowes\ImageMagick"; changes the error from "Error creating thumbnail: Invalid Parameter - white" to:
Error creating thumbnail: convert: no delegates configuration file found (delegates.mgk).
convert: no delegate for this image format (SVG).
convert: Missing an image file name.
It does not fix the problem. — Terminator484 (talk) 00:36, 3 October 2012 (UTC)
After a complicated (to put it mildly) upgrade to ImageMagick 6.8.0, the errors have all vanished...
...but there's one little bug remaining, that hopefully will be simpler to fix.
Among my test SVGs are a few generic images copied straight from the Wikimedia Commons.  Two of them are rendering oddly... File:X_mark.svg and File:Yes_check.svg are both just a black outline with white interiors: no colors.
Any idea what's wrong? — Terminator484 (talk) 02:42, 15 October 2012 (UTC)
Wikimedia Commons uses a program named rsvg to render svgs. Sometimes rsvg and ImageMagick interpret images different (However, usually image magick is more correct). Bawolff (talk) 22:32, 22 November 2012 (UTC)
Those images use radial gradients, and a simple research on some forums suggests that ImageMagick doesn't support all of the SVG features, being radial gradients one of them. You may try to edit the file and convert that radial gradient to a fixed color, or install rsvg (which would require A LOT of dependencies to other packages). Ciencia Al Poder (talk) 10:46, 24 November 2012 (UTC)

Additional registration information

I wonder if there is a chance to add more data to the registration process. I want to put users in different groups so I could've a mailing list. Like a drop down menu or something from which the user can choose one and this adds him automatically to a certain group.

Is that possible? DMR (talk) 08:09, 17 August 2012 (UTC)

You could possibly write an extension using UserCreateForm hook. Maybe base it off how captcha extensions work
The code related to the login form isn't exactly the prettiest part of MediaWiki... Bawolff (talk) 12:52, 17 August 2012 (UTC)

Problem with import XML dump to MW after upgrade

I have used MW 1.18 and made from time to time XML dumps and import new pages. It works from 1.16 and now I have upgraded to MW 1.19 and now I have problem. I have XML containing multiple pages and use always the same XML that used to work. Now I can import only first page from file. When I delete first page MW imports only the second one. So the XML looks ok. What can be the problem ? Arekbis (talk) 10:50, 17 August 2012 (UTC)

Are you using special:import, or importDump.php (or something else) to import the file.
If you enable all php warnings, do any php warnings or errors occour Bawolff (talk) 18:41, 17 August 2012 (UTC)
I use special:Import. There is no any warrning. I suppose that it is the problem with codepage, when you use ie. "<ref>" in the text but I don't know why it appears in 1.19. In previous versions there was any info ~ Arekbis (talk) 10:54, 21 August 2012 (UTC)

i have now gotten the anon extension to work, so anon users cannot see anything without logging in. now onto the collapsing sidebar and restriction of said groups

       MediaWiki  	1.18.1
       PHP 5.3.15 (apache2handler)
       Database  	5.5.27

I am having some issues trying to get this figured out. i have looked around but cannot seem to get it to work correctly. I included HideSidebar (Version 1.0.1) Im trying to removed the un-needed login from the side bar, as there it redirects to the wrong page, and we have a working one at the top right. it currently directs to index.php/Special:Log_in instead of index.php?title=Special:UserLogin&returnto=Special%3ALog+in where it should be going. so I would like to remove it, or change the redirect. I am new to the php world so not really sure how to accomplish this. I also would like to make multiple categories on the sidebar but only available to the appropriate user. ex sup can see all groups below them tl can see their groups and groups below them but not the ones above etc. I would also like to make these collapse-able. any help would be greatly appreciated 168.251.2.40 (talk) 13:41, 17 August 2012 (UTC)

i have now gotten the collapse able sidebar to work.... guess i just wasn't reading fully.... urrrrgh.
items i have left if anyone has any helpful hints/suggestions/solutions
1- ability to hide these sidebar categories depending on user access level
2- hide or edit the login thats on the sidebar 168.251.2.40 15:08, 17 August 2012 (UTC)
> removed the un-needed login from the side bar, as there it redirects to the wrong page, and we have a working one at the top right. it currently directs to index.php/Special:Log_in
Default mediawiki doesn't have that. Are you sure that is not coming from an extension, or something manually added to the MediaWiki:Sidebar config page.
>ability to hide these sidebar categories depending on user access level
Extension:DynamicSidebar could maybe do that. If you mean collapse by default based on group using the vector collapsible sidebar extension, you'd probably have to do custom js programming (user groups can be accessed in js via mw.config.get( 'wgUserGroups' ); ) Bawolff (talk) 17:06, 17 August 2012 (UTC)
Default mediawiki doesn't have that. Are you sure that is not coming from an extension, or something manually added to the MediaWiki:Sidebar config page.
- I don't see it under the config page everything looks normal, it is very possible from an extension, as i got handed this to work on. ill look into those now. as far as the hiding of the categories, i was talking about not visible at all to lower access level users. ill see if that extension will work i greatly appreciate the help 168.251.2.40 17:23, 17 August 2012 (UTC)

RunJobs.php

Everytime I try to run "RunJobs.php", I get the following errors:

PHP Notice:  Undefined index: HTTP_USER_AGENT in /var/www/*****.com/public/w/extensions/MobileDetect/MobileDetect.php on line 27
PHP Notice:  Undefined index: HTTP_ACCEPT in /var/www/*****.com/public/w/extensions/MobileDetect/MobileDetect.php on line 28

Anyone have any idea what the issue is? Zackmann08 (talk) 14:09, 17 August 2012 (UTC)

MobileDetect runs even when in command line mode. That fails because in command line mode no web browser is accessing the wiki, so one can't detect if its a mobile browser.
The bug is in the extension, and would need to be fixed by the extensions maintainer.
However, with that said, you could probably safely ignore the warnings and unless some critical setting is depending on the results of mobile detect, nothing bad will happen. Bawolff (talk) 14:21, 17 August 2012 (UTC)

Maintenance script error with APC enabled

Hi, I'm getting the following error trying to run the maintenance script runJobs.php with APC enabled:


CACHE_ACCEL requested but no suitable object cache is present. You may want to install APC.
Backtrace:
#0 [internal function]: ObjectCache::newAccelerator(Array)<br> #1 /nfs/c02/h06/mnt/46267/domains/practicalplants.org/html/w/includes/objectcache/ObjectCache.php(62): call_user_func('ObjectCache::ne...', Array) #2 /nfs/c02/h06/mnt/46267/domains/practicalplants.org/html/w/includes/objectcache/ObjectCache.php(50): ObjectCache::newFromParams(Array) #3 /nfs/c02/h06/mnt/46267/domains/practicalplants.org/html/w/includes/objectcache/ObjectCache.php(23): ObjectCache::newFromId(3) #4 /nfs/c02/h06/mnt/46267/domains/practicalplants.org/html/w/includes/GlobalFunctions.php(3816): ObjectCache::getInstance(3) #5 /nfs/c02/h06/mnt/46267/domains/practicalplants.org/html/w/includes/Setup.php(439): wfGetMainCache() #6 /nfs/c02/h06/mnt/46267/domains/practicalplants.org/html/w/maintenance/doMaintenance.php(98): require_once('/nfs/c02/h06/mn...') #7 /nfs/c02/h06/mnt/46267/domains/practicalplants.org/html/w/maintenance/runJobs.php(110): require_once('/nfs/c02/h06/mn...') #8 {main}

I get no such problem from the front-end wiki itsself, and I can see from my PHP info that APC is enabled. http://s46267.gridserver.com/gs-bin/phpinfo.php-stable shows:

APC Support enabled
Version 3.1.11
APC Debugging Disabled
MMAP Support Enabled
MMAP File Mask no value
Locking type pthread mutex Locks
Serialization Support php
Revision $Revision: 325875 $
Build Date Aug 13 2012 11:25:11

Directive Local Value Master Value
apc.cache_by_default On On
apc.canonicalize On On
apc.coredump_unmap Off Off
apc.enable_cli Off Off
apc.enabled On On


Is this a problem you've encountered before? Any ideas what I can do to solve it, other than turning caching off?

Thanks, Andru 37.1.177.187 (talk) 15:12, 17 August 2012 (UTC)

I think i've heard of people having this problem if APC is installed for the web server's php, but APC is not installed for the php command line client.
I guess the solution is to install it for the cli, or disable caching in mediawiki only if $wgCommandLineMode is true. Bawolff (talk) 17:24, 17 August 2012 (UTC)

[SOLVED] Search results: how to add more result lines per page, how to show more characters

It seems that the searchresults are listed as followed:
Pagename
first line of text (+- 80 characters)
second line of text (+- 80 characters)
Is it possible to change this? Even on 1024*768 it's possible to show more than 120 characters and 2 lines is often to short to give a good impression of the page. Maybe via localsettings or a CSS perhaps? I searched for it on this site and Google but maybe I'm not good in using the best term, I'm always getting results of totally different issues.
Can somebody help me? Thanks in advance.
Greetings
[added]
Product Versie
MediaWiki 1.19.1
PHP 5.3.3-7+squeeze13 (apache2handler)
MySQL 5.1.63-0+squeeze1 Dries (talk) 15:24, 17 August 2012 (UTC)
I found it hardcoded in /includes/search/SearchEngine.php around line 372 (better search for userHighlightPrefs()) and changed it hardcoded. Only problem still is that my page is only filled half. Search on...! Dries (talk) 15:58, 17 August 2012 (UTC)
OK and I changed my MediaWiki:Common.css with
div.searchresult {
width: 100%;
} Dries (talk) 16:30, 17 August 2012 (UTC)
How exactly did you change it? I want to do this too. Michaelbeijer (talk) 14:55, 29 October 2023 (UTC)

Visible templates in search results

I've searched the internet before and the only result I found then was: "there is no other way". Hopefully somebody can help.

In our wiki we heavily use templates. These templates are maintained by a robot each night via our own Framework. This way we don't need to maintain them ourselves because we're talking about 10 000 templates. Sadly those templates are in the searchresults. Is there a way to translate those templates in what they should be?

If somebody can give tips about writing an extension and point me in the right direction (hooks,...), I would very much appreciate that.

Thanks for any help! Dries (talk) 15:36, 17 August 2012 (UTC)

This is bugzilla:18861.
Basically one needs to run expand templates (aka run the preprocesser) before feeding the page text to the search engine.
There's some very limitted docs at http://svn.wikimedia.org/doc/classSearchEngine.html for the search engine class. Different search engines can be registered by using the $wgSearchType registration variable. The SearchUpdate hook may also be useful. Templates can be expanded using the preprocess method of the parser (I'm not sure off the top of my head if that's the most correct way vs some method involving preprocessToDom/preprocessor class, but preprocess seems to be what special:expandtemplates does). Bawolff (talk) 17:20, 17 August 2012 (UTC)
Thanks for the reply. It seems like this is a very old problem and more and more wiki's are getting into trouble. It's clear it's too difficult for me to work it out myself. Dries (talk) 15:10, 20 August 2012 (UTC)

How can I disable "Upload a new version of this file"

You can't believe how many problem were made with this function by my my poor users.

I am not going to write those frustrating problems here. Since Mediawiki's programmer are not going to fix it.

I just want to know how can I disable this faulty function. Deletedaccount4567435 (talk) 16:48, 17 August 2012 (UTC)

>Since Mediawiki's programmer are not going to fix it.
We especially don't fix issues we're not told about (With that said, I'm aware there are some usability concerns with that feature, but nonetheless, not telling us where we went wrong doesn't get stuff fixed).
>I just want to know how can I disable this faulty function.
Remove the 'reupload' and 'reupload-own' right from all users. Put the following at the bottom of LocalSettings.php:
$wgGroupPermissions['user']['reupload']         = false;
$wgGroupPermissions['user']['reupload-own']     = false;
$wgGroupPermissions['sysop']['reupload']        = false;
If you only want to disable for your poor users, but let your sysops fend for themselves, then don't include the last line. Bawolff (talk) 16:59, 17 August 2012 (UTC)
Thank you!!!!!!
I write some of those problem last year in bugzilla, but no improve were made until MW 1.19. That's why I say
> Since Mediawiki's programmer are not going to fix it. Zoglun (talk) 17:31, 23 August 2012 (UTC)

Strange reserved name issue when updating/saving pages, results in 500 server error

Whenever I use the following names in my content:

select
echo
setting
update

I get a 500 server error. If I paste my content into the SandBox (http://www.mediawiki.org/wiki/Project:Sandbox) it works fine, so I think its a server issue.

I have tried to enable debugging, but since it redirects to a 500 server error page I do not think it displays the errors. I have cPanel, and the server errors are of no use, it just says 500 page not found.

I tried disabling mod_security, which either makes all pages go to 500 errors, or still has the same issue.

I have tried a brand new install of MediaWiki 1.19.1 (no extensions) and still get the same issue, even tried changing to UTF-8 from binary.

The only warning in the install is this "Warning: The intl PECL extension is not available to handle Unicode normalization, falling back to slow pure-PHP implementation."


Server Settings: MediaWiki 1.19.1 PHP 5.3.6 (apache2handler) MySQL 5.0.95-community-log


Right when i change my content from "update" to "upda3te" it saves perfectly Strangest thing ever. 216.110.88.114 (talk) 17:29, 17 August 2012 (UTC)

Do you have apache mod_security installed? It is known to cause super weird issues like this. Bawolff (talk) 18:10, 17 August 2012 (UTC)
If you don't mind, explaining further, how would I find this out? I have full cPanel access, but is this something that I can change their or do I need to ask my host? Would I need command line access/shell or SFTP?
I'll try getting more access to my server in the meantime.
Thanks for the quick response!!!! 216.110.88.114 18:59, 17 August 2012 (UTC)
Umm good question, I'm not sure how to check if you have that installed. The obvious way it to look in httpd.conf, but from your description it sounds like you don't have access to that.
Some configs of apache will list what modules are installed in the http server header, as well as in error pages (for example the default 404 error page). But the type of people to install mod_security, are probably also paranoid and remove that sort of info. You might be able to do it with the php apache_get_modules function, I've never tried it (If one can indeed do that, we should perhaps add a check in the installer)
If you have access to the apache error_log, there might be entries corresponding to things prevented by mod_security (However its also possible your web host uses a filtering system that is similar to mod_security, but a different product).
Probably the easiest way would be to just send an email to your host and ask. Bawolff (talk) 19:07, 17 August 2012 (UTC)
Okay, ran the PHP function and it printed this array:
Array ( [0] => core [1] => mod_access [2] => mod_auth [3] => mod_include [4] => mod_deflate [5] => mod_log_config [6] => mod_logio [7] => mod_env [8] => mod_expires [9] => mod_headers [10] => mod_unique_id [11] => mod_setenvif [12] => mod_proxy [13] => proxy_connect [14] => proxy_ftp [15] => proxy_http [16] => mod_ssl [17] => prefork [18] => http_core [19] => mod_mime [20] => mod_status [21] => mod_autoindex [22] => mod_asis [23] => mod_info [24] => mod_suexec [25] => mod_cgi [26] => mod_negotiation [27] => mod_dir [28] => mod_imap [29] => mod_actions [30] => mod_userdir [31] => mod_alias [32] => mod_rewrite [33] => mod_so [34] => mod_auth_passthrough [35] => mod_bwlimited [36] => mod_fpcgid [37] => mod_php5 [38] => mod_security2 [39] => mod_zeus )
Apparently I'm on "mod_security2". I'll continue digging, just updating to see if this helps. 216.110.88.114 19:56, 17 August 2012 (UTC)
Awesome! I will try to get access to the httpd.conf, and also ask this of my host. Thanks for the head start on my research of this issue! 216.110.88.114 19:20, 17 August 2012 (UTC)

Special:Statistics don't work

Hello ppl, i'll write here in german, because my english is too bad for native english speakers, i hope to get some help.

Hallo zusammen, in meinem Wiki fiel mir auf, das die Funktion Spezial:Statistik keine korrekten Ergebnisse ausgibt, es existieren bereits 7 Artikel im gleichnamigen Namensraum, trotzdem zeigt die Statistik falsche Werte" Hilfe was läuft da falsch?!?!

Nebenbei: es tritt häufig das Problem auf, dass die Erweiterung "Wiki Editor" oder Collapsible Navbar nicht korrekt ausgeführt/geladen werden, was kann ich dagegen tun?

Viele Grüße aus Deutschland. Abani79 (talk) 21:20, 17 August 2012 (UTC)

Here my problem in english, i hope its understable.
In my wiki, I noticed that the special function: statistics output no correct results, there are already 7 articles in the same namespace, but the statistics show wrong values ​​"Help what's going on here"??
By the way: it is common the problem that the extension "Wiki Editor" or Collapsible Navbar will not run correctly / loaded, what can I do? Abani79 (talk) 07:48, 18 August 2012 (UTC)
What you need to do is update the statistics. There is a whole list of Maintenance scripts that you can run to help with your site. The one that you want is updateArticleCount.php (Visit that link for instructions on how to user it). Hope that helps! Zackmann08 (talk) 18:05, 19 August 2012 (UTC)
Hi Zackmann, i'll read and try it out, thank you for your reply. Abani79 (talk) 18:58, 21 August 2012 (UTC)

If a file is 'wanted', chances are it has no description and thus an upload is what is desired - perhaps the wantedfiles list could link to the file upload intead?


i.e. current wantedfile links:

File:example.jpg&action=edit&redlink=1


Suggested link to generate instead:

Special:Upload&wpDestFile=example.jpg Gth-au (talk) 03:26, 18 August 2012 (UTC)

Move your Wiki

I just moved the location of my personal Wiki and now it errors :(. I changed the settings php to point to new location but it still does not work. It can be viewed here: http://jamie-marchant-personal.uphero.com/mediawiki-1.18.1/. I am using PHP 5.2.*, MySql 5.1 and MediaWiki-1.18.1. Someone please help me with this issue. Jamiemarhcant2 (talk) 16:00, 19 August 2012 (UTC)

What lines of your LocalSettings.php file contain the $wgGroupPermissions variable?
You should also read Manual:Preventing access#Restrict viewing of all pages. Allen4names (talk) 17:07, 19 August 2012 (UTC)
$wgServer is most likely set to the name of your old domain. Change it in LocalSettings.php Bawolff (talk) 20:09, 20 August 2012 (UTC)
I moved the Wiki from one sever folder to another, I did not change domains, so $wgServer is correct. My promistions are as follows:
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
For at the moment I am the only one using the Wiki. Jamiemarhcant2 (talk) 01:15, 22 August 2012 (UTC)
If you want others to read your wiki you shoud change the following line in LocalSettings.php replacing 'false' with 'true'.
$wgGroupPermissions['*']['read'] = false;
You may also want to check to see if $wgScriptPath is set to an absolute pathname such as "/mediawiki-1.18.1". Allen4names (talk) 05:29, 22 August 2012 (UTC)

Is it allowed to advertise on wiki pages ?

Is it allowed to put ad banners on wiki pages ? GuySh (talk) 17:24, 19 August 2012 (UTC)

If you own the wiki (that you are hosting yourself), you can use it for any purpose whatsoever, including commercial purposes.
If your wiki is being hosted by someone else for you (for free, or you are paying them), they may have restrictions on what you can do with it. If you're paying them its unlikely they would restrict advertising, but free wiki-hosts may. Bawolff (talk) 20:08, 20 August 2012 (UTC)
Thank you. GuySh (talk) 10:54, 14 September 2012 (UTC)

Date Created

Is there any way to get the date that a page was first created? I know there is a whole list of Magic Words but I can't seem to figure out how to use any of them to get the date a page was created. Any help is most appreciated. :-) Zackmann08 (talk) 17:58, 19 August 2012 (UTC)

Database returned error ‘1146: Table 'truesain_WSDATABASE.watchlist' doesn't exist (localhost)’

Ok, so I've been trying to re-install mediawiki with the old database, however, I'm getting the below error.

An error occured: A database query syntax error has occurred. The last attempted database query was: ‘SELECT count(*) FROM `watchlist` WHERE wl_namespace & 1 LIMIT 1 ’ from within function ‘MysqlUpdater::doWatchlistUpdate.’ Database returned error ‘1146: Table 'truesain_WSDATABASE.watchlist' doesn't exist (localhost)’ Backtrace:

  1. 0 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/db/Database.php(827): DatabaseBase->reportQueryError('Table 'truesain...', 1146, 'SELECT count(*...', 'MysqlUpdater::d...', false)
  2. 1 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/db/Database.php(1292): DatabaseBase->query('SELECT count(*...', 'MysqlUpdater::d...')
  3. 2 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/db/Database.php(1038): DatabaseBase->select('watchlist', 'count(*)', 'wl_namespace & ...', 'MysqlUpdater::d...', Array)
  4. 3 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/installer/MysqlUpdater.php(291): DatabaseBase->selectField('watchlist', 'count(*)', 'wl_namespace & ...', 'MysqlUpdater::d...')
  5. 4 [internal function]: MysqlUpdater->doWatchlistUpdate()
  6. 5 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/installer/DatabaseUpdater.php(233): call_user_func_array(Array, Array)
  7. 6 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/installer/DatabaseUpdater.php(197): DatabaseUpdater->runUpdates(Array, false)
  8. 7 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/installer/DatabaseInstaller.php(248): DatabaseUpdater->doUpdates()
  9. 8 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/installer/WebInstallerPage.php(513): DatabaseInstaller->doUpgrade()
  10. 9 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/includes/installer/WebInstaller.php(254): WebInstaller_Upgrade->execute()
  11. 10 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/mw-config/index.php(50): WebInstaller->execute(Array)
  12. 11 /home/truesain/public_html/wikisaints/mediawiki-1.18.4/mw-config/index.php(18): wfInstallerMain()
  13. 12 {main}

I've tried this with both 1.18 and 1.19 and the same thing happens, so I assume it is to do with the database (as the table doesn't exist) - not the version.

This error appears after I assign the database login and database name. It then says the tables need to be upgraded, then I get that error and can't continue.

Does anyone know how I might get a work-around? I'd really rather not lose the items in the database.

Would it be worth installing mediawiki with a blank database, then importing the old tables into the new database? Then hopefully like Jurassic Park, I should be able to fill in the 'holes?' 60.242.51.65 (talk) 02:11, 20 August 2012 (UTC)

watchlist is a very very old table, so it would be present in old versions of mediawiki. It sounds like your old db is only partially there.
>Would it be worth installing mediawiki with a blank database, then importing the old tables into the new database? Then hopefully like >Jurassic Park, I should be able to fill in the 'holes?'
Depends on the state of your old db. No garuntees that it will work, but there is a chance it could work (if your db is missing anything other than the watchlist table, its not a big chance). If you try that, run update.php after you are done.
Good luck, you're going to need it. Bawolff (talk) 20:06, 20 August 2012 (UTC)

How do I edit a user's signature?

How can I edit a user's signature for them? Banaticus (talk) 14:22, 20 August 2012 (UTC)

At the moment, you would need to modify the database. There are no maintenance scripts for changing an individual user's options, only for mass converting them. Bawolff (talk) 20:03, 20 August 2012 (UTC)
Do you need to "edit a user's signature for them" because they don't know how to create the syntax for the signature they want ? If so you can create it [for (them)] and post it on their talk page. Mlpearc (powwow) 15:25, 21 August 2012 (UTC)
Because the user edited their signature themselves to produce some terrible signature, then didn't know how to change it back. I fixed it by logging in as the user and changing it myself, but I would have preferred to simply be able to change the user's password. Banaticus (talk) 04:40, 6 September 2012 (UTC)

Encountering error creating extension

I have a test wiki at http://testwiki.net63.net/. I am attempting to create a new extension called PullThePlug, but while using the tutorial at Manual:Special Pages, I stumbled across this error:

PHP Error Message 

Fatal error: Class 'PullThePlug' not found in /home/a6801473/public_html/wiki/includes/SpecialPageFactory.php on line 326

I followed the tutorial almost exactly, substituting PullThePlug for MyExtension. I am putting my entire wiki up for download: https://www.dropbox.com/sh/m2sdzqf46228eo3/w0Km-9n4VB User:Iggyvolz, but you'll probably find me on Wikia 22:00, 20 August 2012 (UTC)

Update: Adding $wgOut->setPagetitle("Pull The Plug"); to extensions/PullThePlug/PullThePlug.php changes the error message to:
PHP Error Message 
Fatal error: Call to a member function setPagetitle() on a non-object in /home/a6801473/public_html/wiki/extensions/PullThePlug/PullThePlug.php on line 34
I updated the download. User:Iggyvolz, but you'll probably find me on Wikia 22:26, 20 August 2012 (UTC)
Problem solved (I think), I put
function randomFunction() {
        global $wgOut;
before the code and it got rid of the error message. User:Iggyvolz, but you'll probably find me on Wikia 00:12, 21 August 2012 (UTC)

Customized SideBar users to multiple groups

i found my problem 168.251.2.40 (talk) 18:36, 21 August 2012 (UTC)

How to get the section number?

Is it possible to get a number of section? Like numbers in the table of contents (TOC)?

For example, these sections:

== One ==
== Three ==
== Two ==

displays following TOC:

Contents [hide]
1 One
2 Three
3 Two

I would like to automatically get the number of section in the link by some Magic Word or something else, like this:

[[#One|{{SOMEMAGIC}}]], [[#Two|{{SOMEMAGIC}}]], [[#Three|{{SOMEMAGIC}}]]

should give the following output:

1, 3, 2

Best regards, Scottie33 (talk) 10:42, 22 August 2012 (UTC)

mailing error

Hi there,

I can't send e-mails from within Mediawiki in my installation. Frustrating is that I get only the line "Mail object returned error:" and not the error message itself. I use the extension ContactPage.

Here's a link to the phpinfo of the installation: http://www.agriwiki.nl/testphp/testphp.php

Any ideas? Thanks in advance for your help.

Justus

MediaWiki 1.19.1 PHP 5.3.2-1ubuntu4.17 (apache2handler) MySQL 5.1.63-0ubuntu0.10.04.1-log 82.95.213.41 (talk) 14:03, 22 August 2012 (UTC)

Error: 1054 - Update 1.9.1.

After updating from 1.8.* to 1.9.1. i got a error message in account registration - Error: 1054 Unknown column 'user_options' in 'field list' (localhost) I tried run maintenance/update.php and after that i get the error, not only from this page, but even if Forgotten password page. PHP 5.2.4-2ubuntu5.25 (apache2handler) MySQL 5.0.96-0ubuntu3 Please help with this error. 95.25.55.203 (talk) 15:44, 22 August 2012 (UTC)

Short URLs and default page addresses

When I migrate an existing MW wiki to a new virtual distributed server, the default page addresses change and I don't understand how to change them back.

According to the Manual:Short URL page:

MediaWiki's default page addresses looks like these examples:

   http://example.org/w/index.php/Page_title (recent versions of MediaWiki, without CGI support)
   http://example.org/w/index.php?title=Page_title (recent versions of MediaWiki, with CGI support) 


The first version is the one I've had in place and used for several years. I'm moving from a GoDaddy VDS running CentOS 5 and Plesk 9.5.3 to a GoDaddy VDS running CentOS 6 and Plesk 11. I have always had CGI support turned on for the web server. The same wiki on the newer server only recognizes the index.php?title= page names.

My MW is at 1.15. I am not yet able to upgrade it because of a different problem (MediaWiki_v1.19.1_installation:_Compilation_failed:_support_for_\P,_\p,_and_\X_has_not_been_compiled). Also, it seems safer to change one thing at a time....

I'm probably missing something obvious, but I don't know whether I should be looking to something in the httpd server configuration or the MW configuration to make the change.

Thanks for any help anyone can provide...

Michael Greis Mgreis (talk) 15:48, 22 August 2012 (UTC)

Interwiki redirects

Is is possible to create an interwiki redirect?

I would like to create a page called Imperium or Space Marine that would be a redirect to an article with that title on another wiki, so that all users have to do to link to those pages on other wikis is add [[Imperium]] or [[Space Marine]] on the local wiki page instead of having to add [[40k:Space Marine|Space Marine]]. Lieutenant Aleksandr Reznov 21:04, 22 August 2012 (UTC)

HiDPI support

I would like to suggest that support for HiDPI display modes (also known as Retina) be added to the MediaWiki interface. This would mean that double-sized images would need to be served to devices with HiDPI enabled (this includes e.g. the MacBook Pro with Retina display and the newest iPad, iPhone and iPod touch, and will presumably become more common in the very near future). On this site a method is described where javascript is used to determine the display mode and load hi-res images if appropriate. Perhaps this could also be implemented directly in the php code (creating and serving different pages based on device). Of course, on MediaWiki wikis there are both general interface images (everything from the site logo and background image to the little formatting icons above the edit box) and content images (images called in the article itself); the latter type probably needs to be handled somewhat differently. What do you think? Krun (talk) 22:56, 22 August 2012 (UTC)

To serve double sized images for content images, mediawiki will have to generate two thumbnails instead of one for every size used in articles. This could lead to an important increase of thumbnails space used, (between 2 and 5 times more, depending on maximum). Plyd (talk) 17:16, 9 December 2012 (UTC)
Almost two years passed since the original question, and today already tens of millions of devices have been shipped with HiDPI screens, and this trend will just continue. Support for hi-res images (especially equations) would be extremely useful for many people. 176.198.254.215 01:54, 1 June 2014 (UTC)
I thought Mediawiki added support for retina display in one of the version of Mediawiki. 86.155.238.203 07:44, 1 June 2014 (UTC)
...and further efforts are being made to keep MediaWiki on the cutting edge of computing technology. In just three days, the new and shiny MediaWiki 1.23 will be released, featuring amongst other great improvements new high definition images for your wiki.
I feel like I should have become a marketing writer... 88.130.82.244 11:50, 1 June 2014 (UTC)
https://bugzilla.wikimedia.org/show_bug.cgi?id=32101 lists fixed and still-to-fix issues with regard to HiDPI. AKlapper (WMF) (talk) 10:16, 2 June 2014 (UTC)

PostgreSQL and "LOCK IN SHARE MODE"

I am using MediaWiki 1.19.1; PHP 5.3.10-1ubuntu3.2 (apache2handler) and PostgreSQL 9.1.5.

After a while using the wiki an error showed up in one of our categories. Every-time we enter this one category we get the following error:

MediaWiki internal error.
 
  Original exception: exception 'DBQueryError' with message '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 COUNT(*) AS pages,COUNT( (CASE WHEN page_namespace=14 THEN 1 ELSE NULL END) ) AS subcats,COUNT( (CASE WHEN page_namespace=6 THEN 1 ELSE NULL END) ) AS files FROM "categorylinks","page" WHERE cl_to = 'Verfahrensanweisungen' AND (page_id = cl_from) LIMIT 1 LOCK IN SHARE MODE
  Function: Category::refreshCounts
  Error: 1 ERROR: syntax error at or near "LOCK"
  LINE 1: ...nsanweisungen' AND (page_id = cl_from) LIMIT 1 LOCK IN SH...
  ^
  ' in /var/www/mediawiki/includes/db/Database.php:918
  Stack trace:
  #0 /var/www/mediawiki/includes/db/Database.php(885): DatabaseBase->reportQueryError('ERROR: syntax ...', 1, 'SELECT COUNT(*...', 'Category::refre...', false)
  #1 /var/www/mediawiki/includes/db/Database.php(1358): DatabaseBase->query('SELECT COUNT(*...', 'Category::refre...')
  #2 /var/www/mediawiki/includes/db/Database.php(1445): DatabaseBase->select(Array, Array, Array, 'Category::refre...', Array, Array)
  #3 /var/www/mediawiki/includes/Category.php(289): DatabaseBase->selectRow(Array, Array, Array, 'Category::refre...', 'LOCK IN SHARE M...')
  #4 /var/www/mediawiki/includes/CategoryViewer.php(670): Category->refreshCounts()
  #5 /var/www/mediawiki/includes/CategoryViewer.php(379): CategoryViewer->getCountMessage(1, 2, 'article')
  #6 /var/www/mediawiki/includes/CategoryViewer.php(90): CategoryViewer->getPagesSection()
  #7 /var/www/mediawiki/includes/CategoryPage.php(97): CategoryViewer->getHTML()
  #8 /var/www/mediawiki/includes/CategoryPage.php(63): CategoryPage->closeShowCategory()
  #9 /var/www/mediawiki/includes/actions/ViewAction.php(40): CategoryPage->view()
  #10 /var/www/mediawiki/includes/Wiki.php(484): ViewAction->show()
  #11 /var/www/mediawiki/includes/Wiki.php(278): MediaWiki->performAction(Object(CategoryTreeCategoryPage))
  #12 /var/www/mediawiki/includes/Wiki.php(593): MediaWiki->performRequest()
  #13 /var/www/mediawiki/includes/Wiki.php(503): MediaWiki->main()
  #14 /var/www/mediawiki/index.php(58): MediaWiki->run()
  #15 {main}
 
  Exception caught inside exception handler: exception 'DBUnexpectedError' with message 'SQL error: ERROR: current transaction is aborted, commands ignored until end of transaction block' in /var/www/mediawiki/includes/db/DatabasePostgres.php:313
  Stack trace:
  #0 /var/www/mediawiki/includes/WatchedItem.php(45): DatabasePostgres->numRows(false)
  #1 /var/www/mediawiki/includes/User.php(2581): WatchedItem->isWatched()
  #2 /var/www/mediawiki/includes/Title.php(1514): User->isWatched(Object(Title))
  #3 /var/www/mediawiki/includes/SkinTemplate.php(971): Title->userIsWatching()
  #4 /var/www/mediawiki/includes/SkinTemplate.php(455): SkinTemplate->buildContentNavigationUrls()
  #5 /var/www/mediawiki/includes/OutputPage.php(1982): SkinTemplate->outputPage()
  #6 /var/www/mediawiki/includes/Exception.php(182): OutputPage->output()
  #7 /var/www/mediawiki/includes/Exception.php(209): MWException->reportHTML()
  #8 /var/www/mediawiki/includes/Exception.php(490): MWException->report()
  #9 /var/www/mediawiki/includes/Exception.php(569): MWExceptionHandler::report(Object(DBQueryError))
  #10 /var/www/mediawiki/includes/Wiki.php(506): MWExceptionHandler::handle(Object(DBQueryError))
  #11 /var/www/mediawiki/index.php(58): MediaWiki->run()
  #12 {main}

I had a quick look in the code and the postgresql documentation: It seems that the postgresql doesn't support the "LOCK IN SHARE MODE" feature the way, MySQL does. 84.58.40.22 (talk) 13:00, 23 August 2012 (UTC)

I can confirm that. Using current mediawiki 1.19.1 version and postgresql 8.3. Using a category with pages and files. In some categories it still works. Others are broken.
MediaWiki internal error.
Original exception: exception 'DBQueryError' with message '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 COUNT(*) AS pages,COUNT( (CASE WHEN page_namespace=14 THEN 1 ELSE NULL END) ) AS subcats,COUNT( (CASE WHEN page_namespace=6 THEN 1 ELSE NULL END) ) AS files FROM "categorylinks","page" WHERE cl_to = 'Java_EE' AND (page_id = cl_from) LIMIT 1 LOCK IN SHARE MODE
Function: Category::refreshCounts
Error: 1 FEHLER: Syntaxfehler bei »LOCK«
LINE 1: ...to = 'Java_EE' AND (page_id = cl_from) LIMIT 1 LOCK IN SH...
^
' in /var/www/mediawiki-1.19.1/includes/db/Database.php:918
Stack trace:
#0 /var/www/mediawiki-1.19.1/includes/db/Database.php(885): DatabaseBase->reportQueryError('FEHLER: Syntax...', 1, 'SELECT COUNT(*...', 'Category::refre...', false)
#1 /var/www/mediawiki-1.19.1/includes/db/Database.php(1358): DatabaseBase->query('SELECT COUNT(*...', 'Category::refre...')
#2 /var/www/mediawiki-1.19.1/includes/db/Database.php(1445): DatabaseBase->select(Array, Array, Array, 'Category::refre...', Array, Array)
#3 /var/www/mediawiki-1.19.1/includes/Category.php(289): DatabaseBase->selectRow(Array, Array, Array, 'Category::refre...', 'LOCK IN SHARE M...')
#4 /var/www/mediawiki-1.19.1/includes/CategoryViewer.php(670): Category->refreshCounts()
#5 /var/www/mediawiki-1.19.1/includes/CategoryViewer.php(401): CategoryViewer->getCountMessage(3, '5', 'file')
#6 /var/www/mediawiki-1.19.1/includes/CategoryViewer.php(91): CategoryViewer->getImageSection()
#7 /var/www/mediawiki-1.19.1/includes/CategoryPage.php(97): CategoryViewer->getHTML()
#8 /var/www/mediawiki-1.19.1/includes/CategoryPage.php(63): CategoryPage->closeShowCategory()
#9 /var/www/mediawiki-1.19.1/includes/actions/ViewAction.php(40): CategoryPage->view()
#10 /var/www/mediawiki-1.19.1/includes/Wiki.php(484): ViewAction->show()
#11 /var/www/mediawiki-1.19.1/includes/Wiki.php(278): MediaWiki->performAction(Object(CategoryPage))
#12 /var/www/mediawiki-1.19.1/includes/Wiki.php(593): MediaWiki->performRequest()
#13 /var/www/mediawiki-1.19.1/includes/Wiki.php(503): MediaWiki->main()
#14 /var/www/mediawiki-1.19.1/index.php(58): MediaWiki->run()
#15 {main}
217.91.108.102 06:29, 24 August 2012 (UTC)
Check out this bug: Bug 39635 - PostgreSQL LOCK IN SHARE MODE option is a syntax error.
As the error message suggests "LOCK IN SHARE MODE" is not valid PostgreSQL syntax. 95.97.135.60 12:26, 16 October 2012 (UTC)

How to prevent user from reading wiki, if emailadres is not yet confirmed?

Hello,

After registration a user can view and edit everything on the mediawiki-site, even if his/her emailadres is not yet confirmed. Is there any solution build into MediaWiki to prevent a registred-but-not-email-confirmed user from even viewing the content of the site?

Thanks in advance!!

Maarten 213.125.155.202 (talk) 13:08, 23 August 2012 (UTC)

How you guys handle duplicate images?

Especially those re-sized thumb images.
Now the only thing we can do is use eyes to compare it.
Does anyone have better solution? Deletedaccount4567435 (talk) 16:48, 23 August 2012 (UTC)
Can you run fdupes from the command line? In Ubuntu (or other unix based OS) type the following.
man fdupes
You may be able to install it using the following command.
sudo apt-get install fdupes
Note that I strongly recommend that you do not use this for deletion. Allen4names (talk) 04:40, 24 August 2012 (UTC)
Wow, thank you! Zoglun (talk) 19:23, 31 August 2012 (UTC)
Special:FileDuplicateSearch may also be useful. (I'm surprised there isn't a special page for listing all files with (local) duplicates. All the info is already in the database). Bawolff (talk) 04:05, 1 September 2012 (UTC)
Idk how it was 10 years ago, but the page exists and it is Special:ListDuplicatedFiles
Better late than never lol 2800:810:542:A1DA:D94F:27D7:7983:4A01 (talk) 13:28, 24 August 2022 (UTC)

How can I make titles like wikibooks

Hi, I am making something like wikibooks on my site and I would make my titles like them here: http://fr.wikibooks.org/wiki/Programmation_C/Bases_du_langage

Programmation C/Bases du langage is replaced by Programmation C Bases du langage the slash was removed and programmation is linked to parent page I hope also that the title in the browser (and google) would be 'Bases du langage' only if this is possible? 41.108.1.97 (talk) 23:26, 23 August 2012 (UTC)

I didn't got my title displayed like theme
I just got
Page/Sub_page
< Page
when I added
  1. Enable subpages in the main namespace
$wgNamespacesWithSubpages[NS_MAIN] = true;
  1. Enable subpages in the template namespace
$wgNamespacesWithSubpages[NS_TEMPLATE] = true; Drhoussem (talk) 22:03, 24 August 2012 (UTC)
See if you can find anything at b:fr:MediaWiki:common.js or b:fr:MediaWiki:common.css. I don't read French but I can see from the HTML source code that it is most likely a javascript hack with or without CSS. Allen4names (talk) 05:13, 25 August 2012 (UTC)
I found here:
http://fr.wikibooks.org/wiki/Sp%C3%A9cial:Gadgets
that Gadget-CommonDom.js, Gadget-TitreHierarchique.js are doing the job! the question now, how can I use them? Drhoussem (talk) 17:45, 25 August 2012 (UTC)
Extension:Gadgets is installed there so I would use that. Allen4names (talk) 15:09, 26 August 2012 (UTC)
I imported the gadget to my wiki and it didn't work, i delated the cache and tried other browsers and it didn't work and whene I browsed the code I could see:
</<script src="/mw/index.php?title=MediaWiki:Gadget-CommonDom.js&amp;action=raw&amp;ctype=text/javascript&amp;120"></script>
<script src="/mw/index.php?title=MediaWiki:Gadget-TitreHierarchique.js&amp;action=raw&amp;ctype=text/javascript&amp;122"></script>pre>
Drhoussem (talk) 17:03, 28 August 2012 (UTC)
I don't see it here so you may need to file a bug report. Allen4names (talk) 03:19, 29 August 2012 (UTC)

Wriging C code in a wiki

How do I ass C, Python or any other type of source code into my wiki pages? I tried code type="C" but that didn't quite work. Are there some examples out there? 85.187.128.21 (talk) 07:02, 24 August 2012 (UTC)

By default ‎<pre>...‎</pre> is available for wiki pages:

Like this

If you install Extension:SyntaxHighlight GeSHi (like Wikipedia.org and MediaWiki.org do), then you can use ‎<syntaxhighlight>...‎</syntaxhighlight>, like this:

<syntaxhighlight lang="javascript">
function foo(a, b, c) {
    return a + b + c;
}
</syntaxhighlight>

Which renders with preserved whitespace in a monospace font, and with syntax highlighting:

function foo(a, b, c) {
    return a + b + c;
}

Krinkle (talk) 23:01, 27 August 2012 (UTC)

Updateing old MediaWiki fails on DBUpdate Fatal error: Class 'MysqlUpdater'

Hello,

i am updateing from a old mediawiki installation: 1.9.3 to the current 1.19.

I am encountering this problem upon the database upgrade portion. I see an animated progess circle and a texbox way below with the following information:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
	<head>
		<title>MediaWiki VERSION</title>
		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
		<style type='text/css' media='screen'>
			html, body {
				color: #000;
				background-color: #fff;
				font-family: sans-serif;
				text-align: center;
			}

			h1 {
				font-size: 150%;
			}
		</style>
	</head>
	<body>
		<img src="/mw-config/skins/common/images/mediawiki.png" alt='The MediaWiki logo' />

		<h1>MediaWiki VERSION</h1>
		<div class='error'>
		<p>LocalSettings.php not found.</p>
		<p>
		Please <a href="/mw-config/mw-config/index.php"> complete the installation</a> and download LocalSettings.php.		</p>

		</div>
	</body>
</html>

 Fatal error: Class 'MysqlUpdater' not found in /home/milf/www/htdocs/includes/installer/DatabaseUpdater.php on line 120

I am running on RHEL 6 , [root@vmh-aibll htdocs]# rpm -qa |grep mysql mysql-server-5.1.61-4.el6.x86_64 php-mysql-5.3.3-14.el6_3.x86_64 mysql-libs-5.1.61-4.el6.x86_64 mysql-5.1.61-4.el6.x86_64 php-common-5.3.3-14.el6_3.x86_64 php-cli-5.3.3-14.el6_3.x86_64 php-xml-5.3.3-14.el6_3.x86_64 php-mysql-5.3.3-14.el6_3.x86_64 php-soap-5.3.3-14.el6_3.x86_64 php-pear-1.9.4-4.el6.noarch php-pdo-5.3.3-14.el6_3.x86_64 php-5.3.3-14.el6_3.x86_64 php-gd-5.3.3-14.el6_3.x86_64 php-pecl-apc-3.1.9-2.el6.x86_64


help will be appreciated 85.25.52.227 (talk) 10:52, 24 August 2012 (UTC)

Hi folks,
i am still seeking on help for this problem
cheers 85.25.52.227 08:01, 7 September 2012 (UTC)
> Class 'MysqlUpdater' not found in includes/installer/DatabaseUpdater.php on line 120
Are you sure you have copied all files of the new MediaWiki version into that installation? Also make sure that no old files are left. I once had a similar problem and I figured out that it was some profiling code, which I had used since ages, but that was no longer compatible with the new version.
Do you use a PHP code cache (like eAccelerator) on the server? If so, try emptying its cache. 88.130.104.230 13:57, 7 September 2012 (UTC)

All images missing my new instance of Mediawiki

I upgraded to Mediawiki 1.19 on my laptop and it works quite welll. Then I moved everything over to our new QA server but ALL of the images (except the logo) will not show up. I get the following messages where images should be:

Error: image is invalid or non-existent

I can look at our current production wiki and see the path to the images that is created when a page is rendered. Because of the error message, there is no path to trouble shoot. My guess is that this instance of the wiki is not creating the path to image correctly and therefore not finding it. Is there anyway to debug how this path is created when the page is created? I tried $wgIgnoreImageErrors=true but it didn't have any effect.

The images are in the same location on both the production and QA servers. I've checked and rechecked and side-by-side compared the httpd.conf, LocalSettings.ini files and still nothing is jumping out as an obvious issue. This new vervion of Mediawiki is working on my laptop. I simply moved it over to a new server and changed the configs so that the drive letters and directory structures were identical to our prod server.

Any ideas would be appreciated.

Tim

Mediawiki 1.19 Apache 2.2.11 PHP 5.3.9-2 MySQL 5.1.36 WAMP 2.0 Windows Server 2008 R2 (our production server is Server 2003 and my laptop is Windows 7) Konjurer (talk) 16:10, 24 August 2012 (UTC)

Hey Konjurer, please check $wgUploadDirectory, uploads are possible, it can not be uploaded pictures, then it may be due to this value, otherwise the value $wgDBmysql5 is on, if so disable it, i've tried it once a long time ago, but it was soon clear to me, that it can't work. Abani79 (talk) 00:29, 26 August 2012 (UTC)
Thanks Abani. I fixed the issue by reimporting the Mediawiki database again and running the upgrade.php script. After the reload, the images showed up just fine. My theory is that the the hash values that determine the where to store each image got messed up during the import process. Therefore, internally, Mediawiki was generating the wrong path to the files. It was impossible to tell what path Mediawiki was generating because it wrote only an error message to the screen. Konjurer (talk) 15:02, 27 August 2012 (UTC)

LocalSettings.php cannot be downloaded

I am trying to get my localsettings.php file but I am not able to locate it. I am using Godaddy and they installed in. can anyone point me to the path directory and file that it resides? I am trying to customize my mediawiki. chapmoore.com/howiki is the site much thanks in advance 71.75.208.20 (talk) 17:40, 24 August 2012 (UTC)

Hi you should have a look at the same named page, there's a huge lot of stuff about this file and the content you can put in. I hope it help you. Abani79 (talk) 00:21, 26 August 2012 (UTC)
What web server and OS are you using? If it is Apache on Linux you should be able to find the config files at /etc/apache. Look for lines that start with Alias if you do. Allen4names (talk) 15:03, 26 August 2012 (UTC)
If you had GoDaddy do the install, it will be in the installation directory you specified when installed. You can edit it on the server using the FTP File Manager on your Control Panel. -- Dcshank (talk) 04:07, 31 August 2012 (UTC)

Newbie / Duplicate Post as i was not logged in thanks

I am trying to get my localsettings.php file but I am not able to locate it. I am using Godaddy and they installed in. can anyone point me to the path directory and file that it resides? I am trying to customize my mediawiki. chapmoore.com/howiki is the site much thanks in advance Chapmoore (talk) 17:41, 24 August 2012 (UTC)

G'day, try checking the howiki folder for the LocalSettings.php file. Fereal (talk) 18:27, 24 August 2012 (UTC)
Thanks I just found it now i am trying to open it and edit Thanks Chapmoore (talk) 19:39, 24 August 2012 (UTC)

Formatting the Wiki Correctly on an IPAD

My newly installed wiki looks fine on a PC browser. But on the IPAD the formatting is lost. Nothing is right justified and all the text just lines up on the left. No frames either. It looks quite ugly. There is no skin present.

It's on 1.19.

I am using the vector skin. I've tried other skins but that is no help.

Wikipedia is able to format the screen nicely.

Can someone point me in the right direction? 24.38.246.73 (talk) 00:39, 25 August 2012 (UTC)

Change Article Title - Different from html link name

I have some situations, right now, that will incur a link being one text name but the title will need to be something different.

In respect, here is an example: article name: NW_CLOTH001 article title: Warder's Cloth

So ideally, the browser would look like: http://domain.com/wiki/NW_CLOTH001 While the article when viewed would have: Warder's Cloth Goldbishop (talk) 12:41, 26 August 2012 (UTC)

Add a new language?

This may be impossible, but coding may help. Is there anything to do to add a language that isn't built into MediaWiki? For example, what would I do if I had a wiki farm with several languages (Spanish, English, French, German, etc.) and I wanted to add Pig Latin as a joke language? Do I have to go through changing the interface messages one-by-one on the wiki, or can I add a PHP file in the languages folder to predefine them all? And the most important, how can I get a link to the Pig Latin wiki on the sidebar of the other wikis under the "languages" section? I know almost nothing about coding, but I was just wondering. 108.231.77.32 (talk) 19:15, 26 August 2012 (UTC)

PDF File uploads never update

This problem just started a few days ago.

  1. I upload a new version of a PDF file.
  2. I never finished installing the PDF Ghost script, but been working for 6 months just fine, just doesn't look wonderful.
  3. The latest file version is always an old version.
  4. Any old file version is always the new version.
  5. I have deleted all versions. Upload a new version, and still I get one of the deleted versions.
  6. Making me crazy.
  7. I can't get any work done.

url = http://carmendrew.com/doppler/index.php?title=Main_Page

It's currently a resisted site, but I will make a user "Tommy" with PW "abc123"

MediaWiki 1.18.1
PHP 5.2.17 (cgi-fcgi)
MySQL 5.0.92-log

Thanks for any help. Dcshank (talk) 20:59, 26 August 2012 (UTC)

And then I said to myself, "Self, if some stupid idiot moved the wiki to a sister directory, could that cause this problem?" -- Dcshank (talk) 23:28, 26 August 2012 (UTC)
I renamed the directory back to what it was. The problem went away for a few days, but now has returned. -- Dcshank (talk) 20:17, 30 August 2012 (UTC)
I guess I will get out my PHP books. __ Dcshank (talk) 13:38, 4 September 2012 (UTC)

Prevent logo image from scaling

I noticed that the quality of the logo image on our company wiki was nasty. I created a new logo image and realized that the logo image is getting scaled. After reading several posts about logo size, I've haven't seen any that really address where scaling could be happening and how to prevent it. I tried a small logos and larger logo images so image size didn't matter - scaling always is occuring. I also tried something like this in the common.css but it had no effect on the scaling.

<pre>#p-logo {
        height: 135px;
        width: 135px;
}
</pre>

Any ideas would be appreciated!

Tim Mediawiki 1.19 Apache 2.2.11 PHP 5.2.9-2 MySQL 5.5.24 Konjurer (talk) 14:52, 27 August 2012 (UTC)

Tunred out not to be a Mediawiki issue. Internet Explorer was in "zoom" mode. Pressing ctrl+0 solved the issue.
Tim Konjurer (talk) 15:05, 29 August 2012 (UTC)

Formatting article titles

I am trying to make the titles of some pages italic. I infer that on my wiki $wgAllowDisplayTitle is on and $wgRestrictDisplayTitle is off because DISPLAYTITLE allows me to make titles start with a lower-case letter, but won't allow random extra letters. I thought that DISPLAYTITLE would allow formatting in this circumstance, but it does not (neither through apostrophes nor html tags). How can I allow formatting of titles without allowing non-canon titles, the way that Wikipedia now does? If it's relivant, I'm using the Gumax skin. Thank you. Arctic.gnome (talk) 20:09, 27 August 2012 (UTC)

Acr122u210 Lsnfc Error: no device found

Hi i have problem with card reader Acr122u210 My specyfications: Fedora 17, installed all packs drivers (rpm) pcsc-lite-ccid-1.4.6-1, Libnfc 1.4.2-2, libnf devel 1.4.2-2, libnfc examples 1.4.2-2, libudev 182-3, libudev devel 182-3, libusb 1.0.9-0.6, libusb devel 1.0.9, pcsc ccid libs 1.8.3-1, pcsc lite devel, pcsc lite 1.8.3-1, pcsc lite acsccid, pcsc tools 1.4.17-3, and oryginal drivers from acs.com.hk acsccid 1.0.2-1 When i open terminal and write pcscd_scan have this: PC/SC device scanner V 1.4.17 (c) 2001-2009, Ludovic Rousseau Compiled with PC/SC lite version: 1.7.4 Scanning present readers... 0: ACS ACR122U 00 00 Sun Aug 26 20:24:42 2012 Reader 0: ACS ACR122U 00 00 Card state: Card inserted, ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A + TS = 3B --> Direct Convention + T0 = 8F, Y(1): 1000, K: 15 (historical bytes) TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0


TD(2) = 01 --> Y(i+1) = 0000, Protocol T = 1


+ Historical bytes: 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 Category indicator byte: 80 (compact TLV data object) Tag: 4, len: F (initial access data) Initial access data: 0C A0 00 00 03 06 03 00 01 00 00 00 00 + TCK = 6A (correct checksum) Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A 3B 8F 80 01 80 4F 0C A0 00 00 03 06 .. 00 01 00 00 00 00 .. Mifare Standard 1K (as per PCSC std part3) 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 .. .. 00 00 00 00 .. RFID - ISO 14443 Type A Part 3 (as per PCSC std part3) 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A Philips MIFARE Standard (1 Kbytes EEPROM) RFID - ISO 14443 Type A - Transport for London Oyster ACOS5/1k Mirfare RFID - ISO 14443 Type A - NXP Mifare card with 1k EEPROM Sun Aug 26 20:24:45 2012 Reader 0: ACS ACR122U 00 00 Card state: Card removed,

When write nfc-list: [root@error ~]# nfc-list nfc-list use libnfc 1.4.2 (r891) Connected to NFC device: ACS ACR122U 00 00 / ACR122U210 - PN532 v1.6 (0x07) 1 ISO14443A passive target(s) was found: ATQA (SENS_RES): 00 04 UID (NFCID1): 8e 46 02 c4 SAK (SEL_RES): 08


When i write command pcscd nothing happen, and terminal send me to new line: [root@error ~]# pcscd [root@error ~]#


When write : lsnfc [root@error ~]# lsnfc ERROR: No device found.

When i plug fresh thia device and write 'sudo pcscd' then acr122u are started but in comand line is nothing new command line 89.73.7.240 (talk) 22:17, 27 August 2012 (UTC)

Hi!
If I understand you correctly, you have a problem with a card reader, e.g. one like this one: [3]
I am sorry to tell you, but on this website you won't get the help you are looking for. This website is about MediaWiki, a software, with which you can run a wiki on a webserver. People here don't have a clue about card readers. ;-) Maybe you find help in a Linux forum on hardware questions? 88.130.105.32 00:42, 28 August 2012 (UTC)

Languages

How can I put my wiki in different languages? Maybe with wiki-family? How does it work? Thanks! Prova3 (talk) 11:32, 28 August 2012 (UTC)

Have you seen Manual:Wiki family? Mormegil (talk) 12:19, 3 September 2012 (UTC)
I didn't see this. Thanks for your help. 84.88.59.1 13:49, 9 September 2012 (UTC)

Setting up wgConf

I'm writing a tutorial for people to easily set up a small wiki farm with config similar to Wikimedia, to be able to test their codes, etc. The explanation on Manual:$wgConf about how wgConf needs to be setup is very limited. Please help me complete User:Huji/Wikimedia clone. Thanks! Huji (talk) 18:28, 28 August 2012 (UTC)

I just documented the way I've set up my wgConf. When I go to Special:MergeAccount on the wikis, I get fatal exception of type MWException. I haven't narrowed down the problem. Any input is appreciated. Huji (talk) 21:15, 28 August 2012 (UTC)

I just got banned for "gibberish/nonsense"

WTF. I just saw I was banned permanently for 'gibberish/nonsense.' Nothing that I have ever put on here is either gibberish or nonsense. Why Jeff? This makes no sense at all. 207.131.200.26 (talk) 19:31, 28 August 2012 (UTC)

English into Dutch.

Can't find LocalSettings.php on the server.

Hello, i just made an dutch Mario Wiki. But the things are in English, like edit and delete etc. i know i can change it in my preferences. But how do i change whole the wiki in dutch? Instead of edit, bewerken. supermariowiki.thegamewiki.com/wiki/Hoofdpagina 81.82.121.72 (talk) 20:09, 28 August 2012 (UTC)

Set $wgLanguageCode = 'nl'; in LocalSettings.php 00:01, 29 August 2012 (UTC)
I think you mean in the preferences. But i want that everyone sees it in dutch, even if they aren't logged in. But if you don't mean it in the preferences, send me a link of the page. 81.82.121.72 18:16, 29 August 2012 (UTC)
No, this is not a user preference; this is a site configuration setting. To set it, you need to edit your "LocalSettings.php" file for the wiki (it will be in the root directory of the MediaWiki install). Jdforrester (WMF) (talk) 18:33, 29 August 2012 (UTC)
I just made the wiki and there is written, Powered by MediaWiki. Do i have to install it still? 81.82.121.72 18:51, 29 August 2012 (UTC)
Do you have shell access to the server on which the wiki is installed? If so, you need to connect to the server's shell, go to where MediaWiki is installed, and edit the file 'LocalSettings.php' to add $wgLanguageCode = 'nl'; to it.
If you do not have shell access, do you have file access (e.g. through FTP)? If so, connect to the server's files, go to where MediaWiki is installed, download the file 'LocalSettings.php', edit it locally to add $wgLanguageCode = 'nl'; to it, and re-upload it to the server.
If you do not have shell or file access, I'm afraid that it is not possible to change how the wiki is configured like this, sorry. Jdforrester (WMF) (talk) 18:57, 29 August 2012 (UTC)
I don't know where that is, the MDW installed thing. I do have a MDW:Sidebar and Sidebar-logo and Sidebarnotice. Can you search it for me? supermariowiki.thegamewiki.com/wiki/Hoofdpagina 81.82.121.72 18:59, 29 August 2012 (UTC)
You can't get to this from the web. You'll have to use a shell or FTP to find the LocalSettings.php file and change it. Catrope (talk) 19:19, 29 August 2012 (UTC)
Do i still have to download MediaWiki? 81.82.121.72 11:27, 30 August 2012 (UTC)
If you've already installed MediaWiki, you don't have to download it again. Assuming you have an existing MediaWiki installation, all you have to do is find its LocalSettings.php file and add one line to it. Catrope (talk) 17:52, 30 August 2012 (UTC)
Ok, but where do you find it usually? 81.82.121.72 18:16, 30 August 2012 (UTC)
In the directory where you installed MediaWiki, in the same directory as index.php and api.php Catrope (talk) 21:04, 30 August 2012 (UTC)
I didin't install it... 81.82.121.72 21:12, 30 August 2012 (UTC)
Ah, OK. In that case, look around in your public_html directory or whatever it's called, and try to find the MediaWiki files. Catrope (talk) 21:24, 30 August 2012 (UTC)
Uhmm... can you try to find it. 81.82.121.72 21:47, 30 August 2012 (UTC)
I don't have FTP access to your server, and it's not possible to find it via the web. Catrope (talk) 21:50, 30 August 2012 (UTC)
Can you say it then, i'll do it. 81.82.121.72 18:12, 31 August 2012 (UTC)
I can't tell you what to do beyond what I've already told you, because I can't magically look at your server's filesystem. You'll have to FTP into your server and browse around to find LocalSettings.php (or other files related to MediaWiki). Catrope (talk) 18:17, 31 August 2012 (UTC)
I don't know what that is, it's Chinese for me. 81.82.121.72 18:19, 7 September 2012 (UTC)
Why don't you use MyWikis, they can help you. http://www.mywikis.com Grapetheratclerk 13:51, 13 October 2013 (UTC)

Problems upgrading to Mediawiki 1.19.1

Hi there

Have encountered problems upgrading mediawiki. I have been using version 1.15.1 and have just tried to upgrade to 1.19.1. It's hosted on a cPanel account running mySQL 5.0.95-community and php 5.2.10. Basically, I have : 1. Backed up the database. 2. Copied all image files, extensions and local setting files. 3. Unpacked the tar file. 4. Copied and overwritten the extracted files into the old wiki folder. 5. When trying to run http://simon-jones.staff.shef.ac.uk/wiki/mw-config/index.php, I get the error Fatal error: Cannot redeclare wfprofilein() (previously declared in /webusers/ch1sj/public_html/wiki/includes/profiler/Profiler.php:14) in /webusers/ch1sj/public_html/wiki/includes/ProfilerStub.php on line 24 6. Looking on the web, there are several reccomendations to rename StartProfiler.php to StartProfiler.old.php. 7. Having done this, I now get the message Fatal error: Class 'Language' not found in /webusers/ch1sj/public_html/wiki/includes/Setup.php on line 473

Now I'm stuck. Any help gratefully appreciated. SJ Chiralchemist (talk) 09:24, 29 August 2012 (UTC)

Have now sorted this out - what a basic (embarassing )error!! When unpacking the tar file, make sure you have enough spare disk space. Not all of the files unpacked, which is where the problem came! Chiralchemist (talk) 12:01, 29 August 2012 (UTC)
hi, great to hear you were able to migrate easily. i have the same task planned in couple weeks or so. we are running with 1.15.1 and wanna move to 1.19.1. what are the preparatory work i must do before starting to deploy(untar) the 1.19.1 on top of it? how about the mysql version differences ? do we have scripts to make the db schema changes to the database as well or it has to be manually done? how did u handle it at your site ? can you just brief me so that it will be much easier for me to sail through without any errors ? thanks a lot for your help. 122.178.254.20 05:50, 2 September 2012 (UTC)

ParserFunctions installation issue - Windows / IIS7

Mediawiki 1.19.1 PHP 5.4.5 MySQL 5.5.27 IIS 7.5

I am having issues installing ParserFunctions extensions. As soon as the extension is added to LocalSettings navigating to the wiki will result in the following error:

PHP Warning: fopen(C:\inetpub\wwwroot\mediawiki/cache/l10n_cache-en.cdb.tmp.1011707164): failed to open stream: Permission denied in C:\inetpub\wwwroot\mediawiki\includes\Cdb_PHP.php on line 278 

I've noticed that the fopen path contains a mixture of back and forward slashes. If this is the issue, how do i change this??! I've also given \cache write permissions in case this was the issue.

Any ideas??

Dom 82.16.27.28 (talk) 13:36, 29 August 2012 (UTC)

Fixed it!
You need to ensure the filecache has been enabled:
Localsettings.php requires:
$wgUseFileCache = true; /* default: false */
$wgFileCacheDirectory = "$IP/cache";
$wgShowIPinHeader = false; 82.16.27.28 11:31, 30 August 2012 (UTC)
Note (for other onlookers) - This is unrelated to ParserFunctions - Basically $wgFileCacheDirectory has to point to the right place for the i18n cache to work (Assuming storing i18n cache in files is enabled. I do not believe it is by default) . The error probably occurred when installing parser functions as that causes all existing caches to be cleared. Bawolff (talk) 04:20, 1 September 2012 (UTC)

Google spreadhseets' ImportXML not allowed. Is Google's user-agent blacklisted?

I am trying to use Google Spreadsheets' ImportXML function to parse some Wikimedia data, but I get the

"Scripts should use an informative User-Agent string with contact information, or they may be IP-blocked without notice." error

- referring to Wikimedia's User-agent policy (see screenshot)

Is there a way to make Google Spreadsheets play nice with Wikimedia? Pax.mtx (talk) 23:37, 29 August 2012 (UTC)

This seems to be returned when no user agent is given. It's obviously deliberate and won't be turned off (Although, maybe an exception for Google's servers could be obtained? Still, getting them to give a user agent is a better idea), so you'll have to contact Google and ask them to fix this. Krenair (talkcontribs) 00:14, 30 August 2012 (UTC)

Problem with Openstreetmap on Page

Hi everyone,

first the typical requirements ;-) :

Wikipage: http://info.ici-paris.de/ahlenwiki

MediaWiki 1.19.1

PHP 5.2.17 (cgi-fcgi)

MySQL 5.0.91-log


I use Openstreetmap-Maps in my Wiki. I reactivated my Wiki page after one year and now the maps are shifted to the right (See: [4]

I don't see the mistake. I overlooked the css and scripts but can't find it. Maybe someone of you can have look and tell me my mistake?

Thanks in advance,

Markus 95.222.76.225 (talk) 08:28, 30 August 2012 (UTC)

Creating maincategories with subcategories in different namespaces and referencing them; or how to use same subcategory names in different maincategories

Hi,

hopefully this is the right place to ask my question... Sorry, if not!


I'm setting up a private Wiki in my Intranet using MediaWiki 1.19.1 and I have a question concerning categories and namespaces.


My Wiki is used as a knowledgebase for all the stuff I'm interested in, as a host for my private projects and to organize several things. The structure I would like to use will be something like:

Knowledgebase (Namespace) Projects (Namespace) Organize (Namespace)
  • Computer
    • Hardware
      • ...
    • Software
      • Coding
        • Building an AVR32-GCC-Toolchain
      • ...
  • Cooking
    • Recipes
    • --
  • ...
  • uController
    • AVR32 Evaluation Board
      • Hardware
        • ...
      • Software
        • ...
    • Battery charger
      • Hardware
        • ...
      • Software
        • ...
    • ....
  • Tasks
  • ...

I created 3 Namespaces in the LocalSettings.php:

$wgMetaNamespace = "Knowledgebase";
$wgExtraNamespaces =
  array(201 => "Projects",
        202 => "Organize");


I'm not really sure how to create categories in different namespaces, pointing my Browser to:

http://192.168.1.234/wiki/index.php?title=Projects:Category:uController

or:

http://192.168.1.234/wiki/index.php?title=Category:Projects:uController

doesn't produce the desired result.

And I'm also unsure how to reference and embed the created categories, will something like [[Projects:Category:uController]] or [[Category:Projects:uController]] work?


I would be very glad if someone could point me into the right direction how to achieve my goals, maybe I misunderstand something essential of the mediawiki system...

After all, is it possible to have categories with same names?

Do you have any suggestions regarding the structure of my Wiki?


Best regards Froyo Froyofloyd (talk) 14:59, 30 August 2012 (UTC)

Categories are a namespace on to themselves. You cannot create other category namespaces, there is only one category namespace. You can do things like [[Category:Projects:uController]] and have it be in a category, but that category is still considered part of the category namespace, not part of the Projects namespace. (Note the concept of a namespace in MediaWiki is a bit different from that of namespaces in programming languages, if that's what you're thinking)
Additionally all namespaces should come in pairs of a subject namespace, and a "talk" namespace (with the talk namespace being odd). So if you make a namespace (say number 200) named Projects you have to make another one numbered 201 named Projects talk. (Note, Project (in the singular) is a reserved namespace name in MediaWiki that points to the meta namespace). Bawolff (talk) 04:15, 1 September 2012 (UTC)

ReUpload-Text

Hello guys,

In onlyifuploading.js you can define with wpUploadDescription what default text should be shown in the file discribtion inputbox. I'm wondering if there is a possibility to seperate reuploads, so that if you re-upload a file, the defined text isn't shown in the inputbox. It only should be shown when you upload a new file and not if you re-upload an existing file.

Can you help me and tell me how to manage that?

Sorry for my eventually bad english... --Col. sheppard Col. sheppard (talk) 15:21, 30 August 2012 (UTC)

Huge mysql binlog file generated on tons of insert into l10n_cache table

Hi,

MediaWiki Version : 1.16.2 (r81865), PHP : 5.2.16 , Mysql: 5.0.77

The mysql bin log files report says that there are tons of insert into l10n_cache table. I have got no clue why is it happening. Due to this heavy insert every 30 mins, 1 GB of binlog file is getting created. Due to this I run into space problem. Till now the temporary solution is to delete the bin log files manually but want to get rid of it as it is problematic.

Thinking of making 'manualRecache' to true in $wgLocalisationCacheConf setting defined in includes/DefaultSettings.php as we don't need localisation.

Please guide in this regard.

Your help would be much appreciate.

Thanks & Regards, Mike Wikiblogger~mediawikiwiki (talk) 07:40, 31 August 2012 (UTC)

Any pointers in this regard would be appreciated. Wikiblogger (talk) 12:09, 31 August 2012 (UTC)
I don't really know why caching does not work correctly. Maybe there is some dynamic content, which is cached, so that cached entries are not re-useable?
From the MySQL side you can disable bin log; it is only necessary if you do replication.
If you want to keep binary logging activated, you can limit the size of the log by setting the MySQL config option max_binlog_size to a value that fits your needs; e.g. 100 MB or even 50 MB. The log will then be removed much more often, it will be smaller and it doesn’t take that long to remove it. 88.130.100.179 18:20, 31 August 2012 (UTC)
Do NOT disable binary log on a production server. It's not only needed for replication, but for recovering the entire database to a point of time. One would normally do periodic backups of the database, but if the database crashes and you need to recover it, even with backups, modifications done between the last backup and the crash will be lost if there's no binary log. With the binary log you can restore the last backup and then re-apply the modifications stored in the binary log until the crash, so the data loss is minimum.
See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html Ciencia Al Poder (talk) 14:21, 2 September 2012 (UTC)
Thank you Ciencia. This is how we have configured our database as we need replication. There is a gsacrawler which crawls the wiki every sec. DO you think that it can be a issue? The heavy log is generated even on the weekends when the load on the server is comparatively very less. 72.52.96.29 15:51, 3 September 2012 (UTC)
Set $wgCacheDirectory; the l10n cache will be stored on the filesystem instead of in the database. —Emufarmers(T|C) 11:03, 2 September 2012 (UTC)
Thank you Emufarmers.
Also, the setting for l10n_cache:
$wgLocalisationCacheConf = array(
'class' => 'LocalisationCache',
'store' => 'detect',
'storeClass' => false,
'manualRecache' => false,
);
If I set manualRecache to 'true', then would the localisation be stopped ? 72.52.96.33 06:31, 9 September 2012 (UTC)

Unable to upload files

Hi all,

Wonder if someone could assist?

  • Mediawiki 1.19.1
  • PHP 5.4.5
  • MySQL 5.5.27
  • IIS 7.5


I am trying to get file upload functionality to work, but after I select the file to upload and click upload, get the following error:

PHP Warning: is_file(): open_basedir restriction in effect.
File(C:\Windows\Temp\php6B6F.tmp) is not within the allowed path(s):
(c:\inetpub\wwwroot\;c:\php\upload_temp\;c:\php\uploadtemp\;c:\php\sessiondata\;d:\web sites\;C:\Windows\TEMP\)
in C:\inetpub\wwwroot\mediawiki\includes\filerepo\backend\FSFile.php on line 42
PHP Notice: Undefined index: file-mime in C:\inetpub\wwwroot\mediawiki\includes\upload\UploadBase.php on line 351 

I've ensured that IUSR has write access to c:\windows\temp and as can be seen above, c:\windows\temp\ is declared in open_basedir.

Wonder if it's a Windows thing?

Can't post the url i'm afraid as it's a corporate intranet and I'm forced to use Windows and IIS. :(


Any pointers would be cool....

Dom 82.16.27.28 (talk) 08:59, 31 August 2012 (UTC)

Lol. You spend days trying to work it out and fix it within five minutes of posting for assistance!!
Had to enable 'Anonymous Authentication' in IIS7.
I already had this enabled for 'Default WebSite', but thought it would propogate down to the mediawiki site. Clearly not. Had to Enable anonymous authentication here too.
Took a minute or so to take effect though so be patient :) 82.16.27.28 09:32, 31 August 2012 (UTC)

New article with Form into Namespace

Hi,

Software MediaWiki 1.17.5; Semantic Forms (Version 2.4.2); Semantic Forms Inputs (Version 0.6); etc http://kubb.ranews.de/index.php?title=Spezial:Version

I think my question it's a simple problem, but I find not just the answer.

I want to create a new article with a form into a other Namespace call "Teams".

I find now way to get a präfix Namespace automatic befor input the Teamname!

Per hand i make Teams:Myteamname, but how it works with Formulars?


My Code:

{{#forminput:form=NewTeam}}
</noinclude><includeonly>
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
{{{for template|Infobox Team2}}}
{| class="formtable"
! Teamname**:
| {{{field|Teamname|mandatory}}}
......
{{{end template}}}

{{{standard input|summary}}}
{{{standard input|minor edit}}} {{{standard input|watch}}}
{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}}

Thanks for helps!


Bastor Bastor de (talk) 17:24, 31 August 2012 (UTC)

How can I know which article is the 1st, 100th, 1000th, 2000th aritcle?

Is there any way to find these articles in my own mediawiki site? Deletedaccount4567435 (talk) 19:25, 31 August 2012 (UTC)

While I suppose you could use the curid url parameter. It finds article by page id, which more or less corresponds to if it is the 1st, 100th, etc article. (If said article was deleted, you will get a bad title error. Whenever a page is deleted, a hole is left in the page id numbers).
For example https://www.mediawiki.org/w/index.php?curid=1 https://www.mediawiki.org/w/index.php?curid=30000 Bawolff (talk) 04:01, 1 September 2012 (UTC)
Note that MediaWiki's page id is for all namespaces, so you may get pages on any namespace. It doesn't count only main namespace articles. Ciencia Al Poder (talk) 14:28, 2 September 2012 (UTC)
Well I just want main NS count. Anyway thank you for your respond! Zoglun (talk) 05:00, 26 October 2012 (UTC)