Project:Support desk/Flow/2013/03

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

Extension Distributor Problem: Version selection does not work

Hi, I am trying to use the ExtensionDistributor to get the SyntaxHighlight_Geshi extension working on my local wiki. However, when selecting (I tried 3 different) extension at first, I am forwarded to a page where I should select my wiki version. However, the selection box is empty and if i try to continue nothing happens. So far I tried to make this extension work on several ways, and my hope is this tool, to get a working extension. So, what I am doing wrong and what i can do now?

Thank you DanielBDLRG (talk) 11:33, 1 March 2013 (UTC)

Well, that's odd because it's working for me.
Maybe try again Ciencia Al Poder (talk) 16:34, 1 March 2013 (UTC)
You can also download a snapshot from Git directly: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SyntaxHighlight_GeSHi.git;a=summary 88.130.77.242 23:50, 1 March 2013 (UTC)

Custom title on anchors pointing to internal pages

Hi all,

How do I add a custom title on an anchor that points to an internal page?

Example of desired output: <a href="http://example.com/something" title="custom title here">something</a>

Thank you! 212.250.203.194 (talk) 13:33, 1 March 2013 (UTC)

You can't modify the title of the anchor, but you can place an element with another title inside:
[[Page|<span title="new title">Link text</span>]] Ciencia Al Poder (talk) 16:37, 1 March 2013 (UTC)
Thanks, Ciencia, but I think that's misleading because you have two titles in a link. 212.250.203.194 17:10, 1 March 2013 (UTC)
Actually, you only have one title on the link. The other one is inside the link ;)
If you need the different title to display a different text as a tooltip when hovering the link, then this already does the job. Ciencia Al Poder (talk) 20:57, 1 March 2013 (UTC)
Yes, that's true, Cirencia; however, I don't think it will make any difference to search engines who index the title of <a> and might consider the title of as over-optimization, right? 212.250.203.194 09:51, 4 March 2013 (UTC)
I don't know what would Search Engines do, sorry, but I think search engines don't give much importance to titles except when used on images. Ciencia Al Poder (talk) 10:24, 4 March 2013 (UTC)

Help! Table syntax showing stray

MediaWiki Version - 1.15.5-2squeeze5 PHP Version - 5.3.3-7+squeeze14 (apache2handler) My SQL Version - 5.1.66-0+squeeze1


I have created a table on my Wiki page for my business's private wiki.

Before the table starts, there is a stray

showing. (Please follow the link, for a screen shot of this)

http://i.imgur.com/jn0srYy.png


Below, is the code that I have used.

In order to ensure the information you have edited/added is displayed correctly, you may need to learn a few simple syntax rules.




*Note:- Where there are spaces displayed in the 'You Type' column, please remove these if you wish to enable to syntax.




<table class="wikitable">
<tr>
<th>Description</th>
<th width="40%">You type</th>
<th width="40%">You get</th>
</tr>

<tr>
<td>Italic text</td>
<td>
<pre>
''italic''
</pre></td>
<td align="center">
<p><i>italic</i></p>
</td>
</tr>
<tr>
<td>Bold text</td>
<td>
<pre>
'''bold'''
</pre></td>
<td align="center">
<p><b>bold</b></p>
</td>
</tr>
<tr>
<td>Bold and italic</td>
<td>
<pre>
'''''bold &amp; italic'''''
</pre></td>
<td align="center">
<p><i><b>bold &amp; italic</b></i></p>
</td>
</tr>
<tr>
<td>Strike text</td>
<td>
<pre>
&lt;strike&gt; strike text &lt;/strike&gt;
</pre>
</td>
<td align="center">
<strike>strike text</strike></td>
</tr>
<tr>
<td> External Link with name </td>
<td>
<pre>
[http://www.google.co.uk Google]
</pre>
</td>
<td align="center">
[http://www.google.co.uk Google]
</td>
</tr>
<tr>
<td> Show image </td>
<td>
<pre>
[[File:nameofimage.extension]]
</pre>
</td>
<td align="center">
[[File:WalsallCouncil.png]]
</td>
</tr>
<tr>
<td>Horizontal Rule</td>
<td>
<pre>
Text Above
----
Text Below
</pre></td>
<td align="center">
<p>
Text Above
----
Text Below
</p>
</td>
</tr>
<td>Headings of different levels</td>
<td>
<pre>

== Level 2 ==

=== Level 3 ===

==== Level 4 ====

===== Level 5 =====

====== Level 6 ======

</pre>
<hr />
<div class="note note-info">
</div>
</td>
<td align="center">
<p>
= Level 1 (Includes underline) =
== Level 2 (Includes underline) ==
=== Level 3 ===
==== Level 4 ====
===== Level 5 =====
====== Level 6 ======
</p>
</td>
<tr>
<td>Bullet list</td>
<td>
<pre>
* One
* Two
** Two point one
* Three
</pre></td>
<td>
* One
* Two
** Two point one
* Three
</td>
</tr>
<td> Numbered list </td>
<td>
<pre>
# One
# Two
## Two point one
# Three
</pre>
</td>
<td>
# One
# Two
## Two point one
# Three
</td>
</tr>
<tr>
<td> Indenting Text </td>
<td>
<pre>
no indent (normal)
:first indent
::second indent
:::third indent
</pre>
</td>
<td>
No indent (normal)
:First indent
::Second indent
:::Third indent
</td>
</tr>


Please can someone help me! 194.66.190.15 (talk) 15:25, 1 March 2013 (UTC)

You should use wiki tables instead of trying to write your own HTML for the tables. I think you are running into something with $wgUseTidy. MarkAHershberger(talk) 15:43, 1 March 2013 (UTC)

[RESOLVED] How to make the wiki public to every user

Current system information:

MediaWiki 1.18.2

PHP 5.3.3 (apache2handler)

MySQL 5.1.67

Background summary: The purpose of this is to allow a select handful of users to quickly access articles from a wiki that is a backup copy for emergency purposes. Unlike its live counterpart, it is not necessary to restrict anonymous user interactions. That is to say, I would like to be rid of the login page entirely and allow any person to view any articles as they desire.

I have tried changing $wgGroupPermissions['*']['read'] = false; to $wgGroupPermissions['*']['read'] = true; Attempts to google similar solutions turn up with nothing useful, and a whole bunch of articles detailing how to make the wiki private. Could just be my terrible googling skills, but hey!

Any sort of quick and dirty method of doing this would be fine; thanks to all who contribute in advance.

Cheers! 193.61.220.3 (talk) 17:17, 1 March 2013 (UTC)

A default MediaWiki installation allows anyone to see articles with no restriction, and also edit pages. All configuration changes are done at the LocalSettings file. Just take a look at that file and remove (comment out) everything that has to do with group permissions and restrictions and it should work. Ciencia Al Poder (talk) 15:37, 2 March 2013 (UTC)
Thanks for your response!
It took me a while to find out that I had not updated $wgServer in LocalSettings.php after backing up the wiki to another domain, but it all works fine now. 193.61.220.3 11:24, 4 March 2013 (UTC)

This Wiki uses cookies to log in users...

Aloha...

I install a new Mediawiki (1.20.2) on a Server of a Webhoster (Germany - 1&1).The installation was ok but when i try to log in the Wiki i get the following error:

"This Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again." I google it but all the solutions that i found don't work...i try the php.ini,some Commands in the LocalSettings and many more...

Anyone has a Idea how i can fix this problem ? Maybe a problem of the Server ? 91.38.231.82 (talk) 21:22, 1 March 2013 (UTC)

Nobody an idea?... 79.238.223.39 13:40, 2 March 2013 (UTC)
Check to make sure PHP's directory for storing session data is writable. This directory can be found in the php.ini file under the session.save_path setting. Errors in this php.ini setting can also cause other problems.
... (and) make sure the Internet Guest Account (eg. IUSR_FOOBAR, nobody, or apache) has write permissions to the folder listed in the session.save_path variable of the php.ini file.
If you are using a hosting site you need to edit your php scripting configuration (php.ini). The page should have information on your web document root. If there is already a "tmp" folder created then use it. If there is not a tmp folder in your current set up create one that is NOT browseable by users and tell the php.ini file the location as directed above. 88.130.77.242 19:12, 2 March 2013 (UTC)
Whats the command for the php.ini to set the tmp folder for the cookies ?
I have no access to the php.ini of 1&1 Webhosting...the only thing i can do is create a php.ini with a command and upload it to my root directory...
Sorry...i'am a newbie in php.ini etc. 79.238.223.39 22:35, 2 March 2013 (UTC)
Here's a screen from the sessions of my version.php...hope we found the error there...
http://img6.imageshack.us/img6/8130/phpzn.jpg
I don't get it...
Maybe the hosting is not so good...
Hope you can find anything with the screen :-/ 79.238.223.39 06:19, 3 March 2013 (UTC)
Ok...now i added a "session.auto_start = On" to a custom php.ini in my root directory...
Now i can login but i get a blank page after login and can go backwards,it works then but i have this error messages:
Warning: Cannot modify header information - headers already sent by (output started at /xxx/x/xxxxxxx/xxxx/LocalSettings.php:2) in /xxx/x/xxxxxxx/xxxx/includes/WebResponse.php on line 38
On the blank Page when i log in i get this errors:
Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in /xxx/x/xxxxxxx/xxxx/includes/specials/SpecialUserlogin.php on line 1189
Warning: Cannot modify header information - headers already sent by (output started at /xxx/x/xxxxxxx/xxxx/LocalSettings.php:2) in /xxx/x/xxxxxxx/xxxx/includes/WebResponse.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /xxx/x/xxxxxxx/xxxx/LocalSettings.php:2) in /xxx/x/xxxxxxx/xxxx/includes/WebResponse.php on line 78
and when i'am log out i get this:
Warning: Cannot modify header information - headers already sent by (output started at /xxx/x/xxxxxxx/xxxx/LocalSettings.php:2) in /xxx/x/xxxxxxx/xxxx/includes/WebResponse.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /xxx/x/xxxxxxx/xxxx/LocalSettings.php:2) in /xxx/x/xxxxxxx/xxxx/includes/WebResponse.php on line 78 79.238.207.212 15:18, 3 March 2013 (UTC)
The relevant error seems to be
Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in ...
The problem is that output has already started before that point (which should not happen). Check LocalSettings.php line 2. It seems like this returns something, which it should not do. Maybe there is some code, or a UTF-8 BOM at the start of the file (an editor like Notepad++ might add that silently in files you edited). Make sure that the file starts with "<?php" and that the encoding is UTF-8 without BOM. 88.130.89.102 16:39, 3 March 2013 (UTC)

Namespace results in search suggestions.

I'm trying to configure my search box to include content pages from two namespaces as suggestions. I've added the namespaces to $wgNamespacesToBeSearchedDefault which works correctly in regular search and also enabled $wgEnableMWSuggest which also works. There is a topic in the Manual:$wgEnableMWSuggest talk page that seems to indicate that this isn't possible but it's been done over at UESP.net. Does anyone know how to do this? If it helps this is the wiki and here is an example search that includes both namespaces in the search results. Thanks in advance. Valadez (talk) 21:54, 1 March 2013 (UTC)
I don't know how they did that, but I've asked for a HOWTO and/or the code. MarkAHershberger(talk) 20:20, 2 March 2013 (UTC)
Thanks for looking into it. Explains why I haven't seen it anywhere else. I'll keep an eye on on Daveh's talk page as well. Valadez (talk) 22:06, 2 March 2013 (UTC)
I know this is old, but I've found a solution.
Edit your resources\src\mediawiki\mediawiki.searchSuggest.js
Change from:
( function ( mw, $ ) {
mw.searchSuggest = {
// queries the wiki and calls response with the result
request: function ( api, query, response, maxRows, namespace ) {
return api.get( {
formatversion: 2,
action: 'opensearch',
search: query,
namespace: namespace || '0',
limit: maxRows,
suggest: true
} ).done( function ( data, jqXHR ) {
response( data[ 1 ], {
type: jqXHR.getResponseHeader( 'X-OpenSearch-Type' ),
query: query
} );
} );
}
};
To:
( function ( mw, $ ) {
mw.searchSuggest = {
// queries the wiki and calls response with the result
request: function ( api, query, response, maxRows, namespace ) {
return api.get( {
formatversion: 2,
action: 'opensearch',
search: query,
namespace: namespace || '0|3010',
limit: maxRows,
suggest: true
} ).done( function ( data, jqXHR ) {
response( data[ 1 ], {
type: jqXHR.getResponseHeader( 'X-OpenSearch-Type' ),
query: query
} );
} );
}
};
Where 3010 is your namespace ID. Use "|" to separate multiple ID's. 2001:1AB8:2:0:47F:24FA:8FAE:8103 (talk) 08:37, 1 March 2019 (UTC)

API for "related changes"

I'm looking at the related changes feature and wondering if there is an API to access it. I see API's for the watchlist and for recent changes, both of which are similar. I'm completely new to mediawiki related programming. I'm interesting in getting related changes on Wikipedia. Silas Ropac (talk) 02:20, 2 March 2013 (UTC)
This is information that you can get from the API, but I don't see a single "related changes" call. From the page you linked to:
The "Related changes" feature lists all recent changes (before MediaWiki 1.5: only the last) in each page linked to from the specified page, or all recent changes in each page with a link to the specified page.
I looked at this for a bit, though, and didn't see a way to get a list of changes on a page or list of pages. I thought something like the following would work:
https://www.mediawiki.org/w/api.php?action=query&titles=API%7CMediaWiki&list=recentchanges
But apparently it doesn't. If I'm right (and not simply ignorant) then this looks worthy of a bug report. MarkAHershberger(talk) 19:13, 2 March 2013 (UTC)
Indeed. I've also tried and failed to get it to work. I was also expecting it to work using links as a generator but it returns both results as if I used list=recentchanges and prop=links
https://www.mediawiki.org/w/api.php?action=query&list=recentchanges&generator=links&titles=API%7CMediaWiki Ciencia Al Poder (talk) 10:24, 3 March 2013 (UTC)
Thanks for looking at this. I can't say I quite understand the issue enough to file a bug report. I haven't even used the API yet at all, was just going to experiment. I think I will just use the watchlist API for starters, it is the same idea but for one fixed "page". If later I really want to use "get related changes" I will circle back and pursue this. But if someone else wants to file the bug report in the meantime, that would great also. Thanks. Silas Ropac (talk) 23:04, 4 March 2013 (UTC)
I believe this is the feature request for what I wanted to do: bug 15552 Silas Ropac (talk) 03:05, 13 March 2013 (UTC)
Hi! any update regarding this issue? been trying also to get the related changes of a certain page. Like what is the output in this sample: Help:Related changes
Tried some bunch of queries but still no avail. One close enough is to get all the links that are associated with that page and get their revisions, problem is that there's too many of the returned links and all i want is the related changes that are recently updated of a certain page. Amfufutm (talk) 07:00, 17 February 2016 (UTC)
This feature request is tracked in T17552 Ciencia Al Poder (talk) 10:23, 17 February 2016 (UTC)
Thanks, will subscribe to that task. Amfufutm (talk) 12:45, 17 February 2016 (UTC)

How to use reCaptcha in Mediawiki

My current Mediawiki is version 1.20.2, and PHP & MySQL are latest versions. I have a question: how to prompt a user to enter reCaptcha when the user fails to register, login and submit an edited articles for a certain number of times?

The Mediawiki plugins mentioned in documents I found in Google are only for 1.17, which has not updated over 5 years, and it cannot be used in the latest version of Mediawiki. Is it possible to make reCaptcha internal in Mediawiki like PHPBB 3? 2001:DA8:22A:600E:BD67:106D:B22E:D33 (talk) 03:11, 2 March 2013 (UTC)

Database error after upgrade

After 3 hours of debugging a corrupted SQLite DB (don't ask, I have no idea) I've finally dumped and reimported all my content. I'm running a locally hosted MediaWiki instance, and when trying to access a specific category page or when running maintenance/populateCategory.php I get an error like:


 liamzebedee@xxxx:/var/www$ sudo php maintenance/populateCategory.php
 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 = 'Biological_Level_of_Analysis' AND (page_id = cl_from)  LIMIT 1   LOCK IN SHARE MODE
 
 Function: Category::refreshCounts
 Error: 1 near "LOCK": syntax error
 

This error is preventing me from accessing some categories on my wiki. Any ideas how to solve it? I've successfully run update.php, with install details below:


 MediaWiki 1.21alpha (6882027)
 PHP	  5.4.6-1ubuntu1.1 (apache2handler)
 SQLite	  3.7.13 with full-text search support
 
 Extensions:
 Math            1.0
 ParserFunctions 1.4.1
  Liamzebedee (talk) 12:25, 2 March 2013 (UTC)
I don't know if SQLite supports LOCK IN SHARE MODE (it seems not), but it looks like a bug. You should file it at bugzilla, although it looks similar to bugzilla:39635. Ciencia Al Poder (talk) 16:16, 2 March 2013 (UTC)

PHP Fatal error: Class 'SiteConfiguration' not found in updateArticleCount.php on line 59

When running the following command:

php -e -f updateArticleCount.php

I get the error message above:

PHP Fatal error: Class 'SiteConfiguration' not found in updateArticleCount.php on line 59

The line in question is the line stating:

require_once( RUN_MAINTENANCE_IF_MAIN );

Could anyone point out how I could fix this, or ensure the script runs properly?

Thanks!

Peter

Versions: MW 1.19.2, PHP 5.3.3, MySQL 5.0.95 85.80.205.112 (talk) 14:05, 2 March 2013 (UTC)

try executing the command from the MediaWiki installation directory. So for example, if you're in /path/to/your/wiki/maintenance, go to /path/to/your/wiki and execute php -e -f maintenance/updateArticleCount.php Ciencia Al Poder (talk) 16:18, 2 March 2013 (UTC)
Thanks for your reply. I tried your suggestion, but that gives me the exact same error. 85.80.205.112 19:25, 4 March 2013 (UTC)

[RESOLVED] Search failed (modified vector Skin)

Hi,

MediaWiki 1.19.3
PHP 5.2.17
MySQL 5.0.95
http://vajdasag.rs/

When I search anything in search box or click on suggest, the result will be a weird url like this: http://something/?search=something

Whats wrong?

Thx 213.222.136.225 (talk) 16:12, 2 March 2013 (UTC)

I'm not sure what you're seeing. When I try to search I get http://vajdasag.rs/index.php?search=test&button=&title=Speci%C3%A1lis%3AKeres%C3%A9s MarkAHershberger(talk) 16:27, 2 March 2013 (UTC)
It's interest. I try again and I get wrong url: http://vajdasag.rs/test/test?profile=default&search=test&fulltext=Search
I tried three various browser and I got same result. 213.222.136.225 16:37, 2 March 2013 (UTC)
Problem was solved. I changed input html tags in vetor skin file. It's seem same before I replaced but now its work. Maybe character encoding problem. 213.222.136.225 18:00, 2 March 2013 (UTC)

AutoCreateCategoryPages not working with importDump.php

I am running Mediawiki 1.18. I use the extension AutoCreateCategoryPages. It works, when I edit and save a page the normnal way. But most of our wiki editing is done by creating XML dump files with an external application, and then loading the new or edited pages into the wiki with importDump.php

Since Mediawiki 1.18, the associated category pages do not created upon such a dump import. It used to work with previous releases, up to Mediawiki 1.17

I would be grateful for help, e.g. a patch to importDump.php or information, whether the feature works with newer releases of Mediawiki. Aloist (talk) 16:19, 2 March 2013 (UTC)

You should file a bug. MarkAHershberger(talk) 19:20, 2 March 2013 (UTC)

Problem begin run in wiki.

Hi, people!

I´m beginner install in wikimedia, but install were sucess. try run in site wikimedia and show message error. see link this pic pic of the problem wiki.]

Wait you can help to solve this problem. thank´s!

regards, Jeison Pereira Jsnpereira (talk) 20:37, 2 March 2013 (UTC)

The error you get is
Unserialize - Error at offset 0 of 64 bytes in includes/objectcache/SqlBagOStuff.php on line 539
I guess that might point to a charset problem with MySQL. What are the character sets, which MySQL uses? Especially in the database and for the connection with the server? 88.130.77.242 21:14, 2 March 2013 (UTC)
Hi,
I´m use PostgreSQL, but i guess character "UTF8".
I´m guestion this wikimedia is best use MySQL? If yes, i´l go install with MySQL.
Thank´s!
Regards,
Jeison Pereira Jsnpereira (talk) 19:53, 3 March 2013 (UTC)
Hi Jeison,
I am not a PostgreSQL expert and generally MediaWiki should run with PostgreSQL. However, most people and also Wikimedia itself uses MySQL. That means it is tested much more thoroughly with MySQL. MediaWiki might also have issues with MySQL, but with MySQL it is way more likely that someone else had them before you and they already got fixed.
So, yes, if you could change to MySQL, I think this made life easier for you. 88.130.89.102 22:56, 3 March 2013 (UTC)

MediaWiki is ignoring LocalSettings.php

I have set up MediaWiki and it was working for a while. I enabled uploads and imported some stuff from an old wiki. MediaWiki is now giving me the following error:

(Can't contact the database server: Access denied for user 'wikiuser'@'localhost' (using password: NO) (localhost))

I have double checked, and the LocalSettings.php file contains the following settings:

$wgDBtype = "mysql"; $wgDBserver = 'localhost'; $wgDBname = 'rachael_mw9'; $wgDBuser = 'rachael_mw9'; $wgDBpassword = 'password';

Anyone know what's going on? 58.7.181.218 (talk) 07:03, 4 March 2013 (UTC)

You may have $wgDBuser redefined somewhere else in your LocalSettings because the error message says it's connecting to mysql with the user "wikiuser".
Check also the files you imported. You may want to search in files for the "wikiuser" string. Ciencia Al Poder (talk) 10:29, 4 March 2013 (UTC)

Get undone edits automatically marked as patrolled

Hello. In wikis such as pt.wikipedia, when someone undoes an edit, that undone edit remains as unpatrolled. I think that's absurd: 1) if the edit was good, there's no reason why it shouldn't be marked as patrolled, 2) if the edit was bad, once it has been undone, it's not a potential bad thing one still has to care about, so there's no reason why it should be kept marked as unpatrolled. Is it possible to have an undone edit automatically marked as patrolled? That's not what's happening in pt.wikipedia, and so far not only I have to mark as patrolled all edits I undid, as everybody has to mark as patrolled edits someone else has undone. There are robots that undo hundreds of edits everyday day and they just mark as patrolled their own edits, not the ones they undid - these must be marked as patrolled manually. Garsd (talk) 17:38, 4 March 2013 (UTC)

I am not completely sure, if I understand, what you mean:
You mean the situation that the newest version is patrolled.
Then someone adds an edit on top of it and then this last edit is reverted, so that the current version is the same as the old version, which already was patrolled. I think it would be logical, if that edit was patrolled automatically then. 88.130.66.25 18:11, 4 March 2013 (UTC)
There are two things to distinguish: flagged revision (Help:FlaggedRevs) and patrolled revision (Help:Patrolling). None of these work as yet in en.wikipedia. In pt.wikipedia patrolling works for every autoconfirmed user, but in other wikis works only for administrators. Flagging is working in pl.wikipedia and ru.wikipedia, but not in pt.wikipedia. What I mean is patrolling, not flagging. In patrolling each revision has a mark "patrolled" or "not patrolled". By default, whenever an edit is made, that revision is marked "not patrolled" (unless the user is autopatrol, or a bot). That's independent of which revision is the newest or which revision is shown when you load the page. You can have a revision 2 years old marked as "not patrolled". So, I mean patrolling. Patrolling is about taking the list of revisions marked as "not patrolled", checking one, if it's non-problematic, you change its mark to "patrolled", if it's problematic (vandalism, for instance), you solve the problem, and then change its mark to "patrolled". Then you go back to the list and that revision is not there anymore, so you take another one, and so on. Every revision should end as "patrolled", once it has been dealt with. See commons:COM:ANON, for a good example. Often, though not always, the solving of the problem is simple: you undo the problematic edit with the undo button. In some cases you have to make manual undoing of a bad part in order to keep some good part - in theses cases you don't use the undo button. What I say is, if you use the undo button, then the revision you're undoing should be marked automatically as "patrolled". As it is now, after undoing, one has to go back to that revision and change the mark manually. And bots, when undoing some revision, should also mark it as "patrolled". I don't know whether bots really click the undo button, but the idea is the same. Garsd (talk) 18:56, 4 March 2013 (UTC)

[RESOLVED] Extra whitespace after transcluded content

As an extension to my original question:

I find that when I include transcluded sections from a source article into a target article, the target article when displayed has about 7 extra blank lines added immediately after the transcluded content. There are no extra line breaks in the transcluded content or in the target article, but when rendered, the target article displays the white space.

Is there a way to prevent/eliminate the whitespace in the target article?

Thank you for the assistance. Fzyz4z (talk) 18:23, 4 March 2013 (UTC)

Extra whitespace is caused by extra whitespace on the templates. But without an example page I cannot tell where the problem is. Ciencia Al Poder (talk) 10:50, 5 March 2013 (UTC)
I have created a sample on the site. Sorry, As I need to create multiple articles for this example, I cannot leverage the sandbox.
The 3 articles are:
The issues appears to be most prevalent when transcluding content that contains a standard template. In the example, you can see the impact in the white space difference between Section 1 of Transclude Source (which includes a standard Template Article:Template:Transclude Test Template) and the white space in Section 1 of Transclude Target which transcludes Section 1 of Transclude Source.
When viewed, the transcluded section 1 in Transclude Target has significantly greater whitespace than the original/template content in section 1 of Transclude Source.
Thank you for our assistance. Fzyz4z (talk) 19:07, 8 March 2013 (UTC)
Fixed removing whitespace in <onlyinclude></onlyinclude>. Instead of starting the content at the next line, start it next to the onlyinclude tag, and put the closing tag on the same line where you end the content and not at the next one. Ciencia Al Poder (talk) 17:37, 9 March 2013 (UTC)
Sorry for the delayed response. This fix worked. Thank you again for your assistance. Fzyz4z (talk) 16:19, 18 September 2013 (UTC)

Modify the default editor

Hi, I want to modify the default editor for the editor used in this page with Advanced Options, Special charaters and help. 213.58.233.69 (talk) 19:21, 4 March 2013 (UTC)

It sounds like you want to install the WikiEditor extension. MarkAHershberger(talk) 23:33, 15 March 2013 (UTC)

Same name of the pages. How create an index

I would like to create a French - English dictionary with mediawiki

1) I just create French Page and A, B C, etc.. pages... but in English, there are the same pages..( A, B C...) . If you click in english "A" page, it's the same that the French Page... How I can separete Each A, B C pages of each language?

One possible solution maybe create an automatic index. Each word in one page, and an index to reference it... ¿How I can create it?

Thx a lot Theboina (talk) 20:49, 4 March 2013 (UTC)

What about using namespaces: Prefix your pages with "English:", "French:", "German:" and so on just like they are prefixed with "Talk:" or "Project:" here. 88.130.66.25 22:22, 4 March 2013 (UTC)

[RESOLVED] Could not create directory after upgrade attemp from 1.15 to 1.20

Installed new files, moved database, ran php upgrade.php everything looked good until I tried to upload a new file. The old install stored files on the local hard drive (I don't know why it was setup like this) This site is on our local intranet so no URL. Do I need to create a directory? Any help would be greatly appreciated.

Internal errorFrom LSU Health Shreveport Medical Library Jump to: navigation, search Error storing file in '/tmp/php3IE62g.pdf': Could not create directory "mwstore://local-backend/local-temp/1/1e".

Backtrace:

  1. 0 /var/www/mediawiki/includes/upload/UploadBase.php(795): UploadStash->stashFile('/tmp/php3IE62g', 'file')
  2. 1 /var/www/mediawiki/includes/upload/UploadBase.php(808): UploadBase->stashFile()
  3. 2 /var/www/mediawiki/includes/upload/UploadBase.php(817): UploadBase->stashFileGetKey()
  4. 3 /var/www/mediawiki/includes/specials/SpecialUpload.php(334): UploadBase->stashSession()
  5. 4 /var/www/mediawiki/includes/specials/SpecialUpload.php(424): SpecialUpload->showUploadWarning(Array)
  6. 5 /var/www/mediawiki/includes/specials/SpecialUpload.php(174): SpecialUpload->processUpload()
  7. 6 /var/www/mediawiki/includes/SpecialPage.php(611): SpecialUpload->execute(NULL)
  8. 7 /var/www/mediawiki/includes/SpecialPageFactory.php(494): SpecialPage->run(NULL)
  9. 8 /var/www/mediawiki/includes/Wiki.php(290): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
  10. 9 /var/www/mediawiki/includes/Wiki.php(536): MediaWiki->performRequest()
  11. 10 /var/www/mediawiki/includes/Wiki.php(446): MediaWiki->main()
  12. 11 /var/www/mediawiki/index.php(59): MediaWiki->run()
  13. 12 {main}

Retrieved from "http://10.2.162.106/mediawiki/index.php/Special:Upload" Ctudor (talk) 21:16, 4 March 2013 (UTC)

It's likely to try to create the directory $wgUploadDirectory/temp/1/1e. Be sure that $wgUploadDirectory and all its descendants are writable by the webserver.
If in doubt, give all permissions, check if that solves the problem, and then tune up permissions until it's secure and working. Ciencia Al Poder (talk) 11:02, 5 March 2013 (UTC)
Thanks, I made the folder 777 and everything works. I tried 775 and 755 but had the same error. Since this server is on our interanet and not avilible to the public I'm going to leave it 777. Thanks so much for your help. Ctudor (talk) 15:02, 5 March 2013 (UTC)
If it only works with full access from everyone, maybe what you need to change is the owner (user and/or group) Ciencia Al Poder (talk) 10:19, 6 March 2013 (UTC)

Namespace Protection

I am very confused by the namespace protection syntax and am hoping someone can help me. I am attempting to lock down my "Help" namespace so that only admins can edit and create pages. I want to retain the discussion pages so that non-admins can post on the discussion pages. Thanks in advance. Zackmann08 (talk) 21:54, 4 March 2013 (UTC)

I've been doing some protection editing today, so I'll try to help out, but this may be wrong.
It looks like you want:
$wgNamespaceProtection[NS_HELP]      = array( 'help-edit' );
$wgGroupPermissions['admin']['help-edit'] = true; //only admins can edit help pages
MarkAHershberger(talk) 23:44, 15 March 2013 (UTC)
See Manual:User rights and $wgNamespaceProtection for more information. PleaseStand (talk) 08:31, 19 March 2013 (UTC)

[RESOLVED] mw.config.get

I have a bit of trouble understanding Manual:Interface/JavaScript#mw.config.

I'm relatively new to JavaScript. I've been revamping an edit counter script for the past two-three months that uses the API and posts a table to a page. These few months are my only JavaScript experience and I think I'm doing great learning by myself (with Internet help, of course). The old script was very specific to certain wiki elements and required tinkering to get it to work on another wiki using different install options, such as no $wgScriptPath set on the wiki I was trying to use it on and the first wiki had /w/ hardcoded into the ajax calls. I have gotten to the point where the script is smart enough to work as-is on practically any MediaWiki install, but of course, I don't have the means to test it like that, so I'm still learning as I go.

Anyways, my question, or request for clarification, is about using mw.config.get vice just using the wg variable directly. If I understand the page I linked correctly, I do not have to use mw.config.get if $wgLegacyJavaScript is true, correct? I noticed other scripts I have seen plop wgServer and wgScriptPath straight into an ajax call without using mw.config.get and my current revision of my script uses a few other wg variables and it works without having to use mw.config.get anywhere, but if $wgLegacyJavaScript is set to false on some wiki where someone uses my script, will my script not work?

If you want to browse my script, it is at wikipedia:User:Kanegasi/editcounter.js. If you're wondering why the revision history of that page is short, the original location I was working at was minecraftwiki.net and the full page history of my successes and failures can be seen here. Kanegasi (talk) 01:25, 5 March 2013 (UTC)

You should use mw.config.get always, it will work whether $wgLegacyJavaScript is set to true or false. As that variable name suggests, accessing wg variables directly is legacy and support for this may be dropped eventually. Ciencia Al Poder (talk) 10:49, 5 March 2013 (UTC)
I used to use just one mw.config.get for each variable and store that into another variable, instead of repeating mw.config.get several times. I'll have to go back to that then. Thank you for the clarification. Kanegasi C 22:26, 5 March 2013 (UTC)

Internal and External KB

I'd like to use MediaWiki to have an internal and external, customer facing KB for my company. Is there a way to distinguish between customer facing pages and those that should be internal? In other words, only some of the pages should be made external to customers whereas the other pages the customers will never know about.

Thanks for the help in advance. 108.40.25.244 (talk) 01:41, 6 March 2013 (UTC)

Not really. You migh want to check out Manual:Preventing_access, which has some hints on the topic. But generally Mediawiki is not made for access control. 88.130.120.246 23:30, 6 March 2013 (UTC)
Honestly, best way is to create 2 separate wikis, a private one and a public one. MediaWiki can work very well where anons aren't allowed to read any pages, however doing half and half can be problematic (It is possible with extensions, but you have to be careful). Bawolff (talk) 05:28, 9 March 2013 (UTC)
I am a new Editor on the Subject of Greenhouse tourism I am really seeking help on how I can place data in the Wiki Encyclopedia in the rightful procedure without causing deletion action 89.240.40.131 17:10, 9 March 2013 (UTC)
Apart from that being another topic than "Internal and External KB", it depends on the Wikipedia, in which you want to place the content. Most languages have some kind of relevance criteria; if your topic does not meet them, your text might be deleted (no matter how good it actually was). Check the deletion message, which you now find on the page, which was deleted. It should contain the reason for deletion. 88.130.92.40 18:15, 9 March 2013 (UTC)

How to install the selector of language on the sidebar?

Hi there,

i have installed the 1.20.3 version for a local business company but i find it hard to manage the sidebar. On the http://localhost/wiki/index.php/MediaWiki:Sidebar i find under TOOLBOX the heading LANGUAGES but i don't know how to activate the language selector. In the company there work englisch, turkisch and dutch people.

Can somebody add the instruction? Meerding88 (talk) 08:57, 6 March 2013 (UTC)

The LANGUAGES section is populated automatically when Interlanguage links are present in the page.
The language selector is a different thing provided by the Extension:UniversalLanguageSelector. Ciencia Al Poder (talk) 10:27, 6 March 2013 (UTC)

Skin not working on new MediaWiki installation

I've installed a MediaWiki at this url, but for some reason the front page does not display correctly -- it has no structure. I think there may be something wrong with the skin. It's an Azeri-language wiki, but that shouldn't have any impact on its display, should it? Other language wikis I've installed (Russian, Arabic) don't have any problems with display. Can anyone help me and let me know what's wrong? Thanks!

<wikieditor-toolbar-tool-file-pre>azeriproblems.jpg]] 85.179.141.207 (talk) 09:13, 6 March 2013 (UTC)

Scripts and styles are loaded through ResourceLoader using this URL: http://openoil.net/wiki/az/load.php but it's returning an error. See Manual:How to debug to diagnose the problem. Ciencia Al Poder (talk) 10:32, 6 March 2013 (UTC)

Translate/File Format Support Extension - Sample

This post by Revibot was moved on 2015-07-11. You can find it at Extension talk:Translate/Archive 2/2013#h-Translate/File_Format_Support_Extension_-_Sample-2013-03-05T00:00:00.000Z. Ciencia Al Poder (talk) 10:37, 6 March 2013 (UTC)

[RESOLVED] How to include Keypress in wiki

I am very new to using Mediawiki and do not understand how to use Template:Keypress in my wiki.

I had understood that copying the contents of keypress and keypress/core from wikipedia.org would give me the functionality, but it does not do so.

What am I doing wrong?

Thank you in advance 82.71.242.161 (talk) 11:21, 6 March 2013 (UTC)

Just to clarify, you also copied Template:Key_press/core ? AKlapper (WMF) (talk) 10:09, 7 March 2013 (UTC)
Yes, I copied keypress and keypress/core. Have also copied keypress/docs to be sure. When I call any keypress in a wiki page I get a lot of random keypress-like text as if it is displaying keypress/core rather than displaying it properly. 82.71.242.161 09:04, 8 March 2013 (UTC)
Also, exporting and importing into my wiki has the same result. 82.71.242.161 14:11, 8 March 2013 (UTC)
This was fixed by adding
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
to LocalSettings.php to enable Parser Functions 82.71.242.161 14:21, 8 March 2013 (UTC)
Thanks worked for me also! 68.119.81.239 05:49, 26 March 2014 (UTC)

Page history in bytes

Hello!
I downloaded and installed Mediawiki version 1.19.1. Everything seems to work just fine, but I am unable to see page size in bytes when viewing page history ("15" in ). Where could I switch to "public"? Larus ridibundus (talk) 20:19, 6 March 2013 (UTC)

Hmm, I just checked in a wiki I take care of and I can see the numbers of bytes for each entry in the history and I am pretty sure I did not configure that; it was there by default.
Maybe you use some custom CSS (or even a cur´stom skin), where these numbers get hidden? That would e.g. be possible with an according CSS definition for the class ".history-size". 88.130.120.246 23:36, 6 March 2013 (UTC)
In 1.19 #15 from that diagram should be present. However #14 (the total number bytes) was not introduced until a later version of MediaWiki
Less likely, but also possible. If certain fields are not populated in the database, they won't show up properly. This can be caused by not properly running update.php properly. This includes the rev_parent_id field, and the rev_length field. These can be updated by running the scripts populateParentId.php and populateRevisionLength.php respectively [both usually get automatically run during the upgrade process]. (In your case, I think you just need a newer version of MediaWiki, but if all else fails, you can also try those scripts). Bawolff (talk) 05:26, 9 March 2013 (UTC)

Upgrading error ERR_CONTENT_DECODING_FAILED

Hello

I am currently in the process to upgrade my wiki to version 1.20.3 and when I try to run the update in browser mode I get the following error message just before executing the Database update: Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown Error

My current version is 1.20.3 and the URL is http://wiki.medieval-arme.com.ar/. 190.195.54.32 (talk) 00:53, 7 March 2013 (UTC)

Which browser is this about, and does it also happen with another browser? AKlapper (WMF) (talk) 10:07, 7 March 2013 (UTC)
Yes, I tried IE9, Firefox and Chrome, all gave me the same error. 190.195.54.32 10:45, 7 March 2013 (UTC)
Does the problem has been resolved? The wiki loads fine for me (yesterday it had an error at the top of the page, but not today) Ciencia Al Poder (talk) 10:36, 8 March 2013 (UTC)
Probably double gzipping, if you recently updated apache/php could be something with thier config (in particular, do you have stuff set in php's output buffering settings to gzip everything? zlib.output_compression etc. It could be misconfigured or something). Do you have $wgUseGzip enabled in LocalSettings.php (not that it should matter)? Do you have file cache enabled (although that shouldn't come into play during the upgrade script). What about $wgCompressRevisions (Also shouldn't matter, but just asking about the gzip related variables just in case)
Try setting $wgDisableOutputCompression = true; in LocalSettings.php and see if it affects anything (that disables MW's gzip support)
The weird part about this is you're saying this is happening run running the web updater, I would expect it to happen on all pages, or not at all. Bawolff (talk) 05:08, 9 March 2013 (UTC)
I have tried all those and none worked. I decided to perform a clean installation from zero, since there is not that much to restore from the Wiki.
I did find one problem. When I include any type of extension I get the following error, otherwise it runs perfectly:
Warning: require(/\\HMFSW\WEB\revision\medieval-arme.com.ar\public_html\wikinueva\extensions\Gadgets/Gadgets_body.php): failed to open stream: No such file or directory in \\HMFSW\WEB\revision\medieval-arme.com.ar\public_html\wikinueva\includes\AutoLoader.php on line 1146 Fatal error: require(): Failed opening required '/\\HMFSW\WEB\revision\medieval-arme.com.ar\public_html\wikinueva\extensions\Gadgets/Gadgets_body.php' (include_path='.;E:\PHP5.3\ext;E:\PHP5.3\PEAR;E:\PHP5.3\PhpCommon') in \\HMFSW\WEB\revision\medieval-arme.com.ar\public_html\wikinueva\includes\AutoLoader.php on line 1146 190.195.54.32 22:17, 9 March 2013 (UTC)
Maybe something to do with the different / types (stab in the dark). Starting things with /\\ seems odd (should maybe be only \\). However normally such paths come from php's __DIR__ Which should be correct. Bawolff (talk) 21:34, 10 March 2013 (UTC)
190.195.54.32 22:17, 9 March 2013 (UTC)

[RESOLVED] Some css code does not work in common.css! Why?

Well I wanted to hide some links in my wiki using css. And I have my wiki in russian. So I have a page like this:
.../index.php/Заглавная_страница
and I use css like this which works perfectly to hide some links:

body.page-Заглавная_страница * h1, body.page-Заглавная_страница * h2 { display: none; }
body.page-Заглавная_страница * #catlinks { display: none; }
body.page-Заглавная_страница * #ca-talk { display: none; }

So I have created another page which link looks like this:
.../index.php/Портал:Политика
So I do the same thing to hide some links like:

body.page-Портал:Политика * h1, body.page-Портал:Политика * h2 { display: none; }
body.page-Портал:Политика * #catlinks { display: none; }
body.page-Портал:Политика * #ca-talk { display: none; }

But it doesn't make any effect! Why does it not work? Fokebox (talk) 15:34, 7 March 2013 (UTC)

I do not know off hand, but it is no magic. :-)
The page for which you say it works has a body tag with the according class ("page-Заглавная_страница") assigned to it.
Check the page, on which it does not work to see, how the class is called there. It might be called differently from what you think. Maybe the colon is causing the problem; if I remember correctly, colons are not allowed in CSS class names. 88.130.82.113 20:27, 7 March 2013 (UTC)
I just checked the Russian Wikipedia: There a page with the name "Портал:Политика России" has the class "page-Портал_Политика_России". Obviously you should use an underscore instead of the colon in the class name. :-) 88.130.82.113 20:30, 7 March 2013 (UTC)
Yes, colons have special meaning in css (pseudo-classes) and would have to be specially escaped, so we don't use them in the class names for a page. Bawolff (talk) 05:14, 9 March 2013 (UTC)
So how should I make css according to this class? Could you help me please?I want to hide the line on the top and discussion button
So here is the page http://www.wikijournal.ru/index.php/Портал:Политика Fokebox (talk) 10:38, 9 March 2013 (UTC)
As the anon said:
body.page-Портал_Политика * h1, body.page-Портал_Политика * h2 { display: none; }
body.page-Портал_Политика * #catlinks { display: none; }
body.page-Портал_Политика * #ca-talk { display: none; }
Bawolff (talk) 11:37, 9 March 2013 (UTC)
Thx it works!!! Fokebox (talk) 13:38, 9 March 2013 (UTC)

[RESOLVED] MediaWiki not sending email

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.


At some point in the past, this was working, but our wiki is now not sending email to the WikiSysop when someone makes a change to the wiki.

We have both $wgEnableEmail and $wgEnableUserEmail set to "true", and the EmailNotification variables are:

$wgEnotifUserTalk = true; # UPO $wgEnotifWatchlist = true; # UPO $wgEmailAuthentication = true; $wgUsersNotifiedOnAllChanges = array('WikiSysop');

As I say, at one point we know this was working, but it has stopped and I can't figure out why. The wiki is configured to use the php mail functionality (not a direct SMTP connection), which is working for other applications on our server.

I know that the version of the wiki software is somewhat old, but I haven't seen anything in the release note of subsequent versions that says a fix for anything that seems to be conencted to this issue was implemented. There doesn't seem to be a way to get the MediaWiki software to log what it is doing, to be able to check where in the process something is failing.

MediaWiki: 1.11.0 PHP: 5.4.11 (apache2handler) MySQL: 5.1.58

Any help is appreciated, thanks! Mvanhorn (talk) 20:02, 7 March 2013 (UTC)

If the PHP or wiki configuration hasn't changed, then it may be a firewall refusing connections between the server running MediaWiki and the mail server, or the mail server is refusing emails received from the email address configured in your server or from your server's IP address. Ciencia Al Poder (talk) 10:26, 8 March 2013 (UTC)
It's not that firewall is blocking connections, because, as noted, sending mail via php (and via other means) from the server works. Mvanhorn (talk) 13:49, 11 March 2013 (UTC)
Uh... I just noticed that you're using PHP 5.4.11, which was released on 24-jan-2013, so you upgraded PHP to a new version recently, which probably caused the issue.
Since MediaWiki 1.11 wasn't tested with that version of PHP (which didn't exist at the time it was released), it may be some compatibility issue with mail functions.
Having upgraded PHP, I'd recommend upgrading MediaWiki as well. Ciencia Al Poder (talk) 10:32, 8 March 2013 (UTC)
Do normal emails work? (Special:emailuser type emails)? It may be useful to enable MW debug logging (See How to debug) to see if it says anything about emails.
As an aside, there is a bug on latest MediaWiki with php 5.4 when $wgTimezone isn't set in LocalSettings.php (you get weird warnings). The easy work around is to set the timezone explicitly. (Just a heads up for if you decide to upgrade MediaWiki) Bawolff (talk) 05:12, 9 March 2013 (UTC)
I think you mean Manual:$wgLocaltimezone :) Ciencia Al Poder (talk) 17:39, 9 March 2013 (UTC)
Special:emailuser gives me a message which says
No target
You have not specified a target page or user to perform this function on. [sic]
So, I can't test it that way.
I have already fixed the timezone issue; that was a PHP thing, not a MW thing.
I will try using the debug log; that may help. Thanks! Mvanhorn (talk) 13:53, 11 March 2013 (UTC)
Sorry, I meant special:emailuser/<username of someone with email set up> Bawolff (talk) 15:02, 11 March 2013 (UTC)
Okay, gotcha. Yes, that works. So, sending email via PHP (known to work) does work for MW. However, the automated email-when-someone-updates-the-wiki is not. Mvanhorn (talk) 15:09, 11 March 2013 (UTC)
Hmm. Did you try special:emailuser for WikiSysop just to check for things like does wikisysop have correct email set.
My next guess is maybe the amount of email sent to that user started to trigger spam filters or something like that.
Your server may have logs about outgoing email. If so it might be worth to check them to see if the emails make it to that point or if mw is not generating them at all. Bawolff (talk) 07:48, 12 March 2013 (UTC)
No, upgrading PHP didn't cause the problem; it was occurring before upgrading to 5.4.11. Previously, we had 5.3.10, and it was not working then, either. Mvanhorn (talk) 13:50, 11 March 2013 (UTC)
Well, I tuned on debugging via $wgDebugLogFile and am not any closer to figuring this out. If I send a user an email directly, it generates a line in the log that says "Sending mail via internal mail() function". However, this is not occurring when a page changes happens, which is supposed to generate a message to the WikiSysop's email address.
Also, I did a recursive find, and the only reference that I can find to $wgUsersNotifiedOnAllChanges is in the LocalSettings.php file; wouldn't it need to be found in the MW code somewhere else for this to work? Mvanhorn (talk) 18:47, 11 March 2013 (UTC)
Oh. In earlier mediawiki, the variable didnt have the second i in it. See manual:$wgUsersNotifiedOnAllChanges Bawolff (talk) 07:53, 12 March 2013 (UTC)
That was it! I changed the variable name to $wgUsersNotifedOnAllChanges in our LocalSettings.php file, and now things are working!
At some point, I must have up-graded the wiki to a version where that variable name was misspelled, and that was when it broke.
Thank you! Mvanhorn (talk) 12:33, 12 March 2013 (UTC)
hi, am new to mediawiki. I have it installed. What all do I have to do for the email to work? Reddy (talk) 20:03, 19 August 2013 (UTC)
Puhh, depends on your system: Make sure that mails can be sent at all, set up MediaWiki so that sending emails is enabled. The latter can be done during installation. 88.130.64.41 21:00, 19 August 2013 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

ckeditor

i have added ckeditor with this in LocalSettings

require_once("$IP/extensions/ckeditor/ckeditor.php");
$wgHooks['EditPage::showEditForm:initial'][] = 'showEditForm';
function showEditForm($form){
global $wgOut;
$wgOut->addScriptFile( '/extensions/ckeditor/ckeditor.js' );
$script =
"<script type=\"text/javascript\">
window.onload = function()
{
CKEDITOR.replace( 'wpTextbox1' );
};
if ( window.removeEventListener )
window.removeEventListener( 'load', mwSetupToolbar, false ) ;
else if ( window.detachEvent )
window.detachEvent( 'onload', mwSetupToolbar ) ;
</script>";
$wgOut->addHTML($script);
return true;
}

now if i click to edit button i use the ckeditor editor, there is a method to have 2 button and use both old editor (the default one) and ckeditor?


2nd question when i save a page with ckeditor the contents menu is not created on page with some title item,

i mean this.. Contents

   1 Characteristics
       1.1 Editing wiki pages
       1.2 Navigation
       1.3 Linking and creating pages
       1.4 Searching
   2 History
   3 Implementations 188.65.1.1 (talk) 14:16, 8 March 2013 (UTC)

wgArticlePath.replace for specific URL

Hi, I have no idea what I'm doing. On my Commons .js page, I want the link to go specifically to Special:Upload&uselang=experienced so I don't have to scroll down through a block of text every time. Believe it or not, I tried going through some of the javascript pages around here but this is like reading an alien language to me. Any help would be immensely appreciated. (Rationale: for absolutely zero reason I can figure out, Commons upload wizard just won't work for me, I can't upload anything without going to this page.) Thanks! Keraunoscopia (talk) 23:41, 8 March 2013 (UTC)

Try the following JS (Might not be the current "best practice", but I haven't really been following the js recommended practices, and in any case, it works, which is all that matters):
$( function() {mw.util.addPortletLink ('p-tb', wgScriptPath + "/index.php?title=Special:Upload&uselang=experienced", 'Old upload')});
Note, that puts the link in the toolbar entry of the sidebar, at the bottom. If you wanted it to be in the "participate" sidebar section (like the normal upload link), change 'p-tb' to 'p-participate'.
-----
For uploadWizard - what web browser are you using? Do you have any other information on why it might not work for you? (If you don't mind me asking. Ideally we would want to track down what is wrong with upload wizard to prevent you from using it). Bawolff (talk) 04:47, 9 March 2013 (UTC)
Brilliant!!!! Thank you soooooo so much. I was just trying the wgScriptPath thingy myself when I came across your reply (my way didn't work at all).
As for UploadWizard, I'm currently using Firefox 16.0.2, on Mac OS 10.5.8. The two aren't supposed to mix, but no problems so far. Anyway, looks like I started having problems on March 3. That means through February 25, I uploading dozens of images through UploadWizard fine. I recall doing these. I have a couple images on March 1 and 2 that may or may not have used UploadWizard; I don't see any hidden "uploaded with UploadWizard" categories on any of these images (february or march). So let's just say that at the beginning of March, UW stopped working.
I've since tested it on OmniWeb and Safari. I know, I don't have the best browsers in the world. I cleared the cache, I even logged out/logged in on my computer. I haven't actually turned the computer off/on yet, but I can try that later.
So, to give some details since I probably should have done that on the UW feedback page (and I'll copy this text over there too), Special:UploadWizard shows up fine, with a "Select media file to share" button. I click on it.........oooooookkkkkkkkkkkk never mind, it's working now.
Well thank you for the code! I'll go back into my preferences and turn the UW back on because uploading multiple files on multiple tabs is a pain in the rear end. Not sure what happened, but UW is working for me again. Keraunoscopia (talk) 05:27, 9 March 2013 (UTC)
Glad to help. :) Bawolff (talk) 05:35, 9 March 2013 (UTC)

How to set up a musical infobox

Hi, Following several tutorials, I successed to install infobox. This seems to work, but when I want to use a specific infobox (As this music infobox : http://fr.wikipedia.org/wiki/Mod%C3%A8le:Infobox_Musique_(artiste) ), no box appears on my preview page. There are only marked in red Template: Music (artist). I searched a lot but I have not found how to show my infobox music.

Here is the page I'm trying to build: http://lokalpedia.fr.nf/Kalash. Thank you in advance! 93.29.7.170 (talk) 13:24, 9 March 2013 (UTC)

You need to import the templates to your wiki before they will work. You can get an export to import from here. MarkAHershberger(talk) 23:24, 15 March 2013 (UTC)

can't find CSS after upgrade from 1.15 to 1.20

My site is http://paragogy.net -- after upgrade, everything is working except CSS.

Details of the Apache virtual host config (including rewrite rules in a .htaccess file) are here: https://gist.github.com/holtzermann17/5125846

I'd appreciate any help getting these sorted out. I asked on IRC for some help, and Vulpix pointed out that http://paragogy.net/w/load.php?debug=false loads the main page. I'm not sure why, but apparently that's the thing that needs to be fixed.

Thanks! 137.108.145.40 (talk) 22:07, 9 March 2013 (UTC)

I am also having a similar problem. Both his and my server have the browser report how the MIME type, "text/html", is not "text/css".
The key to both our problems may be the status code 301 Moved Permanently The file exits:
-r-r-r--. 1 apache apache 24358 Mar 4 12:08 /var/www/mediawiki119/skins/common/images/wiki.png
But for whatever reason there is a redirect. 99.9.7.12 09:00, 10 March 2013 (UTC)
What you describe seems to be a different issue: While Joe could not get contents from load.php, the image file skins/common/images/wiki.png, which you say you cannot see, is not displayed using load.php. However, if you generally cannot see images from the folder skins/, your problem might have the same cause as Joe's: Add a rewrite rule to .htaccess, which allows reading files from the folder skins/. 88.130.96.168 12:38, 10 March 2013 (UTC)
What else should be in this .htaccess file? Suggestions for any seperate apache.conf file changes beyond stock?
cat .htaccess
RewriteEngine On
RewriteRule ^(api|load)\.php - [L]
From Firefox web console I have the below:
[08:12:29.793] GET http://192.168.1.10/wiki119/index.php/Main_Page [HTTP/1.1 304 Not Modified 348ms]
[08:12:30.175] GET http://192.168.1.10/wiki119/load.php?debug=false&lang=en&modules=mediawiki.legacy.oldshared%2Cshared%2Cwikiprintable%7Cskins.nostalgia&only=styles&skin=nostalgia&* [HTTP/1.1 304 Not Modified 418ms]
[08:12:30.179] GET http://192.168.1.10/wiki119/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=nostalgia&* [HTTP/1.1 304 Not Modified 348ms]
[08:12:30.589] (this has a blue bar with an x right here) The stylesheet http://192.168.1.10/wiki119/load.php?debug=false&lang=en&modules=mediawiki.legacy.oldshared%2Cshared%2Cwikiprintable%7Cskins.nostalgia&only=styles&skin=nostalgia&* was not loaded because its MIME type, "text/html", is not "text/css". @ http://192.168.1.10/wiki119/index.php/Main_Page
[08:12:30.601] (this has an orange bar with an x right here) SyntaxError: syntax error @ http://192.168.1.10/wiki119/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=nostalgia&*:1
[08:12:30.653] GET http://192.168.1.10/wiki119/skins/common/images/wiki.png [HTTP/1.1 304 Not Modified 196ms]
I'm finding nostaliga gets a passable site. 99.9.7.12 14:18, 10 March 2013 (UTC)
You could add the contents of .htaccess to the Apache conf file. That would give faster results. However, it is not needed. MediaWiki does not need any settings, which you could not do in .htaccess as well. I would add it to .htaccess.
What you need in the .htaccess file depends on whether you use short URLs or not. See Short URLs for possible contents. 88.130.96.168 15:54, 10 March 2013 (UTC)
That's why I was asking about .htaccess or other Apache config needs as I am OK with the URL pattern.....no need for shourt URLs.
The original poster's site still throws syntax errors in Firefox web console mode. In the case of the Apache logs - I see nothing at this point like a lack of file permissions.
The only cold comfort I have at this point is knowing that I'm not alone in this not working right. 99.9.7.12 17:26, 11 March 2013 (UTC)
What Vulpix says nicely shows your actual problem: Between MediaWiki 1.15 and 1.18 a new file called "load.php" has been added to MediaWiki. This file is responsible for loading the skin. However, in your case this does not happen, because of the redirect (which should not be there): Currently on your server, calls to load.php are rewritten to the main index.php script. In most cases this wrong redirect is caused by one of the rewrite rules in .htaccess.
Change your .htaccess file to make sure that calls to load.php (and to api.php btw.) are not rewritten and the right contents should be displayed:
RewriteEngine On
RewriteRule ^(api|load)\.php - [L]
... 88.130.96.168 12:30, 10 March 2013 (UTC)

Sperren von SpecialPages

Ich möchte einige Spezialseiten für normale Benutzer sperren. So zum Beispiel sollen nur Administratoren die Benutzerkonten sehen. Die Lösung sollte in SpecialPage.php liegen. Anscheinend muss dort ein Array definiert warden. Aber bei mir klappt das nicht. Wie und wo muss ich dies einfügen? 178.194.0.194 (talk) 16:46, 10 March 2013 (UTC)

What did you try until now?
Instead of hacking the MediaWiki files, if there was a hook, you should use it.
Apart from that I don't think that modifying SpecialPage.php alone would help you much to hide user names: Information about user names are present at many different places throughout MediaWiki: In the page history, in the recent changes, in the new users log... They can also be called via the API... Restricting access to SpecialPages.php won't help; if you want to see user names, you can easily get them from somewhere else. 88.130.96.168 17:36, 10 March 2013 (UTC)

Error "Unable to load dynamic library..."

I'm moving my 1.17 (PHP 5.2 at each) install to a new host. I installed 1.17 at the new host with database and verified the site worked. I then uploaded all the extensions, images, and Local Settings from the old. Also set the RewriteRules in Apache.

The Rewrite shows up in the address bar but the application doesn't work.

Error logs give me the following with each attempt to access the site"

[10-Mar-2013 09:36:02 America/Denver] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/timezonedb.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/timezonedb.so: cannot open shared object file: No such file or directory in Unknown on line 0

Suggestions? Thanks much! DaveLMW 1.25.1, PHP 5.4.37, MySQL5.1.73-cll SMW 2.2 17:01, 10 March 2013 (UTC)

PHP somewhere tries to load the library timezonedb.so. However, that file is not there. Find the place, where you instruct PHP to load that library. Most likely that is in a php.ini file. Either remove the load call or fix it to point to the correct location of that library. 88.130.96.168 17:39, 10 March 2013 (UTC)
Thanks, I'm pretty new to this but will try to find all that. DaveL (talk) 18:31, 10 March 2013 (UTC)
You can find the php.ini files, which are used by checking the output of a PHP file with the following content:
<php phpinfo(); ?>
The value for extension_dir might be wrong. Another possibility is that in one of the php.ini files, this extension is included using an absolute path, which does not exist. 88.130.96.168 20:23, 10 March 2013 (UTC)

[RESOLVED] Making the front page look different than the rest of the site?

I was wondering if there is a way to make the front page look a bit different than the rest of the site in a skin. All I would want on the front page is a search bar and a menu under like Wowhead, while every other page would be more wiki like (again like Wowhead). I would also like an area for a log in at the top, but it should be on every page. This is my first time working with Media Wiki, and I am just a designer, so knowing this information would help the developer with a lot of frustration. Thanks.

    • Update **

I'm not sure if this will help, but I am using the latest version of MW and the latest PHP under MySQL. Its hosted under Linux. 24.34.28.248 (talk) 20:46, 10 March 2013 (UTC)

Hei!
(Wowhead does not use MediaWiki; neither for the front page, nor for the system itself. But(!) you can customize the design of MediaWiki.)
In your wiki you have a page called MediaWiki:Common.css. On that page you can enter CSS styles, which should be applied for all skins. If your starting page has the name "Main Page", then the following rule would apply for the element with the ID "content" on that page. Since this element contains basically the whole content, the rule would hide the page content:
body.page-Main_Page #content {
display: none;
}
You can add rules of that kind in any way you like. Just check the source code of the page to see, how you can address the elements. In the example above I did that with the ID "content". You could then for example hide the namespaces (ID "p-namespace") with this rule:
body.page-Main_Page #p-namespaces {
display: none;
}
and so on...
Then add some paddings/margins around the elements you want to keep
body.page-Main_Page #p-search {
padding-top: 300px;
padding-left: 100px;
}
and you should be done. :-) 88.130.96.168 21:23, 10 March 2013 (UTC)
Thanks! (I know Wowhead doesn't use MediaWiki, they aren't even a wiki, but I was just pointing out a similar design) 24.34.28.248 23:00, 10 March 2013 (UTC)
I forgot to mention, your answer was so thorough it answered 'every' question I had about that. Good work, keep at it! 24.34.28.248 23:25, 10 March 2013 (UTC)

logins and watchlist via API

I am a beginner at the API. I noticed if I run a command from the browser:

it shows me my watchlist because I am currently logged in. But if I run a similar query from javascript, on a local html page, it says I am not logged in. I assume the first works because of cookies?

The bigger picture: I was thinking of making a page which shows a user's watchlist in a novel way, just as an experiment. I was hopping I could just put a link on wikipedia, and people could visit the page and see their watchlist. But now I'm guessing I might have to do a whole login sequence? Also can a user script resolve this? I was trying to start with an external site just because I figured it would be less to learn. Silas Ropac (talk) 23:26, 10 March 2013 (UTC)

The watchlist is private, so yes, people need to login before they can access it. The only way to access other user's watchlist without log in as that user is to use the wltoken parameter, which every user can set in their preferences. Ciencia Al Poder (talk) 10:25, 12 March 2013 (UTC)

HTTP 500 error when localsettings.php permissions set to 600

I've migrated a site to a new host and domain. Everything went perfectly and the site is working, except.. The permissions for LocalSettings.php when I moved everything across defaulted to 744. When I changed them to 600 to secure the site it stopped working with a HTTP 500 error. 24.90.146.231 (talk) 00:33, 11 March 2013 (UTC)

Try 640. 640 is nice. ;-) 88.130.103.179 03:28, 11 March 2013 (UTC)
Doesn't make any difference. I've tried various combinations and giving public read permissions is the only one that fixes the issue. Obviously I can't do that as the file contains the DB username and password which I don't want to be public.
I've done some further research and this problem appears unique to this host. Two other wikis I manage on two other hosts work fine with 600 permissions, including a carbon copy of the site I'm having trouble with. 24.90.146.231 13:54, 11 March 2013 (UTC)
If the server cannot read LocalSettings.php, if you take away group and "everybody" permissions, check the owner of that file. It should be the webserver user. That way you do not need to give the group permission. Alternatively the file should at least be in his group. Then you would have to give permissions to the user and the group. In any case permissions for everybody should not be needed. If it does not work without read permissions for everybody, then the owner (and/or at least group) of the files/folders should be changed.
If you are on shared hosting and can't change the owner/group of your files/folders yourself, ask your hoster. He should be able to. ;-) 88.130.103.179 15:24, 11 March 2013 (UTC)
Thanks for the help so far guys,
I am indeed on shared hosting. I raised a ticket with the host company and they changed the permissions to 605, which does fix the issue. However I'm unsure if having public execute permissions is secure? Could this cause a problem and should I ask the host to change the owner for the file?
UPDATE:
I got the hosting company to change the owner and permissions as recommended above. 24.90.146.231 15:46, 11 March 2013 (UTC)
605? Seriously? Setting permissions to 605 is at least really uncommon. I do not know specific security implications, but with 605 permissions still everybody can read and execute the file. There only needs to be a security whole anywhere on the system (not even necessarily in your software, but maybe somewhere on the account of any other user) and people can directly see your data... Lower permissions for "everybody" would surely make sense.
So yes, ask them to fix the ownership of the file (btw of all your files and folders). Usual settings are:
  • owner: your personal user account (that way you can still modify the file via FTP or shell) and
  • group: the group of the webserver user (so that the webserver is allowed to access the file) 88.130.103.179 17:03, 11 March 2013 (UTC)

security issues migrate wikimedia

I moved my wiki to another server.

Made a new dbase

Import the old one

Copy the complete wiki map

Rights on image folder 777 (and apply for all files inthe folder.

I'm just not sure about security. What maps or files do I have to check. What kind of (spam?) problems may occur.

Gijs osxpert.nl 94.210.86.147 (talk) 09:11, 11 March 2013 (UTC)

777 for the image folder does not sound good. Try, if the images still can be displaed, if you use 750 (might be the case). If so, that is enough.
Security should be fine, if you use one of the latest versions of MediaWiki 1.20.3 or 1.19...5(?) and the newest versions of the extensions, which you might use. I do not understand the question for the folders(?) and files to check. All the files in that folder should either come with MediaWiki (and so be updated when you do an update) or they come from you or your users (images, extensions and custom skins). In the second case you have to take care to update them (custom skins and extensions) as needed.
If you have spam problems, combating spam should help. 88.130.103.179 12:45, 11 March 2013 (UTC)

[Resolved] Concept combining several categories

I am having troubles creating a concept, that combines three categories apple, orange, strawberry. Since the user manual is not helpful, can anybody please help me to create a concept, that contains pages of three categories?

---

Neither of these implementations work: {{#concept:[[Category:Apple]][[Category:Orange]][[Category:Strawberry]]}}

{{#concept:{{#compound_query:[[Category:Apple]]|[[Category:Orange]]|[[Category:Strawberry]]|mainlabel=-}} }}

I would appreciate any idea! Thank you very much in advance.

Kind regards

OR was missing. Freckle (talk) 15:24, 11 March 2013 (UTC)

Can you merge two wikis?

Would it be as simple as importing content from one media wiki to another? How do you not overwrite multiple pages? If you can export the file, what is that process? 71.239.45.129 (talk) 19:15, 11 March 2013 (UTC)

See Manual:Importing XML dumps and meta:Help:Import#Merging histories and other complications Ciencia Al Poder (talk) 10:33, 12 March 2013 (UTC)

Categories in mediawiki sidebar in Vector skin

How to show categories and subcategories in sidebar of Mediawiki 1.20.3 in Vector skin. Please help me please.I have used CategoryTree extension but dont know syntax is rightly used in LocalSettings.php I got one website using this http://edutechwiki.unige.ch/fr/Accueil

Please tell me how to dislpaly categories in vector skin? Ksanjeet (talk) 20:20, 11 March 2013 (UTC)

[RESOLVED] MW moving, what version?

I know that when you move a site to a new hosting you want to put it on the same version. My question is should it be the same release of that version?

I'm moving my 1.18.0 and want to know if I should install 1.18.6 at the new hosting or the original 1.18.0? (plan to upgrade to 1.20 after the move)

Thanks DaveLMW 1.25.1, PHP 5.4.37, MySQL5.1.73-cll SMW 2.2 21:00, 11 March 2013 (UTC)

In the end you should use MediaWiki 1.18.6. The way you get there basically is the one you like most. If you do not know the host, maybe you first want to check that your old 1.18.0 system is working correctly on the new host before you do any further changes. If you know it will work correctly, you could also directly use the 1.18.6 source code on the new host. Do it as you like. :-)
And yes, do an update to 1.20 afterwards; 1.18 is no longer updated. 88.130.103.179 21:16, 11 March 2013 (UTC)
Thanks DaveL (talk) 21:21, 11 March 2013 (UTC)
What about PHP. Current install is on 5.2. New server is defaulted to 5.3. Will this create problems?
Thanks DaveL (talk) 02:20, 12 March 2013 (UTC)
MediaWiki 1.18 runs fine under PHP 5.3. If you run into problems, then maybe because of extensions, which you use. Trying to update them might help; if there is no version for 1.18, which runs under PHP 5.3, then maybe there is one for MediaWiki 1.20. However, PHP 5.3 has been around for quite some while already and I think it is rather unlikely that you run into major trouble.
And you need MySQL 5.0 at least.
All these information can also be found in one of the text files, which come with the MediaWiki package; I think they are in the file called RELEASE_NOTES or so. 88.130.90.157 11:31, 12 March 2013 (UTC)
Thanks again, very much appreciated!!! DaveL (talk) 20:13, 12 March 2013 (UTC)

how can i add a link/button in top bar near page..discussion..edit..ecc.. 188.65.1.1 (talk) 08:27, 12 March 2013 (UTC)

The simplest way is using JavaScript, see ResourceLoader/Default modules#addPortletLink. If you need a specific example you should tell us the skin you're using. Ciencia Al Poder (talk) 10:39, 12 March 2013 (UTC)

Internal error MediaWiki 1.20 - PHP

I updated MW version 1.13.2 to 1.20.3. Before, I updated PHP from 5.2.17 to 5.4 on the server. The installation went well. In the Webinstallation it recognized PHP 5.4 when it checked the System-Requirements and said it's ok to install the new version. After the installation, when I cklicked on the button "you can use MediaWiki now" I got following message:

MediaWiki 1.20 internal error MediaWiki 1.20 requires at least PHP version 5.3.2, you are using PHP 5.2.17. etc. 88.79.177.200 (talk) 08:35, 12 March 2013 (UTC)

Create a php file on the server on the same folder MediaWiki is installed with this content:
<?php
phpinfo();
And check what version it gives you. Ciencia Al Poder (talk) 10:42, 12 March 2013 (UTC)
It also says php version 5.4.12 88.79.177.200 11:05, 12 March 2013 (UTC)
I gave up with MW 1.20 and deleted it from the server. I use version 1.19 now and it works just fine. 176.94.42.248 10:43, 13 March 2013 (UTC)

resourceLoader and extensions

Running MediaWiki 1.20.2 with PHP 5.3.3 and MySQL 5.1.x

I experienced that resourceLoader is somtimes not fast enough although we are using "$(document).ready(function(){" for 3party Js-libraries. This causes runtime errors which could have been avoided by using "$wgOut->addHeadItem" and or the "position:top"-flag while registering modules (where the last one is sometimes not enough). The topic (Load delay) is also mentioned here: Link to talk page

Are there any new approaches to solve this problem, discussed or practised by the MW-community?

Thanks and cheers, Steve Steviex2 (talk) 13:57, 12 March 2013 (UTC)

One of the primary authors of ResourceLoader -- Krinkle -- said in the thread that you linked to that this exact issue was going to be fixed in the next version of RL. MarkAHershberger(talk) 23:38, 15 March 2013 (UTC)
That thread is from 2011. Is there really still some development branch of ResourceLoader that I'm not aware of, or has this been fixed in (the upcoming) MediaWiki 1.21? PleaseStand (talk) 08:41, 19 March 2013 (UTC)
I pointed to the guide for developers which addresses this. MarkAHershberger(talk) 14:57, 19 March 2013 (UTC)
See the guide for developers which says:
As of MediaWiki 1.18 there are multiple load queues in ResourceLoader (symbolically named "top" and "bottom"). Modules can set their "position" property (in $wgResourceModules) to one of these to force loading in either queue. A good use of a "top" module is styling HTML content generated by PHP. The mediawiki and jquery module are loaded from the top by default and can always be used.
MarkAHershberger(talk) 14:56, 19 March 2013 (UTC)
This is no propper answer to our questsions. The question is: "Is there any progress which solves the problem". As I mentioned the positioning of modules is sometimes not enough. It is sill a runtime error/problem. What are the strategies to avoid this except module positioning? Are there any new approaches? As PleaseStand says the last dev thread was from 2011. Steviex2 (talk) 15:37, 19 March 2013 (UTC)
If position isn't doing what you need, then you should file a bug.
Alternatively, if you can post a specific example of the problem, we might be able to help you resolve it. Specific examples help with bug reporting, too. MarkAHershberger(talk) 15:45, 19 March 2013 (UTC)
It's actually no bug if we make vars and methods global again.
It's a question of performance.
Thank you, I will wait what the next RC will offer. Steviex2 (talk) 17:29, 19 March 2013 (UTC)
So, to be clear, you're saying that right now everything acts as expected, but you want performance improved? That doesn't match with your initial post: "This causes runtime errors". If something is causing errors, there is room for a bug to be filed.
The next RC for MediaWiki -- 1.21 -- will be out in a few weeks.
It will be based off of trunk, and you can test that out now will this snapshot: https://toolserver.org/~krinkle/mwSnapshots/#!/mediawiki-core/master MarkAHershberger(talk) 17:50, 19 March 2013 (UTC)
Yes Mark the runtime error disapears, If I set some third party objects and methods global again. But I still see the markup loading quite slower then with addHeaderItem instead. I even get a wrong markup output temporary/sometimes. So I would classify this mainly as performance issue.
c u Steviex2 (talk) 18:07, 19 March 2013 (UTC)

Mediawiki skins and editor toolbar not working on new installation

I just installed Mediawiki 1.19.3 RPM as downloaded from EPEL. I am using PHP 5.3.3. MySQL 5.1.67.

The skins that are shipped with Mediawiki, such as standard, monobook, etc do not work. The error I get is: Class SkinStandard not found; skipped loading Class PEAR_Error not found; skipped loading

Curiously enough, if I try to use my custom skin, the errors go away. This is surprising since all of the skins, including my custom skin, are at /var/www/mediawiki119/skins. I would have expected my custom skin to break, not the Mediawiki skins.

Secondly, using my custom skin, the editor will not display the toolbar. And the error in the log is: Class SkinMda not found; skipped loading Class PEAR_Error not found; skipped loading

Note, Mda is the name of my custom skin. So it is obvious that there is something wrong somewhere that is preventing Mediawiki from seeing the skins from the editor page. The only reports of this problem I can find are to link /var/www/mediawiki119/skins to /usr/share/mediawiki119/skins, which I have already done. And since my custom skin works, except from the editor, I assume I have everything in the correct place.

Also note that php-pear is installed, so I do not know why I am getting the PEAR_Error error message either.

Thanks in advance for your help.

-Roger Rvmoye (talk) 14:28, 12 March 2013 (UTC)

This might be too obvious so I guess you've already done this, but have you checked folder access permissions on the server?
And I also assume you've found already http://www.mediawiki.org/wiki/Manual:Errors_and_symptoms#Class_SkinStandard_not_found.3B_skipped_loading AKlapper (WMF) (talk) 11:09, 14 March 2013 (UTC)

Upgrade MediaWiki & extensions in one step? Is it possible?

Hi every one…

Is it possible to upgrade mediawiki version & all extensions in my site by one step? Through specific program? You may consider that I'm running over 7 Mediawiki templates and a lot of extensions in each one???

Thanks in advanced 188.66.241.172 (talk) 15:35, 12 March 2013 (UTC)

You could surely write a script that does that, but I do not know of one, that would already exist. 88.130.90.157 16:53, 12 March 2013 (UTC)

Moved site, content not showing

I'm in the process of moving to a new host. I've installed the same version as old, run the setup with a Mysql database, uploaded all the extensions, images, LocalSettings and after turning off a few extensions I have a MW working installation but none of my content from the old site is showing up. No images or pages or any of the content.

Any suggestions on what to check would be much appreciated. Thanks

Old host: MW 1.18, PHP 5.2, Mysql 5.0

New host: MW 1.18, PHP 5.3, Mysql 5.1 DaveLMW 1.25.1, PHP 5.4.37, MySQL5.1.73-cll SMW 2.2 22:34, 12 March 2013 (UTC)

I see two possible problems:
You say you have run the setup "with a MySQL database". Did you also import your old database into it? If you did not import your data, then it is clear that MediaWiki does not show it.
On the new host, do you have new MySQL credentials? Nearly always that is the case. Adjust the data in LocalSettings.php accordingly! 88.130.90.157 22:47, 12 March 2013 (UTC)
Yes I imported the database from the old. but just discovered the whole import didn't actually happen. So now I'm on a trail to figure out how to increase the upload limit in PHPmyadmin or how to do it from the command line.
Thanks for the help DaveL (talk) 23:17, 12 March 2013 (UTC)
If you cannot use phpmyadmin (e.g. because of a memory or file size problem), the easiest way will be to use the command line: Use mysqldump on the old server to create a dump file. You can copy this file to the new server via wget, which should be much faster than using FTP. Then use mysql on the new server to import it. 88.130.89.47 13:06, 13 March 2013 (UTC)

when i access the wiki by another local computer, the template don´t load, only texts and images

when i access the wiki by another local computer, the template don´t load, only texts and images Anyone can help me? Raion~mediawikiwiki (talk) 21:00, 13 March 2013 (UTC)

Wrong $wgServer? 88.130.89.47 21:55, 13 March 2013 (UTC)
See Manual:Errors and Symptoms#The wiki appears without styles applied and images are missing. Ciencia Al Poder (talk) 10:29, 14 March 2013 (UTC)

Can I change letters in urls from cyrillic to latin letters in my russian wiki?

Hello all! I use russian wiki, and when I create a new article wiki gives a url with russian letters in it, for example http://www.wikijournal.ru/index.php/Политика, so is possible to convert this url using some extensions like this: http://www.wikijournal.ru/index.php/Politika
I need it, because I have some problems with social media buttons and its counters, becouse the url should be in latin letters to make counters workin properly! Thx for help! Fokebox (talk) 10:07, 14 March 2013 (UTC)

We're in 2013! It's a shame that there are still problems with non-ASCII letters...
First of all, be sure that you use the urlencoded URL to the social media: For example, http://www.wikijournal.ru/index.php/%D0%9F%D0%BE%D0%BB%D0%B8%D1%82%D0%B8%D0%BA%D0%B0 instead of http://www.wikijournal.ru/index.php/Политика since it will then contain only ASCII letters, but will be the same URL anyway.
Another option is to do a redirect from one page to the other. Ciencia Al Poder (talk) 10:41, 14 March 2013 (UTC)

Possible to change a Template and have it update already created pages?

We are looking at MediaWiki to replace our current technical documentation system. The feature that we are looking for, and I am not sure if it is possible or not, is to have a page layout/template that has all of the fields for each client. But, if we decide to make a change to the template in the future we would want the change to take place across all pages using that template. Is this possible? If so, how?

Thanks. 71.101.82.114 (talk) 14:17, 14 March 2013 (UTC)

If you change a template, changes should propagate to the other pages automatically -- when you visit them they should show up updated.
Note that some things like link tables might not update immediately; that's done in the background via the job queue. brion (talk) 23:30, 14 March 2013 (UTC)
In doing some testing I found you are correct, but I can't get it to work the way that I was hoping. For example, we have 2 clients and we need to document their network. Client A has IP address: 192.168.1.1 and Client B has IP address: 192.168.2.1
I wanted to use a template to have each page show an area to fill in the IP Address. But, I can't seem to get it so that I can edit the area created by the template... at least not on each individual page. If I can get it so that I can add data to each page (Client A's page and Client B's page) using the same template. Then, later down the line if we need to add a spot for Secondary IP Address, I can just change the template and get the spot to fill in for Secondary IP Address to show up on the page for Client A and Client B without removing any of the previous information.
Does that make sense? 71.101.82.114 14:50, 15 March 2013 (UTC)
Of course MediaWiki can do this. See Help:Templates#Parameters. If you want to query the data (or even enter it using individual text boxes and drop-down menus), you might also be interested in Extension:Semantic MediaWiki. In particular, Extension:Semantic Forms builds on this use of templates. PleaseStand (talk) 08:53, 19 March 2013 (UTC)

Warning messages after installation

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, I installed Mediawiki on the server as mentioned in the install document. Everything went fine but at end of installation when I browsed for the site. It gives me following error lines at start of the page:

Warning: file_exists(): open_basedir restriction in effect. File(C:\Windows\TEMP) is not within the allowed path(s): (c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata) in C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php on line 2502

Warning: file_exists(): open_basedir restriction in effect. File(C:\Windows\TEMP) is not within the allowed path(s): (c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata) in C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php on line 2502

Warning: file_exists(): open_basedir restriction in effect. File(C:\Windows\TEMP) is not within the allowed path(s): (c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata) in C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php on line 2502

Warning: file_exists(): open_basedir restriction in effect. File(C:\Windows\TEMP) is not within the allowed path(s): (c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata) in C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php on line 2502

Can anyone tell whats the issue?

Regards 115.111.204.162 (talk) 14:22, 14 March 2013 (UTC)

Hei!
That one should be easy to fix. PHP has a setting called open_basedir. Basically it disallows PHP to access files, which are not inside a certain folder (or inside a list of certain folders).
In your case, the path for temporary files is C:\Windows\TEMP and MediaWiki has to access this path. However, this path is not one of the allowed paths for open_basedir, so that you get this error.
The solution is to modify php.ini and to add "C:\Windows\TEMP" so that the entry basically looks like this:
open_basedir = "c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata;C:\Windows\TEMP"
You can check, which php.ini file to modify and if the new value has been set by checking the output of a script with the content:
<?php phpinfo(); ?>
After each change, restart the server and try again. 88.130.106.64 22:26, 14 March 2013 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Errors upgrading 1.16.to 1.20

Previous MediaWiki version 1.16.5 Updating to 1.20.3 PHP 5.4.12 MySQL 5.1.67 I am updating via the command line as per the MediaWiki Manual.

Problem #1

... Populating category table, printing progress markers.
Warning: Illegal string offset 'LIMIT' in w/includes/db/Database.php on line 953
A database error has occurred

Query: SELECT COUNT(*),COUNT( (CASE WHEN Array THEN 1 ELSE NULL END) ),COUNT( (CASE WHEN Array THEN 1 ELSE NULL END) )

FROM `mw_categorylinks`,`mw_page` WHERE cl_to = 'Bey-Partial' AND (page_id = cl_from)

Function: Category::refreshCounts Error: 1054 Unknown column 'Array' in 'field list' (db371450277.db.1and1.com) ...

'Bey-Partial' in the above query is a category name. The Category::conditional method seems to be returning the string 'Array' somehow, even though the code looks correct (checking is_array).

Problem #2

After the above error is handled, I get this: ... Fatal error: Cannot redeclare wfProfileIn() (previously declared in w/includes/ProfilerStub.php:18) in w/includes/profiler/Profiler.php on line 38

...

I have followed the Profiler instructions updating StartProfiler.php, and have tried this both with and without StartProfiler.php in the root wiki directory.

Problem #3

Thinking the command line didn't work, I tried surfing to /mw-config/ per the update instructions, and get this: ... Fatal error: Call to undefined method BitmapHandler::canRotate() in /homepages/14/d291724220/htdocs/pdxrp/w/includes/Setup.php on line 235 ... This is after I set $wgEnableAutoRotation = false -- still not sure why I needed to do that but it allowed the command line script past an earlier error. 76.27.245.31 (talk) 19:35, 14 March 2013 (UTC)

You have so strange and different errors, that I think something fundamental went wrong when you did the update.
For the first problem, I would replace the database with a backup and try to run update.php again. If you ran it once and it finished partly, then you have no guarantee, that when you run it again, it will add all the missing stuff, which had not been added before. It is well likely that after an incomplete update the missing part of the DB update is not done at all. This situation is easiest to be fixed, by replacing the incompletely-updated DB with a backup and by then running update.php again.
Before you do that, maybe you want to make sure that the archive with your MediaWiki files is not damaged and that when you copied over the new files, really all old files were removed and all new files were added. Sometimes there are stange errors, when old files are still there. Or also when not all new files have been added.
The second problem should really be caused by StartProfiler.php. Delete it. If you still get this error, check, that you have cleared all caches (you might e.g. have an opcode cache active).
The third problem (undefined method BitmapHandler::canRotate()): No idea. Looks like something with the graphics functions is wrong. Do you have an extension installed, which changes something with graphics? Or which adds functionalities there? But maybe that already is solved, when you made sure that your update really is not broken (see notes above). 88.130.106.64 22:19, 14 March 2013 (UTC)
You got it right. I restored from backup and did the whole process over, and with one hiccup (needed to set $wgLocaltimezone in LocalSettings.php because the timezone get() method in Setup.php wasn't working for me), update.php executed successfully. I suspect something fouled up in the FTP transfer. Thanks for the advice, I owe you a beer.
PS Back up before updating! 76.27.245.31 00:13, 15 March 2013 (UTC)
> Thanks for the advice, I owe you a beer.
I'll come back to that. ;-)
> PS Back up before updating!
Always! :-) 88.130.106.64 00:24, 15 March 2013 (UTC)

Need to exclude Infobox information

Hi, I want to create a wiki Main page that pulls content from another article page but excludes the infobox template and infobox content. For example, I want my Main_Page to show content from the article http://en.wikipedia.org/wiki/The_Dakota but exclude The_Dakota's infobox information (without affecting the layout and infobox in the original article at http://en.wikipedia.org/wiki/The_Dakota). What tag would I use to do this?

Please also provide an example about how to do this. Thanks for your help. Peter321 (talk) 04:44, 15 March 2013 (UTC)

Do it with CSS! 88.130.101.211 05:06, 15 March 2013 (UTC)
Wrap the infobox in The_Dakota article inside a <noinclude></noinclude> tag. It will be displayed on the article, but not in pages that transclude that page. Ciencia Al Poder (talk) 10:36, 15 March 2013 (UTC)

What is better? using cashing or not?

Hi every one...

If you use a Mediawiki with more than 60000 pages... & growing

which is better? using cashing or not?

Thanks 145.255.68.128 (talk) 22:59, 15 March 2013 (UTC)

You should use caching. Why wouldn't you? MarkAHershberger(talk) 23:01, 15 March 2013 (UTC)
Is it Settings for object caching?
by Use Memcached?? 145.255.68.128 00:28, 16 March 2013 (UTC)
See Manual:Cache for more information than I can give you. MarkAHershberger(talk) 01:36, 16 March 2013 (UTC)

$wgNamespaceAliases usage

Last comment here was four years ago... I'm wondering because I want to offer some shortcut NS aliases on my wiki. This documentation is poor, and it would be great if a snippet of Wikipedia's actual $wgNamespaceAliases was added to make it more clear how it works. I'm assuming that the following code should work to offer shortcuts similar to W:WP:SC?

$wgNamespaceAliases = array(
        'U' => NS_USER, 'UT' => NS_USER_TALK,
        'P' => NS_PROJECT, 'PT' => NS_PROJECT_TALK,
        'F' => NS_FILE, 'I' => NS_FILE, 'FT' => NS_FILE_TALK, 'IT' => NS_FILE_TALK,
        'MW' => NS_MEDIAWIKI 'MWT' => NS_MEDIAWIKI_TALK,
        'T' => NS_TEMPLATE, 'TT' => NS_TEMPLATE_TALK,
        'H' => NS_HELP, 'HT' => NS_HELP_TALK,
        'C' => NS_CATEGORY, 'CAT' => NS_CATEGORY, 'CT' => NS_CATEGORY_TALK
    );

{{U|Technical 13}} (etc) 01:04, 16 March 2013 (UTC)

Four years ago?
You can see the Wikipedia configuration on noc.wikimedia.org: see here.
You may also be interested in this request for configuration changes. MarkAHershberger(talk) 01:34, 16 March 2013 (UTC)
That is good information. Does each one "have" to be on it's own line, or is it okay to group them as in my example above? I know MediaWiki can be picky and touchy about some things. ShoeMaker   ( Contributions Message )   01:39, 16 March 2013 (UTC)
That is PHP code, so it just has to be valid PHP code. You can put more than one namespace on a line. MarkAHershberger(talk) 02:08, 16 March 2013 (UTC)

Searching #ifdef

Whenever The Term #ifdef is entered into the search bar, the Page refreshes. I Found This out on nethackwiki.om But i tested on This Wiki (mediawiki.org) And the same thing happened Rancalred (talk) 17:33, 16 March 2013 (UTC) UPDATE: A regualer # Always return's to the home page Rancalred (talk) 18:29, 17 March 2013 (UTC)

Hi!
I see what you mean. Was that maybe intended to be a feature? In HTML pages you use "#" for anchors. Then searching for "#Versions" on a page, which has a section called "Versions", should bring you down to that section.
However, that does not work correctly: Searching for "#(something)" always brings you to the main page, with the anchor appended (so seems like it should allow to search for anchors).
I think it should not return you to the mainpage with the anchor, but to the current page with the anchor. If you ask me, the current behaviour looks like a bug. Maybe you want to open an issue in the MediaWiki bugtracker. 88.130.65.121 00:22, 18 March 2013 (UTC)

non-www redirect for mediawiki

Hello. How how to make 301 redirect from www.site.com to site.com. Have read the entire internet and not found solutions.

install directory - /w
in root directory - .htaccess

with the following content

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.site.com/w
RewriteRule ^(.*)$ http://site.com/w/$1 [r=301,L]
RewriteRule ^wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^wiki/*$ /w/index.php [L,QSA]
RewriteRule ^/*$ /w/index.php [L,QSA]

Is that correct?. How do you do a 301 redirect on own wiki-sites? Vladimir Kalyuzhny (talk) 20:58, 16 March 2013 (UTC)

Hi Vladimir!
You can get a redirect from www.site.com to site.com with lines like these in .htaccess:
RewriteCond %{HTTP_HOST} ^www\.site\.com$ [NC]
RewriteRule (.*) http://site.com/$1 [L,R=301]
The last three lines of what you posted are not part of that redirect. They redirect calls to index.php, the MediaWiki script and pass parameters accordingly. The first two lines, which you have posted, do that. 88.130.65.121 20:50, 17 March 2013 (UTC)
Thanks. It works. Vladimir Kalyuzhny (talk) 13:29, 23 March 2013 (UTC)
It's much simpler to do this with ModAlias, and has better performance.
http://httpd.apache.org/docs/2.4/mod/mod_alias.html#redirectpermanent
Put that directive inside a vhost section targetting www.site.com, and define a different vhost for site.com where the normal rewrite rules for the wiki apply.
Also, be sure to update $wgServer, otherwise you'll have problems with forms (editing, searches, preferences) if they're pointing to www.site.com. Ciencia Al Poder (talk) 10:52, 18 March 2013 (UTC)

Optimal Short URL ruleset

  • MediaWiki 1.20.3
  • PHP 5.4.12
  • MySQL 5.5.29
  • Apache 2.4.3
  • Windows 7

Using Mediawiki as a personal wiki (that I might make available publicly sometime in the future), used some of the rewrite rules I've previously employed to activate short URLs for another wiki before I read the MW-Short URL/Apache manual. Mediawiki is in a different folder relative to document root (it's just the way the bitnami stack installed).

httpd.conf:

RewriteEngine On
RewriteRule ^/mediawiki/(.*):(.*)	/mediawiki/index.php/$1:$2 [QSA,PT]
Alias /mediawiki/ "P:\Program Files/apps/mediawiki/htdocs/"
Alias /mediawiki "P:\Program Files/apps/mediawiki/htdocs"

apps/mediawiki/htdocs/.htaccess:

RewriteEngine on
RewriteBase /mediawiki
RewriteCond %{REQUEST_FILENAME}		!-f
RewriteCond %{REQUEST_FILENAME}		!-d
RewriteRule (.*)			index.php/$1 [QSA,PT,L]
RewriteRule ^/*$			index.php [QSA,PT,L]

LocalSettings.php:

$wgArticlePath = "/mediawiki/$1";
$wgUsePathInfo = true;

Questions:

1. Are there any problems with using my ruleset compared to the recommended ruleset in the manual?

2. Are there any associated performance issues with the ruleset I employed? Are there optimal rulesets (performance-wise) that I should use instead? 112.205.68.246 (talk) 21:20, 16 March 2013 (UTC)

In your .htaccess:
  • The final RewriteRule will never be used and is not needed.
  • I think the final RewriteCond isn't needed, either.
In your httpd.conf:
  • The RewriteEngine and RewriteRule bits aren't needed.
  • The first alias is not needed.
Other than that, it looks good to me. If you try the above changes and they cause problems, let me know. MarkAHershberger(talk) 13:59, 18 March 2013 (UTC)
There is one problem in particular: You're using the same path as virtual path and real path. This is problematic. Please see Manual:Short URL (in particular: Manual:Short URL/Apache).
The (.*):(.*) part in your httpd.conf looks rather suspicious. Probably a hacky workaround you came up with to aid the conflict between the directory name and the article path.
You don't need to have both htaccess and httpd.conf. Choose ether one or the other (if you can choose, httpd.conf is better than htaccess). If you properly configure httpd.conf, the entire htaccess can (and should) be deleted.
I could point out what's wrong with every line, but I'd recommend starting over (remove all of it) and just read Manual:Short URL/Apache.
Why are you doing it differently? Your settings may or may not work, but whatever the case: they will be non-standard and unsupported. The settings in the manual have been perfected over a long time. They're probably the most efficient and they'll be supported. Krinkle (talk) 19:45, 20 March 2013 (UTC)

mediawiki.log.js access denied when backing up (copying) mediawiki folder

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.


Greetings,

I have recently downloaded and configured (basic), via a your tutorial, the mediawiki application. It install successfully. Now I am trying to back-up the mediawiki main folder to an external hard drive, but it keeps failing with the error:


Error copying file or folder:

Cannot copy mediawiki.log access is denied
Make sure the disk is not full or write-protected
and that the file is not currently in use.

I'm using Win XP SP3. The only file that won't copy is mediawiki.log.js (there is no "mediawiki.log" file).

Here is what I have checked/tried already:

   1) Space is not the issue because there is over 50GB available on the destination disk.
   2) Changed the main mediawiki folder in my www directory (WAMP) to have "read-only" unchecked.  Applied this to all subfolders.
       * Strangely, the folder keeps setting permissions back to show that some files are not read-only (solid green box as opposed to the green checkmark).  Not sure if it makes a difference or not, but thought I'd mention it.
   3) Sharing tab: I set it to share the folder & give everyone all permissions.
   4) Security: Everyone already has all permissions as default.
   5) Disable real-time protection on my Antivirus (Microsoft Security Essentials)
   6) Tried since copying the file (mediawiki.log.js) or its parent folder did not work in Windows, I also tried from the command line, which failed as well.  All other files in the folder copy fine.


Am I the first person to report this error? I'm frustrated now because all the tricks i know didn't work, which is why I'm seeking help. My supposition is that the mediawiki developers "locked" that file for security reasons, assuming it would be a security liability on a production site. Am I right? If so, I need to know how to unlock it so I can do what I want with it on my local personal server. If not, please advise on how to proceed because I've done everything I can think of already.

Your help is greatly appreciated.


Regards,

-CodeSlayer2010 98.246.37.227 (talk) 03:15, 17 March 2013 (UTC)

Hi!
The file you mention is resources/mediawiki/mediawiki.log.js, right?
There should be nothing special with this file. I am also running some MediaWiki installations and I also do regular backups, but I never had this problem.
Maybe something is broken with the file permissions? Try deleting it and replacing it by a new copy. Maybe the problem is solved after you restarted your PC? 88.130.65.121 21:06, 17 March 2013 (UTC)
Mediawiki 1.20.2 / PHP 5.4.7 / MySQL 5.0.51
on our apache we have a intranet and an internal WIKI running. A few times a day the intranet en the wiki is hanging. We have to stop and start the apache (2.4). Investigation shows that at those moments the port 80 is not available. We did some testing. Seems like when we remove WIKI from the apache and only run intranet, there is no problem. when we add wiki back to the apache the problem occurs again.
Any idea what the problem may be? 81.188.106.147 13:27, 21 March 2013 (UTC)
Do your logs show anything when this happens? Have you tried enabling the debug log? MarkAHershberger(talk) 16:40, 23 March 2013 (UTC)
@CodeSlayer2010 There is nothing sensitive or special about mediawiki.log. There is no lock of any kind on that directory or the files within.
If you download a fresh copy of MediaWiki, does it work with that? I suspect something or someone might have messed with your mediawiki install and messed up something on that directory (at random / by accident). Krinkle (talk) 19:36, 20 March 2013 (UTC)
@Krinkle & @88.130.65.121: Thanks for that info and suggestions. Since you say that there is nothing special about mediawiki.log (and yes 88.130.65.121 I mean resources/mediawiki/mediawiki.log.js :), I'll have to conclude that there must be a hardware issue on my drive, perhaps bad sector?
If I download a new copy of mediawiki.log.js, is there anything custom about it? Will it erase my data? It is just the script that generates the actual log, so it should be safe to overwrite, correct?
Thanks! 98.246.37.227 00:17, 24 March 2013 (UTC)
No, this file just comes with MediaWiki and has nothing custom.
Yes, you can download your MediaWiki version again, extract that file out of the newly downloaded package and overwrite your old file with it. It will not change anything with any data in your wiki (which for the most part is stored in the database).
I dont't know, if what you describe can be caused by bad sectors; in that case I would expect that you can no longer read the file (e.g. when you open it in a text editor that does not work or you only see garbage).
I don't know what causes your problem. I once had the case that files were extracted in a folder and extracting them seemed to work (at least it did not give an error and the files were extracted). However, a few of the deepest files finally had a path and file name, which was longer then should be possible. Windows was unable to access the files. Through the tar tool, which I used to extract them I could finally remove them again... Maybe something like that is your problem? 88.130.115.230 00:35, 24 March 2013 (UTC)
Possibly relevant: a year later, my antivirus has automatically quarantined mediawiki.log.js from mediawiki-1.22.2 for apparently containing the "Heur.Dual.Extensions" malware. It plucked the file out of the directory and quarantined it. 46.65.19.236 13:56, 20 February 2014 (UTC)
"Heur.Dual.Extensions" sounds like it's only a heuristic alarm; the antivirus has not actually found something it knows in the file, it only thinks it might be suspicious. If the file is a true copy of what comes with the MediaWiki package, I think this is a false positive and you should inform your antivirus provider so that they can check and then maybe fix their definitions. 88.130.106.163 14:48, 20 February 2014 (UTC)
Good point, I didn't realise that "Heur" was an abbreviation, and the file clearly has two extensions, "log" and "js"! Disappointed that my antivirus (Comodo) wasn't clearer about what it was doing there. 46.65.19.236 16:37, 20 February 2014 (UTC)
Maybe the antivirus program is the source of the problems you're having, if it blocks access to that file while you want to move it or when apache access it to serve the file to clients. Ciencia Al Poder (talk) 11:13, 21 February 2014 (UTC)
Ciencia, if you had read before posting you would have seen that we already know that. 88.130.92.144 16:19, 21 February 2014 (UTC)
How did you came to that conclusion? Ciencia Al Poder (talk) 18:03, 21 February 2014 (UTC)
Do you really want to discuss that now? How about to instead start doing something useful? 88.130.92.144 01:04, 22 February 2014 (UTC)
Excuse me, but it wasn't me who started posting useless replies here. Looks like you don't like the game you started. Ciencia Al Poder (talk) 12:22, 22 February 2014 (UTC)
Just that you get me right: I don't have any problem with you believing it was not the antivirus; you can also believe in Allah, Christ or the Flying Spaghetti Monster. If you have evident proof that it cannot have been the antivirus, I am happy to hear. But until then... 88.130.100.150 13:46, 22 February 2014 (UTC)
Maybe Comodo Antivirus has options to tun heuristics to a lower level or maybe completely off. Maybe it also offers a possibility to set up exclusions, which should not be checked. However, the fact that this heuristic rule is ther is generally useful: In older versions of Windows (or also in current ones?) file extensions are by default hidden. That way especially unexperienced users can be tricked into executing a file, which looks like it was e.g. called "Winner.txt" while it in fact is named "Winner.txt.exe". So generally this check is helpful, but not in this case. 88.130.92.144 16:24, 21 February 2014 (UTC)
This just happened to @VEckl (WMF) , Comodo anti-virus quarantined mediawiki.log.js because it looks like an executable file trying to trick the user into executing JavaScript by masquerading as a text-only "mediawiki.log" file. It seems that if your MediaWiki installation works, you can get by without this file, but if there are any other problems with your code, MediaWiki can't report them in the browser because this file is missing :-)
I filed T110630, "mediawiki.log.js is quarantined by Comodo anti-virus, unpredictable failures result" SPage (WMF) (talk) 02:03, 28 August 2015 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How can I made three wiki store and read image form same folder?

Now we have three language version wikis. We want to share images among three wiki and upload then to a common folder. How can I achieve that goal?

by $wgSharedTables[] = 'image'; and $wgUploadDirectory = "/commonfolder"; ?

by $wgForeignFileRepos?

or

by $wgUseSharedUploads? Deletedaccount4567435 (talk) 08:42, 17 March 2013 (UTC)

Just looking over the documentation, it looks like you need to set $wgUseSharedUploads to true and then set $wgSharedTables, $wgUploadDirectory, $wgSharedUploadPath.
Instead of doing this, I would recommend redirecting all users to a single wiki when they want to upload an image and then using $wgForeignFileRepos so they can reference that wiki. MarkAHershberger(talk) 13:53, 18 March 2013 (UTC)
it works, thank you! Zoglun (talk) 07:34, 4 May 2013 (UTC)

Pictures with Interwiki and Commons

Hi everyone,

I installed 8 wikis - 7 different languages and 1 commons. Only at the commons it is allowed to upload images. On each Wiki I installed the extention Interwiki and set it up. It is working properly to swap between the languages. At the sidebar I set a link to upload directly into the commons. This is working as well.

$wgUseInstantCommons is activated at the language-wikis, but I'm not able to include the images out of the commons into the other wikis.

I've tried: [[File:picturename.jpeg]] only a link to a not existing page within the same wiki is shown

commons:File:picturenname.jpeg a link to the picures page at the commons is show.

But how do I include the picture itself?

Any help is appreciated!

Thanx

) TS 87.178.191.21 (talk) 16:30, 17 March 2013 (UTC)
You probably need to allow uploading but disable Special:Upload on the wikis where you don't want uploading (see Manual:Hooks/SpecialPage_initList).
Also, I think you'll want to use $wgForeignFileRepos instead of $wgUseInstantCommons to point to your own commons instead of commons.wikimedia.org. MarkAHershberger(talk) 13:37, 18 March 2013 (UTC)
Got same problem.
Made everything by Scenario 4 from here:
http://www.mediawiki.org/wiki/Manual:Wiki_family#Scenario_4:_Multiple_wikis_sharing_common_resources
For File:Mypicture.jpeg I get red link
File:mypicture.jpeg,
which link to
http://pool.mywiki.com/Special:Upload?wpDestFile=mypicture.jpeg
For pool:File:mypicture.jpeg I get blue link
pool:File:mypicture.jpeg,
which link to right
http://pool.mywiki.com/File:picture.jpeg
but I want image - not just link. J-avdeev (talk) 08:15, 25 November 2014 (UTC)
For me solution was - to use $wgForeignFileRepos (https://www.mediawiki.org/wiki/Manual_talk:$wgForeignFileRepos)
$wgForeignFileRepos[] = array(
'class' => 'FSRepo',
'name' => 'sharedFsRepo',
'directory' => '/home/my_user/public_html/wiki/media',
'url' => 'http://www.my_wiki.com/media',
'hashLevels' => 0,
); J-avdeev (talk) 11:06, 25 November 2014 (UTC)

Getting SQL errors when saving after Captcha

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "Revision::insertOn". Database returned error "1142: INSERT command denied to user 'dbo423085716'@'74.208.16.155' for table 'text' (db423085716.db.1and1.com)". 83.84.44.152 (talk) 17:27, 17 March 2013 (UTC)

Hi!
Something is wrong with the MySQL user dbo423085716. You provided that user in LocalSettings.php and so MediaWiki tries to use this user to modify the database. However, this user does not have the privilege to INSERT rows into the table "text" (maybe it also cannot insert rows somewhere else).
You can use this statement to grant the privilege:
GRANT INSERT ON databaseName TO 'dbo423085716'@'74.208.16.155'
where databaseName is the name of your database.
If you cannot do that yourself, ask your hoster to fix the problem. 88.130.65.121 20:58, 17 March 2013 (UTC)

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.


Mediawiki : 1.19.4
PHP : 5.3.3
MySQL : 5.1.67
On my site we have many pages that fall into the "Pages with broken file links" category as it is the nature of the site to create the image placeholders first and upload images at a later date. The problem I am having is that once a page is created and then the wanted files uploaded at a later date the page is not cleared from the "Pages with broken file links" category. The only way that I can seem to clear them is by editing the page and clicking save (no actual edit required).
Is there a way to automatically clear the pages from the category? maybe a maintenance script ?
Site : http://www.stampsoftheworld.co.uk/ Stampstudy (talk) 18:54, 17 March 2013 (UTC)
Yes, there is a maintenance script called rebuildall.php. I think it should do the job. 88.130.65.121 20:53, 17 March 2013 (UTC)
Many thanks - that fixed it. It took forever (94700 links) but will put it in a cronjob. Stampstudy (talk) 23:02, 17 March 2013 (UTC)
> will put it in a cronjob.
That would have been my next advice. I guess not many people use your system say at 3 a.m. ;-) 88.130.65.121 23:44, 17 March 2013 (UTC)
if the category is not useful it can be disabled by replacing the page mediawiki:broken-file-category with a single hyphen.
you don't need rebuildAll.php, refreshLinks.php should be sufficient (but still way to long)
really this is a mw bug. uploading an image should do a linksupdate on relabent pages. Bawolff (talk) 20:47, 21 March 2013 (UTC)
if with run maintenance scriptas:
  • rebuildAll.php
  • refreshLinks.php
problem not solved, what's another way for fix showing image from common in custom wiki? Beginneruser (talk) 14:33, 3 May 2016 (UTC)
Hi,
We're currently having a similar problem to this. When a user uploads a new image to an empty placeholder on a page, the image uploads fine, but the placeholder doesn't update with the image at that point. If the user edits the affected page, only then does the image appear.
Rebuildall.php would resolve that problem for existing broken image links, but it continues to happen for further placeholders that get added.
Any ideas on where I should be looking for a solution at all? Dshinks (talk) 13:43, 2 August 2017 (UTC)
We've found the answer to this one!
We've just completed a migration to our wiki to a new instance, which involved importing all of the pages from an XML dump.
That seems to have left a massive backlog in our jobs table.
The fix in this case would be to run the maintenance script RunJobs.php to clear down the backlog. Dshinks (talk) 16:09, 2 August 2017 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

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, could you tell me if it is possible to hide this image which goes after external link on my homepage using common.css? Fokebox (talk) 19:24, 17 March 2013 (UTC)
A css class already exists for this. Put class="plainlinks" in a element that wraps those links.
For example:
http://example.com/

Ciencia Al Poder (talk) 10:46, 18 March 2013 (UTC)

If you want to hide this image for all links, the following CSS should do:
.plainlinks {
display: none;
}
Edit: No, it won't. But I guess you see what I want to say: With the right CSS definition you can just hide the image so that it does not display. 88.130.104.151 13:47, 18 March 2013 (UTC)
Ok. But I want to remove it only at one certain page? How should I do it? Fokebox (talk) 14:54, 18 March 2013 (UTC)
Add that page name to the CSS definition:
Do not use ".plainlinks {...", but ".page-MainPage .plainlinks {..." to make that rule only apply for the main page. You find the according class names in the HTML source code. 88.130.104.151 14:58, 18 March 2013 (UTC)
I did so, but it does not work!
page-Заглавная_страница .plainlinks { display: none; }
Fokebox (talk) 15:23, 18 March 2013 (UTC)
Have you seen my example, where the URL doesn't contain the image? I haven't added anything to this site's CSS to achieve that. Just edit the post and see how it's done Ciencia Al Poder (talk) 10:39, 19 March 2013 (UTC)
Thx, no I got it and it works! Fokebox (talk) 06:48, 20 March 2013 (UTC)
Do you also tell us how? 88.130.100.94 12:38, 20 March 2013 (UTC)
See my example in the first reply of this thread Ciencia Al Poder (talk) 20:36, 20 March 2013 (UTC)
<div class="plainlinks">http://www.yourlink.com</div>
Fokebox (talk) 21:19, 29 March 2013 (UTC)
Re:
.plainlinks {
  display: none;
}
^ This is wrong, it will hide the entire link! not the image. Ciencia Al Poder (talk) 10:40, 19 March 2013 (UTC)
For any surfers, the right code seems to be:
a.external {
background: none;
padding-right: 0;
}
Though this will hide the external link image from all pages, not just the home page. Sophivorus (talk) 17:40, 5 November 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Is there a Way to Automate Wiki Tag Changes?

Hello, My company has a Mediawiki site that has about 500 article pages. Recently, we decided that we want to add a discussion forum using Disqus.com and that we would have to add the tags <disqus></disqus> at the bottom of each article page so that the Disuqs.com forum shows on each article page.

Someone told me that Wikipedia may have some site wide tools or extensions to do this but I couldn't find anything in the mediawiki list of extensions. Is there a way we can automate this process so that we don't have to manually edit each of the 500 article pages with the <disqus></disqus> tags? For example, all 500 of our current articles are in the category "New York City Buildings", is there a tool/extension that can automatically find all 500 "New York City Buildings" pages and add the <disqus></disqus> tags at the bottom of each of these article pages? Thanks for your help.


Peter Peter321 (talk) 03:56, 18 March 2013 (UTC)

You would need to write a small bit of code and use a hook to do this. I think the hook you want is BeforePageDisplay. If you don't have experience with this, then any of the MW consultants could help you. MarkAHershberger(talk) 13:22, 18 March 2013 (UTC)

getting spam from wikipedia

I am receiving spam from the @wikipedia.org domain. The subject is Natalie Portman Weight Loss Sample, and the full address of the sender is: dominicanpetri@wikipedia.org 68.231.217.13 (talk) 18:26, 18 March 2013 (UTC)

The sender name alone does not say much; you can send emails with any sendername. Put it in your spam list. 88.130.65.8 19:35, 18 March 2013 (UTC)

MediaWiki search and META data

I've seen the various extensions for adding unique metadata to an individual page's header. I am creating a private/personal MediaWiki implementation, so I don't really care about SEO for external engines. However, I would like to be able to exploit the "keywords" attribute for my own use, basically using this as a separate layer of organization (like using "tags" in addition to categories). This all hinges on MediaWiki's ability to recognize its own metadata. Does the MediaWiki search look at meta tags in addition to the full body content? Or would this be useless for me? 99.236.44.250 (talk) 20:06, 18 March 2013 (UTC)

You might want to take a look at Extension:Semantic MediaWiki, if you haven't already. PleaseStand (talk) 08:08, 19 March 2013 (UTC)
no it does not.
what search does depends on which search plugin id used. the default one does nothing special. lucene is much more complex and can look at things like what categories are used. however afaik no search plugin looks at meta tags. Bawolff (talk) 20:36, 21 March 2013 (UTC)

[RESOLVED] Sending email redirects to blank on attempted mail send

Hi all:

I'm attempting to setup email, specifically via gmail, on my wiki. I'm having difficulty. Here is the failure mode:

  • When i use a page that I know sends an email, such as "request an account", the page chugs and chugs, but ends up redirecting me to a white screen after ~30-45 seconds
  • When I put in a known bogus host in LocalSettings.php, the mailing page shows a red connection error as expected. But when all is configured well, blankness
  • boring video of it redirecting to blank, and a quick proof of pear, php, openssl

Knowns:

  • Good php install
  • OpenSSL good
  • Good pear install
  • Mail & Net_SMTP pear deps installed

$wgSMTP = array( 'host' => "ssl://smtp.gmail.com", 'IDHost' => "[unsure what to put here]", 'port' => 465, 'username' => "[myemail]@gmail.com", 'password' => "[mypw]", 'auth' => true, );

I've confirmed in my email account that no outbound mail has been sent. Not sure what the next debugging step is to do!

Thanks all,

-Cdaringe Cdaringe (talk) 22:50, 18 March 2013 (UTC)

Hi!
When you get a white page, it's usually a PHP error, in your case obviously a time-out. So turn on error reporting in PHP, produce the time-out again and see what it says. :-) 88.130.65.8 01:06, 19 March 2013 (UTC)
Howdy sir/miss:
Thanks for the tip. I upped error_reporting to ALL, confirmed in a php_info() output as 30719 (error_reporting = ALL), have restarted the server, yet the blank still persists. Hmm. Any other tips?
Thank you! Cdaringe (talk) 03:13, 19 March 2013 (UTC)
Either check your server's error log or temporarily set display_errors = On and display_startup_errors = On as well. See Manual:How to debug. PleaseStand (talk) 07:42, 19 March 2013 (UTC)
Hi all:
Thank you for the continued advice. I have already maxed out PHP errors, but for the sake of redundancy, also commanded ALL php errors via local settings as well as the .ini. Still, no on-screen php errors render.
Per checking my apache error log, I did receive the following:
[Tue Mar 19 10:36:04 2013] [error] [client 10.40.17.132] File does not exist: C:/Program Files (x86)/Ampps/www/favicon.ico
[Tue Mar 19 10:36:05 2013] [error] [client 10.40.17.132] (20024)The given path is misformatted or contained invalid characters: Cannot map POST /mw/index.php/Special:ConfirmEmail HTTP/1.1 to file, referer: http://10.40.17.132/mw/index.php/Special:ConfirmEmail'
The bold one looks suspicious. Any idea there? Cdaringe (talk) 17:49, 19 March 2013 (UTC)
hmm. do you have rewrite rules enabled (or alias rules or other weird url related configs). is it only email related or do similar things happen when editing
setting $wgUsePathInfo = false; at the bottom of LocalSettings.php may make the issue go away (at the expense of not revealing the true cause) Bawolff (talk) 20:30, 21 March 2013 (UTC)
Hi Bawolff, all:
I wish it were the case! No special rules or URL manipulations to my knowledge. I have a 1.20 out-of-the-box install with just a few extensions added. In fact, here's a snap of my version page: My "Special:Version" Page.
Is my apache error above saying it can't parse the POST data? When I submit, I see no POST=..., etc. I'd assume most content is carried in sessions? I should probably hush--I really have no idea!
Any further tips will be appreciated. Cdaringe (talk) 00:58, 22 March 2013 (UTC)
Just googling the error message I've found interesting things about an Apache error under Windows when the URL contains colons. You should probably check them. Ciencia Al Poder (talk) 11:09, 22 March 2013 (UTC)
Hi all:
Ciencia--I did find some tips on the path issue. I have resolved that specific apache error. Alas, still no resolution.
http://pastebin.com/7R87ZQNU
Perhaps the other minor sounds errors in the log linked to above are playing a role. I'll try and get to those shortly, if I can figure them out. As always, thanks for the tips!
-CD Cdaringe (talk) 16:40, 25 March 2013 (UTC)
I doubt mod_wsgi is causing this.
You should enable MediaWiki's debug log to see what it's doing before having that timeout, to ensure what host is really trying to connect. A timeout usually is caused by firewall not allowing connections, or a typo or error when setting up the hostname or port of the destination SMTP server if the server isn't listening to that port. Ciencia Al Poder (talk) 19:48, 28 March 2013 (UTC)
Hi Ciencia:
I created a log and ran an known email action (confirm email).
The results: http://pastebin.com/zZe6FtQM
Nothing looks particularly alarming from first pass. I will try enabling profiling and see if that leads me to anything further.
Thanks,
-CD Cdaringe (talk) 00:41, 29 March 2013 (UTC)
Interesting. It just updated a little bit later from a different log block and I see:
"Class PEAR_Error not found; skipped loading"
PEAR is installed. PHP info doesn't tell me explicitly, but in the fact that I do see "Sending mail via PEAR::Mail" in another log tells me there are handshakes happening. Cdaringe (talk) 00:50, 29 March 2013 (UTC)
If anyone is subscribed, sorry--I will continue to spam as this problem continues to hassle me :$
If the MW debug logs w/ profile info is useful, I attached some here:
Logs for loading the Special:ConfirmEmail page: http://pastebin.com/Vh1nhTBx
Logs for submitting the Special:ConfirmEmail page: http://pastebin.com/4DEe7QD9
The bottom log is interesting. It does a POST, then a GET, then another GET. Cdaringe (talk) 01:15, 29 March 2013 (UTC)
I can't see anything odd from your logs (except the POST-GET thing, but maybe it's just doing a HTTP redirect)
The configuration you gave seems correct, and I've seen lots of forums with that exact same configuration.
The last thing that can cause this is problems connecting to gmail server. Have you checked this? You can check it using the telnet client, opening a connection to the 465 port. Since the server is running windows, just execute this command: telnet smtp.gmail.com 465. If it hangs at "connecting to smtp.gmail.com..." then something is blocking those connections. If you get a message saying telnet is not found, install the telnet client (it's part of windows component, but not installed by default) Ciencia Al Poder (talk) 11:55, 29 March 2013 (UTC)
Ciencia! I owe you the big bucks. Indeed it was a a port blocking issue. I figured out how to instead use an exchange server on the current network, confirmed that THAT could be contacted using your above method, saved. worked.
Thank you everyone in the thread for the support. I will add some clarifying documentation to the MW email section based on my learnings. Cdaringe (talk) 17:40, 29 March 2013 (UTC)

[RESOLVED] Trying to set up Short URL's

Hi,

I've been asked to change our wiki site complete to short URL's. I've looked at the media-wiki manual on short URL's at http://www.mediawiki.org/wiki/Manual:Short_URL/Apache at http://www.mediawiki.org/wiki/Manual:Short_URL http://www.mediawiki.org/wiki/Manual:Short_URL/Apache

I haven't touched the $wgArticlePath or other mediawiki variables so any new article created will by default have the wiki address such as http://www.mypedia.com/wiki/index.php?title=Article_1 However, I've editted the Apache rewrite rules so that Apache's doing the work so www.mypedia.com/wiki/Article_1 will redirect to the default wiki address at http://www.mypedia.com/wiki/index.php?title=Article_1

However, my client has asked me to change the wiki itself so that when any new article created in the wiki it will automatically create an article URL such as www.mypedia.com/wiki/New_Article and get rid of the index.php?title=New_Article. This would then be like Wikipedia, which has also done away with the index.php?title=New_Article. For example, Tiger Woods is just http://en.wikipedia.org/wiki/Tiger_Woods I've read that a wiki can be inherently unstable if it is changed to make new articles have a short URL like www.mypedia.com/wiki/New_Article rather than www.mypedia.com/wiki/index.php?title=New_Article And what happens to the old articles that have been created the old way?

Please advise. Thanks.


Peter Peter321 (talk) 04:33, 19 March 2013 (UTC)

First, you might want to rename /wiki to some other name (Wikipedia uses /w), possibly setting up a redirect from /wiki/index.php to /w/index.php to avoid breaking links from other sites.
Then, as described at Manual:Short URL/Apache, set $wgArticlePath = '/wiki/$1'; and $wgScriptPath = '/w';. Unless you disabled $wgInvalidateCacheOnLocalSettingsChange , you shouldn't even have to clear or purge the parser cache yourself. PleaseStand (talk) 07:38, 19 March 2013 (UTC)
Thanks for your help. I now have it working with the short URL's. Peter321 (talk) 04:43, 21 March 2013 (UTC)

Warning on page about GlobalFunctions.php on line 2502

Hello, I have installed the MediaWiki on the server as mentioned in the installation manual. Now whenever I try to browse the site, the site loads but it has error messages on the top. The error messages are as follows:

Warning: file_exists(): open_basedir restriction in effect. File(C:\Windows\TEMP) is not within the allowed path(s): (c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata) in C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php on line 2502

Warning: file_exists(): open_basedir restriction in effect. File(C:\Windows\TEMP) is not within the allowed path(s): (c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata) in C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php on line 2502

Warning: file_exists(): open_basedir restriction in effect. File(C:\Windows\TEMP) is not within the allowed path(s): (c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata) in C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php on line 2502

Warning: file_exists(): open_basedir restriction in effect. File(C:\Windows\TEMP) is not within the allowed path(s): (c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata) in C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php on line 2502

Can anyone tell whats the issue or what I have missed in the installation?

Regards, Rahul Rkumbhar (talk) 12:15, 19 March 2013 (UTC)

See this stackoverflow answer. MarkAHershberger(talk) 14:50, 19 March 2013 (UTC)

Allowing creating two users with the same email address

Hello,

I'm setting up a new MediaWiki site using the following versions: MW: 1.20.3 PHP: 5.3.15 MySQL: 5.5.23-55

I noticed that when I am using MW in a full private mode, and when I, as the only admin, create a new user - the software allows me to create a user that uses the same email address as the one used for an already existing user, which may lead to trouble. Why is that? Why isn't this prohibited by the software? Eitanc (talk) 16:55, 19 March 2013 (UTC)

I couldn't find anything in bugzilla about this, but it has long been this way. I filed this bug to request a way to stop this. MarkAHershberger(talk) 18:40, 19 March 2013 (UTC)
Thank you. Eitanc (talk) 19:35, 19 March 2013 (UTC)

Combatting Spam OpenID Fbconnect create account

The information on this page may be incorrect https://www.mediawiki.org/wiki/Manual:Combating_spam#Restrict_editing Even when editing is restricted to account holders, spammers can automatically create accounts and flood a wiki with new account spam. This can largely be avoided by disabling account creation and transferring authentication to a service such as Extension:OpenID. New account creation is disabled with this line in LocalSettings.php: $wgGroupPermissions['*']['createaccount'] = false; The MediaWiki:Loginprompt can be updated from the default to suggest that new users create accounts with an OpenID. Current accounts are unaffected, and new users often already have an account with one of the OpenID providers.

it would be nice to achieve the above effect but Visitors cannot create new accounts since openid has been patched to respect $wgGroupPermissions['*']['createaccount'] = false; https://bugzilla.wikimedia.org/show_bug.cgi?id=27419

Visitors cannot create new accounts using extension:Facebook either when $wgGroupPermissions['*']['createaccount'] = false; is set , an internal error occurs.

also if the $wgFbDisableLogin = true; is set in extension:Facebook visitors can sign up with facebook but not openid and current users cant login either with the regular login either.

is there a way to allow signups through openid and/or facebook(hotmail etc visitors) and disable regular signups ? Nanotherone (talk) 21:06, 19 March 2013 (UTC)

I really wish there was. I don't think it's possible, at least not without some sort of advanced reprogramming through an extension. I think that disabling account creation will disable it through all methods, seeing as creating an account through Open ID or Facebook is account creation. If there was a way to count it as a different process, and have that process override the restriction on account creation, it might work. I would really like to be able to have only Open ID or Facebook account creation, as it would improve the sense of community and make sockpuppetry more difficult. ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr) 23:24, 19 March 2013 (UTC)

Is there a way to make floating right objects always align with the side of the page?

When I use style="float: right">, the template that I use it with aligns next to thumbnails or other right floating templates instead of on top of below them as thumbnailed images always do. Is there a way to always make the template align at the side of the page and not next to other things? Lieutenant Aleksandr Reznov 23:27, 19 March 2013 (UTC)

try style="float:right; clear:right"
how floating objects work can be confusing. try googling for a tutorial on css float and clear. Bawolff (talk) 20:15, 21 March 2013 (UTC)
Thanks. It seems to work. ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr) 18:02, 22 March 2013 (UTC)

Tabs at the top display weird when the AddThis like prompt displays

I have an AddThis widget in the site notice that displays a bar at the top of the page any time someone visits from a link from Google, Facebook, or other social networking services. When it displays, it seems to create a gap between the tabs and the page content. The code of the AddThis widget is here:

http://www.sturmkrieg.us/Widget:AddthisWelcome#.UUj2sFvwIbo

Does anyone know how I can fix this?

This is what it looks like:

Lieutenant Aleksandr Reznov 23:40, 19 March 2013 (UTC)

The black bar looks like it is added with this bit of CSS:
"backgroundColor": "#000000"
but I can't be sure since I don't can't reproduce the link. MarkAHershberger(talk) 15:45, 24 March 2013 (UTC)
Typically adding html to the top of the page in the vector skin causes the tabs to misalign. You need to adjust the css attributes that position the tabs in order to compensate for moving the rest of the ui down. Alternatively instead of inserting html at the top of the page you could insert it st the bottom and then absolute (or even static) position it at the top so that it doesnt move down the body content. (My answer assumes some advanced css knowlade. If that didnt make sense, google for a tutorial on css absolute positioning) Bawolff (talk) 19:45, 24 March 2013 (UTC)

MediaWiki Sidebar Extension

I wonder ehat Extension mediawiki.org (this Wiki) uses? I´ve searched and searched but couldn´t find that solution on any of the extensions. I´m looking for the group function so that my menu long if not all groups are extracted. MWMP (talk) 14:16, 20 March 2013 (UTC)

You are looking for the Vector extension. 88.130.100.94 15:15, 20 March 2013 (UTC)
for reference a full list of extensions used on this wiki is available at special:version Bawolff (talk) 20:12, 21 March 2013 (UTC)

wgUsersNotifiedOnAllChanges: Send less mails!?

As sysop I use $wgUsersNotifiedOnAllChanges to get notifications for all edits on my wikis. Sometimes I get really spammed by those mails.

Is there a way to get less mails, say only 1 mail (per hour for example) if a user has changed one certain page 20 times in a row?

Thanks! Stefahn (talk) 15:26, 20 March 2013 (UTC)

You could just use Special:Recentchanges. MarkAHershberger(talk) 17:00, 23 March 2013 (UTC)
Thanks Mark.
Do you know any extension that could help me? Stefahn (talk) 19:12, 23 March 2013 (UTC)
Sorry, I don't. I hadn't heard of that option till you mentioned it.
If it is really important to you file a bug and try to get someone to fix it. MarkAHershberger(talk) 15:35, 24 March 2013 (UTC)

Using Google libraries

To help speed up my website, I'd like to use Google's hosted libraries instead of serving them from my own server. I'm guessing that MediaWiki uses jQuery, but are there any other libraries that are used? Also, is it possible/how can I go about setting it so the files are served from Google instead of my own server? Thanks! Vitamin Me (talk) 16:41, 20 March 2013 (UTC)

this would be rather difficult to do. theres also probably easier ways to speed up mediawiki (aka object caching (aka APC) if you don't have that set up) Bawolff (talk) 20:10, 21 March 2013 (UTC)
Or use http://www.cloudflare.com/
Changing only from where jquery files are loaded won't improve things much since it's static content Ciencia Al Poder (talk) 10:59, 22 March 2013 (UTC)
MediaWiki uses ResourceLoader which combines various libraries in grouped http requests. A CDN can be faster, but ResourceLoader is pretty efficient already. Just because it doesn't say "Google CDN" doesn't mean it's slow.
Besides, loading them from a (different) CDN won't save much as it will add an additional HTTP request just for jQuery. And it would come at the cost of having to be sure that the same version is available from the CDN, and you need to make sure to update it after each upgrade of MediaWiki.
I'd recommend you drop this and stick with ResourceLoader. Check out Manual:Cache instead.
Note that you can load libraries other than jQuery from a CDN (e.g. a plugin you use in an extension, or a special jQuery UI theme), but not libraries like jQuery itself as those are part of the default package. Krinkle (talk) 22:07, 27 March 2013 (UTC)

[SOLVED] Upgrade from WM 1.15 to 1.20.3 - Cannot Access User Settings - Global default is invalid for field editfont

We upgraded our Intranet MW from 1.15 to 1.20.3 according to http://www.mediawiki.org/wiki/Manual:Upgrading/de

Everything works - Except for accessing User Settings.

Global default is invalid for field editfont Backtrace:

  1. 0 /var/www/includes/Preferences.php(1243): Preferences::getPreferences(Object(User), Object(RequestContext))
  2. 1 /var/www/includes/specials/SpecialPreferences.php(60): Preferences::getFormObject(Object(User), Object(RequestContext))
  3. 2 /var/www/includes/SpecialPage.php(611): SpecialPreferences->execute(NULL)
  4. 3 /var/www/includes/SpecialPageFactory.php(494): SpecialPage->run(NULL)
  5. 4 /var/www/includes/Wiki.php(290): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
  6. 5 /var/www/includes/Wiki.php(536): MediaWiki->performRequest()
  7. 6 /var/www/includes/Wiki.php(446): MediaWiki->main()
  8. 7 /var/www/index.php(59): MediaWiki->run()
  9. 8 {main}


Software Version MediaWiki 1.20.3 PHP 5.3.3-7+squeeze15 (cgi-fcgi) MySQL 5.1.66-0+squeeze1

Google says there's been a fix in 1.16.2 but we're at 1.20.3 now so this does not help.

Any help would be very appreciated

Best regards, Marcus 217.7.122.211 (talk) 16:51, 20 March 2013 (UTC)

I had to edit LocalSettings.php
No more $wgDefaultUserOptions as an array like this
$wgDefaultUserOptions = array(
'searchNs4' => 1,
'showtoc' => 1
);
Instead use as follows
$wgDefaultUserOptions['showtoc'] = 1;
Now it is working again.
Regards, Marcus 89.245.37.38 22:37, 20 March 2013 (UTC)
Note that writing:
$wgDefaultUserOptions = array();
$wgDefaultUserOptions['searchNs4'] = 1;
$wgDefaultUserOptions['showtoc'] = 1;
is the same as
$wgDefaultUserOptions = array(
'searchNs4' => 1,
'showtoc' => 1
);
You probably had some other problem. MarkAHershberger(talk) 16:51, 23 March 2013 (UTC)

Using a range of IP addresses within $wgSquidServers

Hi,

I looked around and could not find an answer on the web for this, and so other tests failed. For $wgUsePrivateIPs (http://www.mediawiki.org/wiki/Manual:$wgUsePrivateIPs) to work, it has to be accompanied with $wgSquidServers (http://www.mediawiki.org/wiki/Manual:$wgSquidServers).

My issue is that $wgSquidServers syntax allows to mention only one IP address at a time for an array of addresses, but I placed my wiki behind a proxy service that has many possible reverse proxy servers, which are distributed between non-continuous ranges. I couldn't find a ways to declare an IP range in this command, as listing each and every possible IP address of these proxy servers is not a reasonable possibility.

I tried the following (alongside "$wgUsePrivateIPs = true;"):

  1. $wgSquidServers = array('198.143.32.0-198.143.63.255');
  2. $wgSquidServers = array('198.143.32.0'-'198.143.63.255');
  3. $wgSquidServers = array('198.143.32.0/19');

but, non helped and the proxy server address was displayed.

Does anyone know how to solve this? Eitanc (talk) 22:47, 20 March 2013 (UTC)

$wgSquidServers is a PHP Array so it's not limited to only one IP address.
AFAIK, you can specify only IP addresses and not ranges of IPs, so you need something like
$wgSquidServers = array('198.143.32.1', '198.143.32.2', '198.143.32.3', '198.143.32.4' ... ); and so on Ciencia Al Poder (talk) 10:45, 21 March 2013 (UTC)
Hi Ciencia,
I understand this. My claim is not that the array can't accept more than one value.
The claim is that a value cannot be a network definition or a range of IP addresses - it can only be a single IP address.
A solution for this (if it is currently the way thing works, e.g. by design), in my view, can be either or both:
1. Make $wgUsePrivateIPs work by itself, not dependent on $wgSquidServers presence, and each session that has a XFF flag - will be processed and the session's IP will be determined by the XFF flag.
This can also be set by a new directive, base on $wgUsePrivateIPs, say $wgUsePrivateIPsAllowAnyProxyServer - so this way we will have two options - one will enforce using of trusted proxy servers and one will be open to any proxy server.
To complete this solution - admins can limit access to the wiki using allow/deny directives in the .htaccess file of the site, so only allowed proxy servers can connect to the site.
2. Enhance $wgSquidServers (and of course $wgSquidServersNoPurge) to accept values that are either ip range (x-y) or subnet definition (either 1.2.0.0 netmask 255.255.255.0 or as 1.2.0.0/24 (CIDR)). Eitanc (talk) 11:01, 21 March 2013 (UTC)
Then you probably want to fill an enhancement bug about that.
Alternatively, you can also set that variable programatically (i.e. not as a "static" value) sniffing yourself the XFF request headers, or even creating a function for checking CIDR ranges to see if the client's IP is part of that netmask and assigning that client IP to $wgSquidServers when it matches, or leave it empty if not.
See for example http://stackoverflow.com/questions/594112/matching-an-ip-to-a-cidr-mask-in-php5 Ciencia Al Poder (talk) 19:54, 21 March 2013 (UTC)
first of all the variable you want to use is probably http://www.mediawiki.org/wiki/Manual:$wgSquidServersNoPurge since I don't think you would want to be sending purge requests to all these servers (?)
second have you considered using extension:TrustedXFF. it can specify ranges from which to trust xff headers Bawolff (talk) 20:06, 21 March 2013 (UTC)
Hi,
As much as I have seen, $wgSquidServersNoPurge is using the same syntax as $wgSquidServers, so it doesn't really help me. once I will overcome the range notion issue, than I will look into purging or not. (btw the pages for these directives does not really explain the purging topic, for those who are not familiar with it).
I will try the suggested TrustedXFF extension, hoping it will help me bypass this issue.
And if it will not help - I will file an enhancement bug, as I am not a developer, so it will better that I will not start coding on this one... ;)
Thank you both! Eitanc (talk) 22:02, 21 March 2013 (UTC)
I tried to implement the extension of TrustedXFF, but eventually I found it relies on PHP's DBA module to operate - but my site is on a shared hosting plan and the hosting company is not willing to add this module to any shared plan installations, so this is a dead end for me, so I will go ahead and file an enhancement request. Eitanc (talk) 14:07, 27 March 2013 (UTC)

Configure addresses from which MediaWiki mail is sent from

How do I change the default addresses from which MediaWiki sends confirmation emails and what not? I'm also using $wgSMTP if that changes anything. Vitamin Me (talk) 04:10, 21 March 2013 (UTC)

It seems you're looking for $wgPasswordSender, and also $wgPasswordSenderName Ciencia Al Poder (talk) 10:49, 21 March 2013 (UTC)

wiki is hanging after a while, port 80 not available

Mediawiki 1.20.2 / PHP 5.4.7 / MySQL 5.0.51 on our apache we have a intranet and an internal WIKI running. A few times a day the intranet en the wiki is hanging. We have to stop and start the apache (2.4). Investigation shows that at those moments the port 80 is not available. We did some testing. Seems like when we remove WIKI from the apache and only run intranet, there is no problem. when we add wiki back to the apache the problem occurs again. Any idea what the problem may be? Suzy.Thys (talk) 13:34, 21 March 2013 (UTC)

You should enable debugging to see what's the last action it was doing before the crash, and see if everytime this happens the last action logged is the same. Ciencia Al Poder (talk) 10:58, 22 March 2013 (UTC)

[RESOLVED] Database error: "1054: Unknown column 'rev_sha1' in 'field list' (localhost)"

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


I have wiki on my old laptop (MediaWiki:1.17.0 MySQL:5.5.21 PHP:5.3.18 phpMyAdmin: 3.5.3). Now I've decided to move it to my new laptop (MediaWiki:1.20.3 MySQL:5.5.29 PHP:5.4.12 phpMyAdmin:3.5.7). By phpMyAdmin interface i have exported the database on my old laptop and in the same way imported it on my new laptop. After setting the user account and restarting the apache and mysql services, while trying to access my wiki from browser i receive the following error message:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "Revision::fetchFromConds". Database returned error "1054: Unknown column 'rev_sha1' in 'field list' (localhost)".
Am I missing smth? Anyway I do appreciate the real help to solve the issue.
NB. At LocalSettings.php on my old laptop there are was a line $wgDBprefix = "mdw_"; which I copied to LocalSettings.php on new laptop. Axuwon (talk) 02:30, 22 March 2013 (UTC)
You're likely missing running update.php Ciencia Al Poder (talk) 11:10, 22 March 2013 (UTC)
Running the update.php do solved the issue! Axuwon (talk) 06:59, 25 March 2013 (UTC)
I'm running update.php to update mediawiki 1.15.1 to 1.21.1 on my laptop. I changed MySQL user to root at Localhost.php.
During running the update.php, there is a error 1054: unknown colum 'rev_sha1' in 'field list'(localhost).
The step where error happened was "batch conversion of user_options: A database query syntax error has occurred.
I appreciate it if anybody could help me to solve this issue. 115.91.55.219 14:49, 9 June 2013 (UTC)
Have a look at the threads on this very page. There already were three or four concerning this issue and I think they had a solution. 88.130.73.137 15:26, 9 June 2013 (UTC)
Yes, refer to Project:Support desk/Flow/2013/05#h-[RESOLVED]_upgrade_problems:_1.11_-->_1.21_(batch_conversion_of_user_options:_Un-2013-05-30T08:13:00.000Z Ciencia Al Poder (talk) 17:34, 9 June 2013 (UTC)
Thank you...I had the same problem and this helped me.
Thank you, 168.167.134.101 12:00, 5 May 2015 (UTC)
i don't think this work

69.160.2.216 (talk) 03:02, 25 June 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Media wiki takes large disk space

We develop a MediaWiki website that maintains data for the Norwegian historical population register. It uses MySQL. Currently the register contains about 3.5 million pages and it supposed to be several tens more. The problem that we recently encountered is that the whole system takes much more of the disk space than we expected. All pages should not require more than 3.5 G but the used space is now approximately 266 G. Is it any way to detect what actually consumes all this space? And what is the remedy? Svetlana.boudko (talk) 10:06, 22 March 2013 (UTC)

From this stackoverflow question, this query will give you the table sizes in MBs:
SELECT table_name AS Table,
round(((data_length + index_length) / 1024 / 1024), 2) AS Size
FROM information_schema.TABLES
WHERE table_schema = 'wikidb' ORDER BY Size ASC;
What are the last five lines of the results of that query? MarkAHershberger(talk) 16:24, 23 March 2013 (UTC)
One point surely will be the database (see Mark's query). Another way to find out which table is how big is to view the overview of the tables in your database in PHPMyAdmin.
Another point are file uploads: Do you upload large amounts of big files to your wiki? 88.130.115.230 19:09, 23 March 2013 (UTC)
The last five lines are:
slekt_recentchanges 1249.20
slekt_revision 1475.19
slekt_logging 3763.81
slekt_categorylinks 9690.97
slekt_text 132705.30
We upload large amounts of files (approximately 3,500,000) but the size of these files is not so big, the average size is ~1Kb, meaning the size of the database should not exceed 4-5 Gb. Svetlana.boudko (talk) 14:03, 2 April 2013 (UTC)
According to your results, you're slkt_text table is 132GB in size -- that is a lot of information on your wiki. I'm not sure why that would be, but that seems to be the core of your problem. MarkAHershberger(talk) 16:08, 6 April 2013 (UTC)

Mediawiki site does NOT show up for Mac users

I have installed an instance of Mediawiki at www.cromi.org/wiki/ and for some reason Mac users cannot see the wiki. Also they can't see the website itself (www.cromi.org)! Please help!!!

MediaWiki 1.20.3 PHP 5.3.21 (cgi-fcgi) MySQL 5.5.30-cll 75.15.14.160 (talk) 14:44, 22 March 2013 (UTC)

If they don't see the main domain, then that's not a MediaWiki issue.
Also, the "can't see the wiki" is not a very descriptive message to figure out what happens. Ciencia Al Poder (talk) 17:14, 22 March 2013 (UTC)
"Cannot see the wiki" -- I can't see any content on the wiki because I'm not authenticated. But I can see http://www.cromi.org/. This sounds like a networking issue.
What happens if they type "ping www.cromi.org" in a terminal window? MarkAHershberger(talk) 16:03, 23 March 2013 (UTC)

Change The Color

I am new to MediaWiki and this is what I want to do:

I want to make it red.

This is my MediaWiki:

http://wiki.boingblogs.com/

This is an example of what I want it to look like:

http://forums.boingblogs.com/

I found the Help:Skins page but the Discussion page said to post my question here. ALL I WANT TO DO IS MAKE IT RED!

MediaWiki 1.20.0 PHP 5.3.15 (cgi-fcgi) MySQL 5.5.23-55 In Correct (talk) 22:48, 22 March 2013 (UTC)

Hi!
That is easy. :-) Your wiki has a page called MediaWiki:Common.css. You can insert CSS styles on that page. They will then be valid for all skins (also for the skin called Monobook, which you are using).
Your red parts of the page use an image, images/catbg.jpg. Copy that image into your MediaWiki installation, for example in the folder skins/common/images. Then you can use it in MediaWiki:Common.css by adding these CSS styles:
h2 {
background: url("skins/common/images/catbg.jpg") repeat-x scroll 0 0 #990000;
}
This will give headlines of level two the red background image.
With that kind of definitions you can style elements as you want. (Btw. you can do much more with CSS; basically you can use it to change the complete design of your wiki. Just try it! ;-) ) 88.130.68.23 23:58, 22 March 2013 (UTC)
I found the image "catbg.jpg" and have copied it into "skins/common/images"
I could not find a "common.css" but in "skins/common" I found these files:
"commonContent.css"
"commonElements.css"
"commonInterface.css"
"commonPrint.css"
also in the same directory I found:
"config-cc.css"
"config.css"
Which of these pages should I paste:
"h2 {
background: url("skins/common/images/catbg.jpg") repeat-x scroll 0 0 #990000;
}" In Correct (talk) 16:02, 23 March 2013 (UTC)
and what about "shared.css" ? In Correct (talk) 16:12, 23 March 2013 (UTC)
There is a page on your wiki called "MediaWiki:Common.css". That is where you put the code. MarkAHershberger(talk) 16:33, 23 March 2013 (UTC)
Yes, you should put this on that page in your wiki.
You could also modify one of the files, which you found there, but that is not recommended: First you cannot just change these files, but you need file system access while you can edit the CSS on that page like any other wiki page. And your changes in one of these files would be overwritten when you next update MediaWiki. So better use the wiki page. 88.130.115.230 19:04, 23 March 2013 (UTC)
I found it.
I tried to search in MediaWiki, just like if I was doing a search for an article.
Earlier, I was searching in cPanel for a file named "Common.css" and I even searched for "MediaWiki:Common.css" which I could not find either.
Okay. So that part is red now. How do I make the corresponding text white? In Correct (talk) 00:46, 24 March 2013 (UTC)
What you now want to do is not special for MediaWiki, you just want to know how to use CSS. I think you will find good tutorials, when you just feed Google.
CSS offers settings for margins, for paddings, for background-color, for (text) color, for font-size, font-family, and many, many, many more. You can basically change the complete styling of your site with it - and with complete I actually mean "every aspect".
E.g. you can get white text for these headlines like so:
h2 {
background: url("skins/common/images/catbg.jpg") repeat-x scroll 0 0 #990000;
color: white;
}
You should try out Firebug, an extension for Firefox. It allows you to modify CSS styles of a page while you view it in the browser. That way you can quickly get the results you want. Then copy your changes in Commons.css and you have it. :-) 88.130.115.230 01:29, 24 March 2013 (UTC)
I still need to edit the sidebar! I would like to add similar white text on red background for the words. "navigation", "search", "toolbox", etc. ... and I would like to make the entire sidebar wider.
Do I do this with "MediaWiki:common.css", or do I have to use "MediaWiki:Sidebar"?
Will the customizations made by using "MediaWiki:Sidebar" be applied to ALL skins, or just Monobook? In Correct (talk) 21:33, 25 March 2013 (UTC)
If you want to do this for every skin, it is better to keep the changes in MediaWiki:Common.css -- I don't think this could even be done in MediaWiki:Sidebar. MarkAHershberger(talk) 19:50, 26 March 2013 (UTC)

Would someone please explain why this template works on Sturmkrieg but not on Bigotry Wiki?

http://www.sturmkrieg.us/index.php?title=Template:Portal&action=edit#.UU0aU1vwIbo

http://bigotry.sashaweb.net/index.php?title=Template:Portal&action=edit

You can see the template used on each wiki on the sandbox page.

So, why is it not working on the newer wiki? I'm pretty close to losing it right now. I tried adding 1 to the end of the Portal namespace on Bigotry Wiki template so it wasn't a namespace, and the links worked fine in that case. So why does the parser function on Bigotry Wiki drop the namespace? Words cannot express how absolutely moronic it was to do that! Lieutenant Aleksandr Reznov 04:31, 23 March 2013 (UTC)

Could you please elaborate "not working"? Ciencia Al Poder (talk) 12:02, 23 March 2013 (UTC)
If you go to the sandbox, you'll see that the link only works on one. ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr) 13:11, 23 March 2013 (UTC)
Does anyone know how to stop it from omitting the namespace of the page? ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr) 02:11, 24 March 2013 (UTC)
If you try to go to http://bigotry.sashaweb.net/Portal:Fail you end up on http://bigotry.sashaweb.net/Fail. How are your namespaces configured in LocalSettings.php? MarkAHershberger(talk) 15:31, 24 March 2013 (UTC)
define("NS_PORTAL", 100);
define("NS_PORTAL_TALK", 101);
$wgExtraNamespaces[NS_FOO] = "Portal";
$wgExtraNamespaces[NS_FOO_TALK] = "Portal_talk";
{{LQT post imported with different signature user|authorUser=Lieutenant S. Reznov|signatureUser=Inquisitor Ehrenstein}}
ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr) 15:34, 24 March 2013 (UTC)
Is that really your configuration? If so, you need to replace "FOO" with "PORTAL". MarkAHershberger(talk) 15:37, 24 March 2013 (UTC)
Ok, that would be a problem. Thanks. ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr) 15:52, 24 March 2013 (UTC)

help

hi

may i know which extensions should i install to use tables, columns and infobox please? 115.66.200.100 (talk) 09:39, 23 March 2013 (UTC)

You can use tables and create templates (to make an infobox) without the need of any extension. See Help:Editing pages, Help:Templates Ciencia Al Poder (talk) 12:01, 23 March 2013 (UTC)

[RESOLVED] ReferenceError: mw is not defined

We're upgrading wiki.mozilla.org to 1.19 and running into this problem:

ReferenceError: mw is not defined
https://wiki.mozilla.org/skins/common/wikibits.js
Line 118

Initially, I noticed there were a lot of 404s, but once we got those fixed, this error remained.

Any ideas? MarkAHershberger(talk) 15:20, 23 March 2013 (UTC)

assuming not in js debug mode, I believe that should be loaded by the resource loader (which would mean different url) perhaps an old custom skin is still manually loading that file, but is doing it before its dependencies and causing problems. check to see what script tags the skin outputs. Bawolff (talk) 15:55, 23 March 2013 (UTC)
Think I tracked this down to wikibits being loaded in the legacy way. Fixed here. MarkAHershberger(talk) 15:56, 23 March 2013 (UTC)

Extensions Specialpage Aliases don't work after update

Hello, i have a problem: a few days ago i updated my mediawiki-wiki from version 1.17 to version 1.20. Since the update the Specialpage-Aliases don't work anymore. A few research later i found out, that $wgExtensionAliasesFiles was included in $wgExtensionMessagesFiles. Now the curious things begin. I changed the variables into the new style and as it hadn't work i try out some more things and finaly come back to my first version with 2x $wgExtensionMessagesFiles which finaly works. I try to reproduce my changes for the other extensions, but all i try doesn't work.... only one other extension more works now (after XXX trys) and i can't find out whats the problem. I even use a programm to compare the versions and highlight the differences on the correctly changed files, but there were no more changes then the one i also try on the not-correct working extension-aliases. Can you help me, or give me at least a list of changes i have to check?

Thanks in advance 79.199.60.237 (talk) 16:01, 23 March 2013 (UTC)

It would help to know what extensions you're having trouble with and which works. MarkAHershberger(talk) 16:32, 23 March 2013 (UTC)
All Extensions were written by myself and not published, because i want to personalize the wiki (its a private one) to myself. But i don't think that it belongs to the different extensions, because its on every single one. Tha changes i made:
  • $wgExtensionAliasesFiles["name] => $wgExtensionMessagesFiles["nameAliases"]
  • $aliases => $specialPageAliases 79.199.60.237 16:48, 23 March 2013 (UTC)
Don't ask me how, but without any changes or reuploades everything works now. Thanks for the fast answer :) 79.199.60.237 17:27, 23 March 2013 (UTC)

no link to download the picture I want to use. Wondering why and what to do? This is the picture http://www.mediawiki.org/wiki/File:Jeff_Porcaro_Toto_Fahrenheit_World_Tour_1986.jpg Chopsooy (talk) 04:23, 24 March 2013 (UTC)

Click the "Full resolution" link below the image. That is the original resolution. 88.130.115.230 13:04, 24 March 2013 (UTC)
Got it...thanks Chopsooy (talk) 06:56, 13 April 2013 (UTC)

Upgrade problems

I was told that update.php prolly doesn't work due to some .php issues with my host, so I'm trying something new to me www.mediawiki.org/wiki/Mw-config. After selecting the languages on the first page I immediately get the following errors:

  • After selecting the languages at '''http://www.MySite.org/w/mw-config''' I get the following errors:
  • Warning: include_once(/languages/SF_LanguageEn.php) [function.include-once]: failed to open stream: No such file or directory in $IP/public_html/w/extensions/SemanticForms/SemanticForms.php on line 312
  • Warning: include_once() [function.include]: Failed opening '/languages/SF_LanguageEn.php' for inclusion (include_path='$IP/public_html/w:/home/every821/public_html/w/includes:$IP/public_html/w/languages:.:/usr/lib/php:/usr/local/lib/php') in $IP/public_html/w/extensions/SemanticForms/SemanticForms.php on line 312
  • Fatal error: Class 'SF_LanguageEn' not found in $IP/public_html/w/extensions/SemanticForms/SemanticForms.php on line 316

I've tried to edit-out the extension until after the install script is run, didn't work, still get the exact same errors. Might be that I'm editing-out in the wrong directory. - FlightTime (open channel) 19:48, 24 March 2013 (UTC)

Hi!
I first thought you would have a path problem: When you use $IP, this should contain the path to your wiki installation, so that after $IP you only have to add the part "inside" your wiki directory (in your case inside the w/ directory).
But then I realized that $IP seems not to be replaced in the path, which is tried to be called there. I would like to know how that can happen.
Maybe it is best to deactivate the extension "SemanticForms". Also make sure that you do not see cached content (there might be an opcode cache on the server and there is your browser cache). 88.130.107.74 21:49, 24 March 2013 (UTC)
Yeah, I just changed the path for the ease of posting. I have had this happen during upgrades before but I was using PuTTY to run the update script, back then editing out the require once for whichever extension was in conflict and that would work and the just re-activate the extension after the update and all was usually well. With the MediaWiki config script I don't get to that point. Thank you for your reply by the way. Mlpearc (powwow) 22:21, 24 March 2013 (UTC)
However, unless SemanticForms is completely different to the other extensions I know, when you comment that include statement for the SemanticForms extension, it should actually no longer be included. Make sure that you do not see cached content (there might be an opcode cache on the server and there is your browser cache).
Might be that you are editing-out in the wrong directory?! 88.130.107.74 01:28, 25 March 2013 (UTC)
be sure you included SemanticForms in LocalSettings.php as:
include_once("$IP/extensions/SemanticForms/SemanticForms.php");
with double quotes instead of single quotes. Single quotes in strings do not expand variables. Ciencia Al Poder (talk) 10:47, 25 March 2013 (UTC)
Thank you, Ciencia Al Ponder; that must have been a typo I've check the command and it is correct. I have made it through the MWconfig wizard and now dealing with this:
[7f58ccd6] 2013-03-26 01:17:31: Fatal exception of type MWException
Have no idea what this is :P Mlpearc (powwow) 01:25, 26 March 2013 (UTC)
See Manual:How to debug for information about how to display error information. Ciencia Al Poder (talk) 10:25, 26 March 2013 (UTC)

Approve account before they are able to login

I have a request since I don´t have the skills to create this my self. I´ve been looking on ConfirmAccount Extension which is almost what I need. Alltough we don´t have the possibillity to use email on our wiki so I can´t use that extension.

What I wan´t is to let users create their own account´s with password and all like normal. But all accounts will be declined login access untill approved by sysop or something.

I was thinking about creating a new column (approved_account) in user table with autoset value, for example 0 and in login code add an extra if approved_account = 0 then decline login.

I have tried multiple times but I have no idea how to solve this. What I put together so far is seen below, but it might be totally wrong.

I would appreciate some help.

include("$IP/includes/SpecialUserlogout.php");


function Auth_remote_user_hook()
{
  global $wgUser;
  global $wgRequest;

  // For a few special pages, don't do anything.
  $title = $wgRequest->getVal('title');
  if ($title == 'Special:Userlogout' ||
      $title == 'Special:Userlogin') {
    return;
  }

  $wgUser = User::loadFromSession();
  $username = strtolower($wgUser->getName());
  $dbr = wfGetDB( DB_SLAVE );
  $res = $dbr->select(user_name, approved_account FROM user WHERE user_name = $wgUser);

  if( approved_account = '0' ) {
    wfSpecialUserLogout();
  }

  if ($wgUser->isLoggedIn()) {
    return;
  }

MWMP (talk) 08:13, 25 March 2013 (UTC)

Some recomended me to use some existing hooks.
I tried to read about it but I´m not sure if I understood it correctly.
This is what I´ve done so far.
Am I going the right direction?
<?php
     $wgExtensionCredits['validextensionclass'][] = array(
       'path' => __FILE__,
       'name' => 'Approve Account',
       'author' =>'Markus', 
       'url' => 'https://www.mediawiki.org/wiki/Extension:Approve_Account', 
       'description' => 'This extension require admin to allow recently'.
                        ' registered users to login',
       'version'  => 0.1,
       );
       $wgHooks['AddNewAccount'][] = 'approve_accountHooks::onAddNewAccount';
       $user = User::loadFromSession();
       $dbr = wfGetDB( DB_SLAVE );
       $res = $dbr->select('user_name, approved_account FROM user '.
                           "WHERE user_name = $user");
       if( approved_account == '0' {	
       }
}
MWMP (talk) 08:53, 27 March 2013 (UTC)
I don't understand exactly what you're trying to do. I suggest it would be easier to create a new group "approved" and allow people to set up accounts as usual.
Make sure the 'user' group's permissions are limited so that they can't do what you don't want un-approved users doing. This would include things like editing or reading pages in a certain namespace (or even the whole wiki).
This allows you to use the built-in permissions system to approve users for a particular ability by hand. For example, you could allow users to log in but do nothing else until they had been approved. MarkAHershberger(talk) 11:10, 27 March 2013 (UTC)
User groups permission doesn´t prevent anyone from logging in.
I would like to prevent them from doing that aswell.
I think I´m in my way here.
I have managed to create an extension och I think the SQL statement is working.
Alltough what I´m not able to do is fetch approved_account so that I could place it in a if statement.
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
echo <<<EOT
To install the Test extension, put the following line in your
LocalSettings.php file:
require_once( "\$IP/extensions/Test.php" );
EOT;
exit( 1 );
}
$current_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
$wgSpecialPages[ 'Test' ] = 'SpecialTest';
global $wgRequest;
class SpecialTest extends SpecialPage {
function __construct() {
parent::__construct( 'Test' );
}
function execute( $par ) {
global $wgOut, $wgUser;
$wgUser->getName();
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select(
'user',
array( 'user_name', 'approved_account' ),
'user_name = ".$wgUser."',
__METHOD__,
array()
);
$wgOut->addHTML('Hej '.$wgUser.'.');
}
} MWMP (talk) 14:05, 27 March 2013 (UTC)
If un-approved users log in and you've taken away all privileges of the 'users' group, then they couldn't even see the content of your wiki. I don't understand what benefit you gain by keeping them from logging in. MarkAHershberger(talk) 14:33, 27 March 2013 (UTC)
You may want to checkout Extension:ConfirmAccount instead. Krinkle (talk) 21:43, 27 March 2013 (UTC)
As I wrote above we are not able to use that extension due to we don´t have email functionallity.
I´m trying to create my own extension for this, I am trying piece by piece.
Below code works It print the Welcome [Username].
But How should i formulate to print user_name and approved_account value from database on that specific user?
<?php
/**
* Prevent a user from accessing this file directly and provide a helpful
* message explaining how to install this extension.
*/
if ( !defined( 'MEDIAWIKI' ) ) {
echo <<<EOT
To install the Test extension, put the following line in your
LocalSettings.php file:
require_once( "\$IP/extensions/Test.php" );
EOT;
exit( 1 );
}
// Extension credits that will show up on Special:Version
$wgExtensionCredits[ 'other' ][] = array(
'path' => __FILE__,
'name' => 'Test',
'author' =>'Your Name Here',
'url' => 'https://www.mediawiki.org/wiki/Extension:Test',
'description' => 'This extension is an Test extension',
'version' => 1.0,
);
// Find the full directory path of this extension
$current_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
// Tell MediaWiki about the special page
$wgSpecialPages[ 'Test' ] = 'SpecialTest';
global $wgRequest;
class SpecialTest extends SpecialPage {
function __construct() {
parent::__construct( 'Test' );
}
/**
* Make your magic happen!
*/
function execute( $par ) {
global $wgOut, $wgUser;
$wgUser->getName();
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select(
'user', // $table
array( 'user_name', 'approved_account' ), // $vars (columns of the table)
'user_name = ".$wgUser."', // $conds
__METHOD__, // $fname = 'Database::select',
array( 'ORDER BY' => 'user_name ASC' ) // $options = array()
);
$output = ;
foreach( $res as $row ) {
$output .= 'Catgeory ' . $row->user_name . ' contains ' . $row->approved_account . " entries.\n";
}
$wgOut->addHTML('Welcome '.$wgUser.'.');
}
}
MWMP (talk) 07:26, 3 April 2013 (UTC)

PEAR mail package is not installed

Trying to use SMTP to send emails. I have installed pear and put the settings in LocalSettings.php but I still get the Pear mail package not installed - I must be missing something.

Versions:

MediaWiki 	1.19.1
PHP 	5.2.6 (apache2handler)
MySQL 	5.0.67

LocalSettings.php

$wgSMTP = array(
 'host'     => "mail.server.location", // could also be an IP address. Where the SMTP server is located
 'IDHost'   => "mywiki.org",      // 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' => "username",     // Username to use for SMTP authentication (if being used)
 'password' => "passwd"       // Password to use for SMTP authentication (if being used)
);

Output of pear list

Package          Version State
Archive_Tar      1.3.2   stable
Auth_SASL        1.0.6   stable
Console_Getopt   1.2.3   stable
Log              1.9.11  stable
Mail             1.2.0   stable
Mail_Mime        1.8.7   stable
Net_SMTP         1.6.1   stable
Net_Socket       1.0.10  stable
PEAR             1.7.1   stable
Structures_Graph 1.0.2   stable

I have restarted apache to no avail. I have not yet rebooted the whole server.

Any help appreciated. 82.71.191.193 (talk) 14:33, 25 March 2013 (UTC)

Follow this checklist. Specially, be sure that PHP include_path setting contains the PEAR installation directory Ciencia Al Poder (talk) 10:48, 26 March 2013 (UTC)

Does Mediawiki have user create article numbers count?

Basically, I need to know how many articles does certain user created. Wikipedia use http://toolserver.org to archive this purpose.

How can I know this number in my own wiki? Deletedaccount4567435 (talk) 20:51, 25 March 2013 (UTC)

The source for the toolserver program should be available. You could use that to query your own database. MarkAHershberger(talk) 16:27, 26 March 2013 (UTC)

[RESOLVED] How can you add a list of undefined length to a template?

Hi,

I am creating a template, and it is working and looking nice. Now, I would like a part of the template to include a list of undefined size.

For example I would like to have 'MyList', and then when that part of the template is used 'MyList' each time this template is used there may be a different number of bulleted items in the list.

I did not see any examples of such a situation in the help:template or in the help:list. Can this be done?

Thanks!

-Chris Blahcseigel (talk) 21:32, 25 March 2013 (UTC)

Just pass the bulleted list to the template as a parameter
{{yourtemplate
| bulletedlist = <nowiki/>
* Item 1
* Item 2
* Item 3...
}}
Depending on how do you setup the template, you may need the <nowiki/> tag there so the first item is placed at a new line and treated as a bulleted list. It can be included directly inside the template, placing the parameter at the next newline. Ciencia Al Poder (talk) 10:51, 26 March 2013 (UTC)
Thank you! That works, and is quite simple. Blahcseigel (talk) 13:17, 26 March 2013 (UTC)

Extension Search Help

Hi,

I have made a wiki that deal with legal documents, meaning that each document would have different editions of itself on different pages. What I need help with is, finding an extension that compares pages, for example highlighting their differences and can tell that its the same document but with different editions. If said extension even exist.

Thank you for your time. Azfar~mediawikiwiki (talk) 04:35, 26 March 2013 (UTC)

I don't know of such a thing, but you might look at Cacycle's javascript implementation and see if it could be adapted to do what you want. MarkAHershberger(talk) 16:18, 26 March 2013 (UTC)
You can do a diff between two revisions of a page, but also between revisions of different pages, although there's no user interface for this.
You can click on a diff link in a page history. The URL should end in something like &diff=XXXXX&oldid=YYYYY. Changing XXXXX and YYYYY with two arbitrary revision id's even of different pages will produce a diff between them.
Of course, that requires you manually doing the comparision, there's nothing to just do a search for pages that are the same. Ciencia Al Poder (talk) 10:45, 27 March 2013 (UTC)

Is MediaWiki Compatible WIth Other Software?

I want to have a feature with my website. I think it is called "Logging In Globally". If you are logged in "Here", you are automatically logged in "There". I have installed this software: MediaWiki, WordPress, and SMF. Can these connect to each other? In Correct (talk) 04:45, 26 March 2013 (UTC)

Which software do you want to be the canonical source for users? That is, do you have SMF users already and want their login to work in MediaWiki? Or do you want your WordPress users to be able to log in?
There are various extensions available to do authentication, but you might have to find someone to write the one you want. You should probably look at the OpenID extension, although that wouldn't provide automatic logins. MarkAHershberger(talk) 16:15, 26 March 2013 (UTC)
I am going to try to connect everything to SMF. Is it possible for Wordpress to be connected to SMF and MediaWiki to be connected to SMF? How do I ask somebody; I there a Wish List? In Correct (talk) 16:58, 26 March 2013 (UTC)
You could file a feature request as a bug report, but that isn't likely to get any action soon. Since you want SMF to be the canonical source for users, I would ask the SMF community if something like this has already been done. It looks like they use MediaWiki for their site so they probably already have something you can use. If you find out that they do, please let us know!
Otherwise, if you can afford it, there are a number of consultants like myself available that could probably take care of this for you. MarkAHershberger(talk) 17:09, 26 March 2013 (UTC)

Cannot create or change pages

I have absolutely same problems with POST pages into server. (Ubuntu, Apache2, MediaWiki, PHP5, MySQL) I can read existing installed pages, can change logo, add and change user's account but cannot change existing or create new pages.

The restart of Apache doesn't help.

May be somebody has helpful solution? 81.23.112.250 (talk) 14:25, 26 March 2013 (UTC)

What does your error log say? MarkAHershberger(talk) 18:12, 26 March 2013 (UTC)
If your POST data simply disappears (for example, trying to upload gives you the upload page again with no error, etc) one of the common reasons is a bad $wgServer or apache rewrite rules/alias mismatch with it. It must match the host you're accessing.
For example, if you have a $wgServer set to example.com but you access your page to www.example.com, even if both are hitting the same server, and some rewrite rules or alias is redirecting between one to the other, the POST data is lost on the redirect. Ciencia Al Poder (talk) 10:41, 27 March 2013 (UTC)

Internal error when attempting to create user or reset password

Hi All;

I get this if I try and reset a password, or if I try and create a user via email:

Internal Error: [2f4c252e] 2013-03-26 18:51:27: Fatal exception of type MWException


Here is my version info:

Installed software

Product Version MediaWiki 1.20.2 PHP 5.3.3 (apache2handler) PostgreSQL 9.2.2


Entry point URLs

Entry point URL Article path /cswiki/index.php/$1 Script path /cswiki index.php /cswiki/index.php api.php /cswiki/api.php load.php /cswiki/load.php


Thoughts?

Thanks in advanced 216.98.193.98 (talk) 18:54, 26 March 2013 (UTC)

Have you tried turning on the debug log? MarkAHershberger(talk) 19:05, 26 March 2013 (UTC)
I get this:
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::crypt/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: openssl_random_pseudo_bytes generated 4 bytes of strong randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
UserMailer::send: sending mail to Brianf <brianf@ourdomain.com>
Class PEAR_Error not found; skipped loading
216.98.193.98 19:46, 26 March 2013 (UTC)
Well, that doesn't give us any information about the exception. What if you turn $wgShowExceptionDetails on? MarkAHershberger(talk) 19:55, 26 March 2013 (UTC)
I saw a message that pear-mail was not installed, I installed it via yum, now the password reset page just hangs with no added debug output.
I do however see this in the apache log:
PHP Notice: unserialize(): Error at offset 0 of 53 bytes in /var/www/html/wikidir/includes/objectcache/SqlBagOStuff.php on line 539, referer: http://csintweb1/cswiki/index.php/Special:PasswordReset 216.98.193.98 21:18, 26 March 2013 (UTC)
If the page now hangs, it could be some sort of timeout, probably it can't connect to the mail server.
Check that firewall isn't blocking connections to the mail server and that you have correctly set the mail server's hostname and port appropiately. Ciencia Al Poder (talk) 10:37, 27 March 2013 (UTC)
Note, the Class PEAR_Error not found is a normal message in the debug log. Its not something to worry about.
The PHP notice is very odd, and suggests something is rather broken with caching....
Setting $wgShowExceptionDetails = true; in LocalSettings.php and telling us what the exception is would really help in narrowing down the error. Bawolff (talk) 11:49, 27 March 2013 (UTC)

Function to check user rights

what is the function/object to check to see if a user has a right enabled

what i am trying to do is make the siteadmin or my one write call siteowner to be unblockable from the site ipblock-exempt and proxyunbannable only cover ip blocks but i want the user to be immune from username, email etc blocks

i understand php so need to know where in the code i can check for the right and act accordingly

MediaWiki v1.17.0 65.100.204.74 (talk) 07:49, 27 March 2013 (UTC)

Check out Title::userCan (includes/Title.php) and various methods in the User class (includes/User.php) for user rights.
Note blocking is generally separate from user rights. Bawolff (talk) 11:52, 27 March 2013 (UTC)
Also User::isAllowed() MarkAHershberger(talk) 11:55, 27 March 2013 (UTC)

hook to append html directly before the site is send to the browser

Hi,

i'm looking for a hook to append some html to a page before it's send to the browser. I found BeforePageDisplay but it allows always to add scripts, metainfos, etc. not "pure" html.


Is there any hook for me?

Thanks, Martin 146.60.134.122 (talk) 17:55, 27 March 2013 (UTC)

What about saving the thing, which you want to append, with the page? That can be done with the hook ArticleSave. 88.130.70.95 18:01, 27 March 2013 (UTC)
Hi
I think i get a problem, if the content is dynamic. In this case i've to disable cacheing, which will slow down the site. 146.60.134.122 09:54, 28 March 2013 (UTC)

Problem watching and unwatching pages

When trying to perform a watch or unwatch action I get the following error "TypeError: mw.messsage is not a function" (load.php - line 36 for mwUriGetAction) on MW 1.20.3 This appears to be a skin independant problem. Help and hints are welcome. :) 24.134.93.242 (talk) 22:48, 27 March 2013 (UTC)

Either you set $wgEnableWriteAPI to "false" entirely or your users are not permitted to use it, e.g. $wgGroupPermissions['user']['writeapi'] = false;. Setting this to "true" should help. [[kgh]] (talk) 09:32, 28 March 2013 (UTC)

Fetch value from database and print it!

Hi there,

I´m trying to retrieve data from the database which contains values for the logged in users, and at this point i´m just trying to print the values to make sure I managed to retrieve the data I wanted. Alltough below code prints 'Hi' but not the user_name and approved_account value for the logged in user. How should I do to fetch the values from the database and print them?

function execute( $par ) {
global $wgOut, $wgUser;

$wgUser->getName();

$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select(
'user', // $table
array( 'user_name', 'approved_account' ), // $vars (columns of the table)
'user_name = ".$wgUser."', // $conds
__METHOD__, // $fname = 'Database::select',
array( 'ORDER BY' => 'user_name ASC' ) // $options = array()
);

$wgOut->addHTML('Hi '.$res('user_name').' . '.$res('approved_account').'.');

}
MWMP (talk) 08:45, 28 March 2013 (UTC)
a couple of things. $wgUser and $ wgOut are deprecated and should no longer be used (the same objects are available via resource context).
your function should look more like: (note I didnt change wgUser to new form because im typing this on my phone, and if I don't check ill probably do it wrong. however $this->getUser() and $this->getOut() is probably what it should be.
function execute( $par ) {
 global $wgOut, $wgUser;
 $dbr = wfGetDB( DB_SLAVE );
 $res = $dbr->select(
  'user', // $table
  array( 'user_name', 'approved_account' ), // $vars (columns of the table)
  array( 'user_name' => $wgUser->getName() ), // $conds
  __METHOD__, // name for profiling purposes
  array( 'ORDER BY' => 'user_name ASC' ) // $options = array()
 );
 $wgOut->addHTML(htmlspecialchars ('Hi '.$res->user_name . ' . '.$res->approved_account . '.'));
}
hopefully I didnt make any typos ;)
the change to the where clause is for proper escaping to prevent potential sql injection. note approved_accounts is not a field in the user table. im assuming that you added it. if its not actually in the user table you would havr to do a join to whatever table it is in, instead of what is donr here. last of all the order by is kind of pointless if you are only retrieving a single result. im assuming you plan to make the query more complex later. the sql abstraction layer can be confusing at the beginning. if you have any questions please don't hesitate to ask. Bawolff (talk) 23:55, 28 March 2013 (UTC)

Automatic and transparent local upload of cached Instantcommoned files

MediaWiki: 1.20.3, PHP: 5.4.12, MySQL: 5.5.29, OS: Windows 7

Currently working on content for my wiki, installed using a Bitnami solution stack and with the help of copious amounts of swearing while configuring stuff. Everything so far are working as expected (short URLs, Tidy, wikEd custom buttons, subpages, imported templates, heck even managed to fix broken numbered lists when using blocks of preformatted text).

Except instantcommons. Mostly this was because I didn't really read carefully how IC worked. I expected that if [[File:Imbox notice.png]] did not exist locally, it would initially display it from commons, upload a local copy (with relevant metadata), then any subsequent reloads of the page would now load said local copy. What it actually does is just cache the image locally but it does not upload any file to my wiki; once cache time expires it reloads images from commons. Which is why I noticed how IC actually worked since I often need to work on my wiki without an internet connection. It should be noted though that I haven't configured anything yet for uploading (if this is in any way relevant).

So... Is there a script that can automate uploading cached instacommons files to my wiki? I have no intention to release this into the wild (well except to my content development team) so security really isn't an issue. Pseudointellectualhack~mediawikiwiki (talk) 09:48, 28 March 2013 (UTC)

not really what you are asking but enabling upload file from url can making copying them over by hand much easier. see manual:$wgAllowCopyUploads. Bawolff (talk) 23:34, 28 March 2013 (UTC)

MessagesEn.php is missing.

Hello Support people.

I'm having a problem while trying to install MediaWiki on a shared hosting environment running Windows 2008 IIS 7 on a and on a Windows 2012 IIS 8 running PHP Version 5.3.16 FastCGI

cgi.fix_pathinfo is enabled The file MessagesEn.php does exist in the directory path. /languages/messages/MessagesEn.php

The LocalSettings.php doesn't exist because I haven't been able to install the web application so I can't edit the $IP setting. Any ideas on how I can fix this problem I'm getting?

I get this error right after I click on "Please set up the wiki first. "

MessagesEn.php is missing.

Backtrace:

  1. 0 E:\web\whtest04\includes\LocalisationCache.php(309): LocalisationCache->initLanguage('en')
  2. 1 E:\web\whtest04\includes\LocalisationCache.php(244): LocalisationCache->loadItem('en', 'namespaceNames')
  3. 2 E:\web\whtest04\languages\Language.php(386): LocalisationCache->getItem('en', 'namespaceNames')
  4. 3 E:\web\whtest04\includes\search\SearchEngine.php(345): Language->getNamespaces()
  5. 4 E:\web\whtest04\includes\User.php(1233): SearchEngine::searchableNamespaces()
  6. 5 E:\web\whtest04\includes\User.php(2230): User::getDefaultOptions()
  7. 6 E:\web\whtest04\includes\context\RequestContext.php(287): User->getOption('language')
  8. 7 E:\web\whtest04\includes\StubObject.php(182): RequestContext->getLanguage()
  9. 8 E:\web\whtest04\includes\StubObject.php(127): StubUserLang->_newObject()
  10. 9 E:\web\whtest04\includes\parser\ParserOptions.php(379): StubObject->_unstub()
  11. 10 E:\web\whtest04\includes\installer\Installer.php(375): ParserOptions->__construct()
  12. 11 E:\web\whtest04\includes\installer\WebInstaller.php(129): Installer->__construct()
  13. 12 E:\web\whtest04\mw-config\overrides.php(50): WebInstaller->__construct(Object(WebRequest))
  14. 13 E:\web\whtest04\mw-config\index.php(23): InstallerOverrides::getWebInstaller(Object(WebRequest))
  15. 14 E:\web\whtest04\mw-config\index.php(18): wfInstallerMain()
  16. 15 {main} Martin55~mediawikiwiki (talk) 21:21, 28 March 2013 (UTC)
well does the file E:\web\whtest04\languages\messages\MessagesEn.php exist? if not re download mediawiki and try again. Bawolff (talk) 23:29, 28 March 2013 (UTC)
Hello,
Thank you for your help.
Yes as stated in my original post the file does exist in the directory on the web server and in the exact path you've asked too. Martin55 (talk) 05:39, 29 March 2013 (UTC)
I forgot to add that I'm also using version MediaWiki 1.20.3 Martin55 (talk) 05:42, 29 March 2013 (UTC)
my apologies. I totally missed that line in your original post. could you check your php error log in case there are any permission denied errors or things of that sort. Bawolff (talk) 16:13, 29 March 2013 (UTC)
Hi Bawolff,
Thanks for the help so far. The error logs aren't getting logged on the server and its a shared hosting environment that I don't have access to change the setting to enable them. So I can't use that option :(
I tied running Developer Tools in Google Chrome during the installation process and I get a 500 Error message code in Google Chrome. I check the permissions on the account and they have full read and write access.
Odd thing is. The installation works when installing it on a subdirectory. I don't get the error message. I only get the error message when trying to install it on the root directory. Martin55 (talk) 00:03, 30 March 2013 (UTC)
So the only reason I might get this error is the following:
- Permissions are messed up
- File doesn't exist
- File could be corrupt
- The path to the file may not be correct in the code since the hosting environment maybe a little off? (is there a way I can change the file path settings and if there is where can I change it?) Martin55 (talk) 00:22, 30 March 2013 (UTC)
That's likely causes. However it could be something else.
Try putting the following at the top of index.php (right after <?php .
error_reporting( -1 ); ini_set( 'display_errors', 1 );
</pre >
Bawolff (talk) 01:33, 30 March 2013 (UTC)
Hi Bawolff again Thank you for your help so far
I tried added that line on the root index.php file and in the directory's /mw-config/index.php file. Still the same error. The error I provided to you happens on the page /mw-config/index.php
No new errors after I added the line in the code. Martin55 (talk) 01:06, 1 April 2013 (UTC)

[RESOLVED] How to use
    within parser function? / Display a custom header above references

    I have been trying to get an answer to this question since November 2012:
    How can I use <references /> within a parser function?
    Please see what I've tried so far.

    Thanks for any help! Stefahn (talk) 22:46, 28 March 2013 (UTC)

    you cannot use it as a test for #if. sorry :(
    you can use it inside arguments of parser funcs that get displayed, but I don't think that is what you are asking. Bawolff (talk) 23:25, 28 March 2013 (UTC)
    Thanks for your reply, Bawolff.
    I want the references to be added automatically if there's at least one ref tag within the wikitext.
    Is there a PHP function with which I can check whether the wikitext contains a certain string (in my case "<ref") ?
    If yes I could a write a small custom extension to solve my problem.
    Thanks! Stefahn (talk) 09:42, 29 March 2013 (UTC)
    You can add <references /> always, even if there's no <ref></ref> on the page. It won't display anything and won't give any error. Ciencia Al Poder (talk) 12:08, 29 March 2013 (UTC)
    Yes, I know. But I also need a headline above <references />. This headline should only be displayed if there is a ref tag. Do you think I can hack into the Cite extension directly? :) Stefahn (talk) 13:25, 29 March 2013 (UTC)
    You can hack into the Cite extension if you know what are you doing.
    Otherwise, I'd just recommend you to add a parameter on that template and fill it manually on each page that contains ref tags, since someone had to put that template or ref tags already on the page. Basically, you're trying to automate things that already needs manual intervention. Ciencia Al Poder (talk) 15:57, 29 March 2013 (UTC)
    yes you could hack the cite extension. Most clean way i think would be to introduce a {{numberofrefs}} magic word which would be allowed in the #if test.
    if you just want to add the header for all pages pn your wiki, you could try editing the page mediawiki:cite_references_prefix on your wiki. Bawolff (talk) 16:09, 29 March 2013 (UTC)
    Thanks a lot for the hint with mediawiki:cite_references_prefix, Bawolff!
    This was absolutely what I was looking for - works like a charm now :) Stefahn (talk) 17:56, 3 April 2013 (UTC)

    Is it possible to enable ssl for login user automatically?

    My users suffering from censorship in some area around the world. I want to send http content encrypt the website only for login users.(especially in countries with censorship). Is this possible? How can I archive this goal? Deletedaccount4567435 (talk) 04:36, 29 March 2013 (UTC)

    I believe you should be able to set $wgSecureLogin to true, and use a protocol-relative (like //www.server.org) URL in $wgServer. Reply if that doesn't work. Superm401 - Talk 04:51, 29 March 2013 (UTC)
    I have to say it does not work. The ssl was set up and work just fine by replace http by https manually.
    Mediawiki 1.20 set as:
    $wgServer = "http://zh.moegirl.org";
    $wgSecureLogin = true;
    The login icons in the up right become a gold lock, but the links to login & creat account page are still http. There is a option choice "keep https" but it does not work at all.
    If I set:
    $wgServer = "https://zh.moegirl.org";
    $wgSecureLogin = true;
    Then anonymous will get https page, BUT login users visit http page.I believe this is a mistake, someone write it opposite way compare to MW 1.17.
    Now I am using
    if(isset($_SERVER["HTTPS"]))
        $wgServer           = "https://zh.moegirl.org";
    else
        $wgServer           = "http://zh.moegirl.org";
    $wgSecureLogin      = true;
    
    but this is just a temporary solution, because if in localsetting will cause update failure. Zoglun (talk) 07:48, 30 March 2013 (UTC)
    Oh, ok, Now I know how to do.
    $wgServer = "//zh.moegirl.org";
    $wgSecureLogin = true; Zoglun (talk) 07:53, 30 March 2013 (UTC)

    examiner Rights we want to change an the Icon

    Hello, we in our Wiki have a little problem, we have in our Wiki a Rewiev like that from the Wikipedia. So we had the Idea, that we want to take the examiner Usergroup (at the Moment he has the unreviewedpages, autoreview, validate rights). With that Usergroup we want when an articel hab success the Rewiev, so he can mark the arktiel as "Review successfully passed". An we want to change the litte green Icon with a Box with Text who we kan write something in. But we don't know who we kan do that an if it's possilbe. We are a German Wiki so my English is not the best. The Version of MediaWiki is 1.18.1, PHP 5.3.3-7, an MySQL 5.1.66-0+squeeze1. The URL to our wiki are www.stargate-wiki.de, and if somebody from you understand German so he could read the complett discussion here http://www.stargate-wiki.de/wiki/StargateWiki_Diskussion:Hauptseite#Qualit.C3.A4tssigel_f.C3.BCr_Reviewte_Artikel . I Hope you can Help us. Thank you. Hammond~mediawikiwiki (talk) 10:46, 29 March 2013 (UTC)

    MediaWiki Update 1.15.3 -> 1.20.3: Update script causes error

    Hello everyone.

    While updating my Wiki from version 1.15.3 to 1.20.3 the update script gives this error:

    Adding index ls_field_val to table log_search ...
    An error occurred:
    Es gab einen Syntaxfehler in der Datenbankabfrage.
    Die letzte Datenbankabfrage lautete: „ALTER TABLE `log_search`
    DROP PRIMARY KEY,
    ADD UNIQUE INDEX ls_field_val (ls_field,ls_value,ls_log_id)
    “ aus der Funktion „DatabaseBase::sourceFile( /wiki/httpdocs/maintenance/archives/patch-log_search-rename-index.sql )“.
    Die Datenbank meldete den Fehler: „1091: Can't DROP 'PRIMARY'; check that column/key
    exists (localhost)“.
    Backtrace:
    #0 /wiki/httpdocs/includes/db/Database.php(916): DatabaseBase->reportQueryError('Can't DROP 'PRI...', 1091, 'ALTER TABLE `lo...', 'DatabaseBase::s...', false)
    #1 /wiki/httpdocs/includes/db/Database.php(3236): DatabaseBase->query('ALTER TABLE `lo...', 'DatabaseBase::s...')
    #2 /wiki/httpdocs/includes/db/Database.php(3148): DatabaseBase->sourceStream(Resource id #260, false, false, 'DatabaseBase::s...')
    #3 /wiki/httpdocs/includes/installer/DatabaseUpdater.php(478): DatabaseBase->sourceFile('/srv/www/vhosts...')
    #4 /wiki/httpdocs/includes/installer/DatabaseUpdater.php(524): DatabaseUpdater->applyPatch('patch-log_searc...', false, 'Adding index ls...')
    #5 [internal function]: DatabaseUpdater->addIndex('log_search', 'ls_field_val', 'patch-log_searc...')
    #6 /wiki/httpdocs/includes/installer/DatabaseUpdater.php(332): call_user_func_array(Array, Array)
    #7 /wiki/httpdocs/includes/installer/DatabaseUpdater.php(294): DatabaseUpdater->runUpdates(Array, false)
    #8 /wiki/httpdocs/includes/installer/DatabaseInstaller.php(274): DatabaseUpdater->doUpdates()
    #9 /wiki/httpdocs/includes/installer/WebInstallerPage.php(541): DatabaseInstaller->doUpgrade()
    #10 /wiki/httpdocs/includes/installer/WebInstaller.php(269): WebInstaller_Upgrade->execute()
    #11 /wiki/httpdocs/mw-config/index.php(50): WebInstaller->execute(Array)
    #12 /wiki/httpdocs/mw-config/index.php(18): wfInstallerMain()
    #13 {main}

    PHP 5.4.11, MySQL 5.4.11 (cgi-fcgi).

    What can I do? Sebbl2go (talk) 23:14, 29 March 2013 (UTC)

    Take a backup of the database and run the update script again. It likely works then. 88.130.92.51 09:42, 2 April 2013 (UTC)

    [RESOLVED] How to allow users to edit articles created by them?

    Hello all! How can make it that users who create articles can edit them, but others (except administrators)? Fokebox (talk) 13:04, 30 March 2013 (UTC)

    Extension:AuthorProtect. If I understand your question correctly. Mlpearc (powwow) 19:57, 31 March 2013 (UTC)
    That's what I need! I try it as soon as possible! Thx Fokebox (talk) 20:09, 31 March 2013 (UTC)
    Thx! Perfect extension! Works perfectly! Problem resolved! Fokebox (talk) 19:01, 1 April 2013 (UTC)

    RestrictionTypes

    Is it possible to restrict reading a page with the "$wgRestrictionTypes" parameter, so that I can protect it with the button on the toolbar? If yes, how? RickyB98 (talk) 16:09, 30 March 2013 (UTC)

    No, $wgRestrictionTypes is to set which "types" of protection, ie.. edit, move, upload, create and so on. I will let someone else with more experience answer this question, one option is Extension:Lockdown. Cheers, Mlpearc (powwow) 16:31, 2 April 2013 (UTC)

    globalWrapper in Vector skin

    Hi, folks! I have configured my Wikipedia skin so the page text appears centered with a width of 750px. Now I'm trying to make the whole page (left bar included) to look like that. Searching out there, I found that some skins have a globalWrapper HTML div element that would solve the thing by adding this. But the usual Vector skin lacks that wrapper - other users like this would enjoy that too.

    My questions are: is it possible to add the globalWrapper to the Vector skin, and can you do it? And I mean adding if to the MediaWiki releases themselves, so all users in many wikis can fix their page widths. Thanks! --NaBUru38 (talk) 00:16, 31 March 2013 (UTC)

    If this wrapper would actually be needed to get what you want, then you could open a ticket in bugzilla and hope that someone changes the skin accordingly. But that might take some time and there is no guarantee that someone does at all.
    Maybe there is another way (through some fancy CSS definitions) to get what you want? 88.130.92.51 09:45, 2 April 2013 (UTC)
    Category:Support desk archives Category:Support desk archives using deprecated source tags Category:Support desk archives with broken file links