Jump to content

Project:Support desk/Flow/2012/03

Add topic
From mediawiki.org
Latest comment: 5 years ago by 2600:6C54:7800:FCAD:5826:A2C7:12BE:5413 in topic Permanent deletion?
This page is an archive.
Please ask questions on the current support desk.

FCK Editor Issues

Hi, I am receiving the following error message whenever I try to edit an article: Warning: Parameter 1 FCKeditor_MediaWiki:: onCustomEditor() expected to be a reference value given in (home directory)/public_html/(name of wiki)/includes/Hooks.php on line 117 Could you please tell me how to fix this or how to change to a different wysiwyg editor (e.g. tinyMCE)? Thank you! 124.191.80.117 (talk) 08:48, 1 March 2012 (UTC)

Is there somewhere else I should be asking this question? 124.191.80.117 10:04, 2 March 2012 (UTC)
You should probably ask the FCKEditor folks (or whomever maintains that extension). But I'm not sure if anyone actually does maintain it anymore. Bawolff (talk) 19:16, 4 March 2012 (UTC)

Set the category of a page using data filled in the form

Hi,

I am customizing the mediawiki to work as knowledge base of the TI systems of a enterprise. I have a form (property:System) which the user have to choose what systems the page that is being created is related. I need to set the Category of the page that is being created using the values filled in the property System in the form. How can i do this ? In my search i found the extension Semantic:WatchList, but i think there is a simple way to do it instead of using this extension.

MediaWiki Version : 1.18 PHP Version : 5.3.6 MySQL Version : 5.5.9

Thanks Guerciobr (talk) 14:10, 1 March 2012 (UTC)

Frames Displaying Incorrectly in Google Chrome

Hi, have a wiki site for a local sports group and the frames don't align correctly in google chrome (works fine in firefox and IE). website is here: http://hawaiiultimate.com/wiki/ most specifically, the left main panes always align BELOW the main body (in its column, however not in line with main body), evident in some of the longer pages.

Running: mediawiki 1.10.1 php 5.2.13 MySQL 5.0.45-community-nt

forgive me but i'm not extremely familiar with how databases work so go easy. i understand simple code and most of the methods of editing and maintaining wikis, but this one has stumped me. is it a versioning problem? is it difficult to upgrade?

mahalo for any help! jess HawaiiUltimate (talk) 00:50, 2 March 2012 (UTC)

Running: mediawiki 1.15.1, PHP 5.2.5, MySQL 5.0.24a. Wiki behind firewall.
Any recent updates on this? We recently (last few weeks) find same issue popping up between Chrome 26.0.1410.64 m and 33.0.1750.154 m:
In 26.0.1410.64 m : MediaWiki::Sidebar looks fine
In 33.0.1750.154 m : MediaWiki::Sidebar is laid out BELOW the main page body.
Best, Andrew. 148.168.40.126 15:16, 21 March 2014 (UTC)
Unrelated, but you might want to upgrade to a suported version of MediaWiki which still receives security upgrades. AKlapper (WMF) (talk) 15:43, 21 March 2014 (UTC)
I wouldn't be so sure that this is unrelated to the fact that his MediaWiki version is outdated. There again and again are cases, where a system breaks and after investigation you see that it just is not compatible with current browsers.
You should upgrade your wiki to a current version.
I in fact believe that this will actually solve the issue; people use all kinds of browsers on Wikipedia; if this problem would be there in current versions, there definitely would be an according bug report or it would already have been dealt with. Please report back, if upgrading solved the issue for you! :-) 88.130.95.0 17:45, 21 March 2014 (UTC)

How to hide delete articles in recent changes?

I use the recent changes RSS to announce the wiki got articles changed.

But a lot of spam use this way to show there F**K ADs in the twitter account.

The rss contain there ADs even after I delete it. For example:

http://wiki.moegirl.org/%E6%89%B9%E5%8F%91%E7%A1%AC%E8%BD%AF%E4%B8%AD%E5%8D%8E%E9%A6%99%E7%83%9F%E6%89%B9%E5%8F%91%E5%81%87%E7%83%9F%E3%80%90%E7%9C%9F%E7%83%9F%E6%8E%A5%E6%94%AF%E3%80%91%E8%AE%A2%E8%B4%A7%E7%94%B5%E8%AF%9D13925744694QQ2624473862_%E5%BC%A0%E5%8F%96
批发硬软中华香烟批发假烟【真烟接支】订货电话13925744694QQ2624473862 张取
2012-03-01T18:51:43Z

deleted“[[<a href="/index.php?title=%E6%89%B9%E5%8F%91%E7%A1%AC%E8%BD%AF%E4%B8%AD%E5%8D%8E%E9%A6%99%E7%83%9F%E6%89%B9%E5%8F%91%E5%81%87%E7%83%9F%E3%80%90%E7%9C%9F%E7%83%9F%E6%8E%A5%E6%94%AF%E3%80%91%E8%AE%A2%E8%B4%A7%E7%94%B5%E8%AF%9D13925744694QQ2624473862_%E5%BC%A0%E5%8F%96&action=edit&redlink=1" class="new" title="批发硬软中华香烟批发假烟【真烟接支】订货电话13925744694QQ2624473862 张取(尚未撰写)">批发硬软中华香烟批发假烟【真烟接支】订货电话13925744694QQ2624473862 张取</a>]]” 大量删除由Fa16698所创建的页面

Zoglun

How can I hide those deleted articles in recentchangs feed? like "hideredirs=1" add to URL? Deletedaccount4567435 (talk) 01:52, 2 March 2012 (UTC)

I think there was some means to add &bot=1 onto the end of a URL when removing vandalism, so that your action would show as being done by a site robot and therefore be absent from special:recentchanges unless the user clicks 'show bots'. I'm not sure if this is available for rollback, delete or both... but as far as I know the 'bot' flag is the quickest way to semi-hide something from recent changes.
"Bot rollback" is mentioned on Wikipedia:Administrators/Tools, Help:Reverting but no word of what happens if a 'bot deletes a page. Carlb (talk) 23:48, 3 March 2012 (UTC)
The way I do this is to modify the recent changes table in the database. Here, you can do a few different things:
  • Mark the individual edit as a bot edit. This will hide the edit, even if they weren't actually a bot. community who like you to be transparent)
  • Manually edit the summary to remove the spam link
  • Delete the whole RecentChanges entry for the spam (not recommended if your wiki has a large
Personally, I run a script that marks ALL deletions and blocks as bot edits, because they're very frequent and not important (due to spam), so it's better to let users see just the real edits when they go to Recent Changes. They can still click 'show bots' to include these edits.
The SQL for this is:
UPDATE recentchanges
SET `rc_bot` = 1
WHERE `rc_log_action` = 'delete' OR `rc_log_action` = 'block';
Gboyers (talk) 00:37, 4 March 2012 (UTC)
They are really good solution!
Thank you all! Zoglun (talk) 01:34, 4 March 2012 (UTC)
You can alternatively set up manual:RevisionDelete in order to hide log entries from folks. Bawolff (talk) 19:02, 4 March 2012 (UTC)

Extention: to take chunks of text and add html tags

What i want to do, is to take text, and add tags around it. Like i take a word "red" and color it red, without touching the wiki source that the user inputs. Without bypassing the caching schemes of mediawiki. I was thinking to take the final raw html, and work from there. How do i do that? From an extension of course. Super Quantum immortal (talk) 18:22, 2 March 2012 (UTC)

There's various Hooks you can use. Something like OutputPageParserOutput would bypass caching, ParserAfterTidy would run before the page was cached, but after its totally turned into html. Bawolff (talk) 19:16, 4 March 2012 (UTC)

How can I calculate my age using an expression? (for my user page)

Hi, My user page I tried to make this a proper interwiki link, but my en:User:3ICE attempt failed in the preview states:

  • I'm 19.

But that is because I last edited it about 2 years ago.

I would like to replace my age with a code snippet, to avoid making a new edit every year just to update it. (I do not wish to remove my age from my user page.)

How would I code Convert to years ( Current date - My birthday ) in MediaWiki's ParserFunctions Expr format? (Or some other programming language available on mediawiki) The help article did not cover subtracting dates, and googling around did not turn up anything I could use either. (I know, I probably didn't look hard enough.)

I study programming, but this problem has me stumped. Please help, 3ICE (talk) 21:05, 2 March 2012 (UTC)

p.s.: The Show Preview button does not cause the Subject to be previewed, I can only see my message's body.

p.p.s.: Some people made this page ridiculously wide, by posting URLs inside <pre/> tags. 3ICE (talk) 21:05, 2 March 2012 (UTC)

http://en.wikipedia.org/wiki/Template:Age Subfader (talk) 22:18, 3 March 2012 (UTC)

using urls in cite.php

I have a very simple template here, which includes<ref> tags but the footnotes don't work. See here for it in action. Is it not possible to use footnotes in a template? Modrobene (talk) 08:42, 3 March 2012 (UTC)

I'm not sure why that isn't working. Are you using up to date mediawiki/Cite extension.
As a work around try doing instead:
{{#tag:ref|[{{{Url}}} {{{Source}}}]}} Bawolff (talk) 19:05, 4 March 2012 (UTC)
I'm fairly certain it's up-to-date - is there a way to check? It's not given at Special:Version or in the /extensions directory. I would just reinstall to be sure but I have a broken wrist and I'm trying to avoid stressing my one good hand. I'll try when I get the cast off, your workaround is perfect for now. Thanks! Modrobene (talk) 01:51, 6 March 2012 (UTC)
I just double checked with the latest version, and it shows your issue, so it isn't a your-cite-is-out-of-date-issue, but actually a the-cite-extension-is-kind-of-broken issue.
The core issue is that the cite extension does not pass the frame to recursiveTagParse, so template parameters are not expanded. Hence I guess you'll have to stick with the work around I gave you. Bawolff (talk) 02:52, 6 March 2012 (UTC)
Filed as bugzilla:34999 (/me too lazy to fix... ) Bawolff (talk) 03:30, 6 March 2012 (UTC)

create hook extension form submission

I would like to create a popup box with a form to fill out when one edits a page. However, if I create it as a hook I have to return true; and I can't have a php form submitted as well. I can't figure out how to submit a form with a hook. Any help would be great. Thanks LTech (talk) 18:35, 3 March 2012 (UTC)

The subversion extensions trunk is locked or something

Subversion encountered an error:

svn: Working copy '/mnt/upload6/private/ExtensionDistributor/mw-snapshot/trunk/extensions' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

It has been over 24 hours Schalice (talk) 20:36, 3 March 2012 (UTC)

calling functions in a hook extension

I'm trying to write a hook extension. I have .php file which has:

// Load this php code. 
$wgAutoloadClasses['AddImages'] = $dir . 'AddImages.body.php';
//Hooks
$wgHooks['EditPage::showEditForm:fields'][] = 'AddImages::fnAddImages';

Then in AddImages.body.php I have the class and functions
Class AddImages{
        function form(){
//some php code
}
	function fnAddImages(){
	global $wgOut, $wgHooks, $wgUser;
// some code    $call form = form(); 
$wgOut -> $call form;     
return true; 
}
}

My issue is I need to call another function eg form() within fnAddImages() but when I try to I get the message: Fatal error: Call to undefined function form();

How to I call other functions in the class besides for the 'hooked' function? Am I missing something about understanding hooks? I need to output other data (form submission) besides for just returning true on the hooked function. I thought I would do this by calling other functions within the hook. Is there a better way to do this? Thanks, I'm really stuck on this. LTech (talk) 07:38, 4 March 2012 (UTC)

You should be able to do self::form() to call another function from the same class as your hook (statically anyways. To call non-statically use $this->form(). In your example you have the hook function being registered to be called statically, but the actual function not being declared as static). See http://www.php.net/manual/en/language.oop5.basic.php for more information. Bawolff (talk) 18:58, 4 March 2012 (UTC)
While at it, you may want to rename the class to AddImagesHooks and make sure that the statically called functions actually are static:
// Load this php code. 
$wgAutoloadClasses['AddImagesHooks'] = $dir . 'AddImages.hooks.php';
//Hooks
$wgHooks['EditPage::showEditForm:fields'][] = 'AddImagesHooks::doAdd';
 
# AddImages.hooks.php:
Class AddImagesHooks {
    public static function getFormHtml() {
        // some php code
    }
    public static function doAdd() {
        global $wgOut, $wgHooks, $wgUser;
        // some code
        $form = self::getFormHtml(); 
        $wgOut->addHtml($form); 
        return true; 
    }
}
Krinkle (talk) 00:19, 5 March 2012 (UTC)
Thank you so much, it works now. Tech (talk) 07:10, 5 March 2012 (UTC)

filter recent changes

Is it possible to filter "recent changes"?

For instance,

  • "I only want to see changes to pages beginning with 'A'"
  • "I only want to see changes to pages belonging to the American Civil War portal"
  • "I only want to see changes to pages from the XYZ category"

(My question applies to any wiki site, such as Wikipedia or editthis.info)

I browsed Wikipedia's help on this, including the linked MediaWiki page, but no luck. Thanks 213.112.128.96 08:21, 4 March 2012 (UTC)

Sort of... See special:recentchangeslinked. It can definitely do the third option, and possibly the second option depending on how you define things belonging to a portal. Bawolff (talk) 18:53, 4 March 2012 (UTC)

Wiki family

Hello!

I want to have some wikis in different languages, sharing the same media-files in another, single wiki. When all wikis are on one server all works. I use such code for language-wikis:

$wgUploadNavigationUrl = "http://commons.mydomen.org/index.php/Special:Upload";
$wgUseSharedUploads = true;
$wgSharedUploadPath = 'http://commons.mydomen.org/images';
$wgSharedUploadDirectory = '/volume1/web/commons/images/';
$wgHashedSharedUploadDirectory = true;

And everything works like with commons.wikimedia.org. But when language-wikis are on different server and have own IP, this code doesn't work. I undestand that problem is in $wgSharedUploadDirectory. But how to overcome this? Thanks for any help! ZelChief (talk) 10:33, 4 March 2012 (UTC)

Have a look at manual:$wgForeignFileRepos. If you want to use ForeignDBRepo/ForeignDBRepoViaLB (the most efficient option) you still need to have the upload directory locally accessible from each server. You can do something like nfs for that. (ForeignAPIRepo doesn't have that requirement, but is inefficient) Bawolff (talk) 18:51, 4 March 2012 (UTC)

Search problem

MediaWiki 1.18.1 PHP 5.2.17 (apache2handler) SQLite 3.3.7undefined

How can I enable fulltext search? Tree1891 (talk) 11:00, 4 March 2012 (UTC)

Problem with template:languages

Hi! I want to add multilanguage articles, but when I add {{Languages}} to my article, it appears as "Template:Languages" instead of available languages... How to fix it? 79.186.81.132 (talk) 18:44, 4 March 2012 (UTC)

Can you help me? 79.186.75.47 20:30, 4 March 2012 (UTC)
Sounds like you don't have a Languages template. Templates have to exist before they can be used. You can create Template:Languages yourself or import one from a wiki that has it. Reach Out to the Truth (talk) 23:56, 4 March 2012 (UTC)
Where can I import one? I really like this from mediawiki.org (here). 79.186.75.47 17:02, 5 March 2012 (UTC)
You can use special:Export here (make sure to check the include templates button). Then use special:import on your own wiki.
You may also need to have the ParserFunctions extension installed for most templates here to work. Bawolff (talk) 19:57, 5 March 2012 (UTC)

Mediawiki Templates

I created a new wiki over the weekend but HATE the template I chose!! Is there ANY way to change the template to something more simple ... like the template used here at mediawiki.org ... or at Wikipedia? Both of the mentioned sites are "cleaner" and simpler ...

My wiki is at: http://raogk.wikia.com/wiki/Random_Acts_of_Genealogical_Kindness_Wiki

Also ... I created the wiki with the same logon I use here ... is there any way to transfer "ownership" to another username so that I can receive all RAOGK emails at raogk_mcowan@yahoo.com vs. being indundated at my mcowan@erols.com email??

Could you also look at the questions I put on the talk page at the above wiki ... and reply to me at raogk_mcowan@yahoo.com

Is there any way to suppress the "Latest Activity" panel that persists on my wiki pages? Cowantex (talk) 22:26, 4 March 2012 (UTC)

You should really ask at wikia's help. This place is more for generic mediawiki questions (aka if you were hosting the site yourself I'd be able to tell you that you have to change $wgDefaultSkin in LocalSettings.php - but the procedure is different for a wikia wiki).
As for email. Generally you can change your email in the page special:Preferences page on the relavent wiki. Bawolff (talk) 20:30, 5 March 2012 (UTC)

passing values in editform hook

I've created a hook extension so when you edit a page there is a button 'add images' and a popup with a form comes up. $wgHooks['EditPage::showEditForm:fields'][] = 'AddImagesHooks::fnAddImages';

There are radio buttons 'upload image' or 'choose from existing'. However when I submit the form and look at the source code it only works for the id=editform and I can't pass any information though the form. It seems the hook 'editform' is overriding my form actions and method.

<form id="editform" name="editform" method="post" action="index.php?title=I_want_a_new_page&amp;action=submit" enctype="multipart/form-data"><form id="popup" action="index.php?title=I_want_a_new_page" method="get"><input name="addimage" type="radio" value="hello" />Choose from Exisiting
<input name="addimage" type="radio" value="go" />Upload Image
</form><button id="addImage">Add Image</button> How do I pass my values, overriding the 'editform' action? Also I get the message 'Remember that this is only a preview. Your changes have not yet been saved!' and 'Warning: This page was deleted after you started editing!' and everything is deleted. What is going on? Thanks LTech (talk) 07:55, 5 March 2012 (UTC)

from action = submit to same page

I am creating an XML from to submit in an extension. I want to set action as 'action' => self::getTitle()->getLocalURL( 'action=submit' ), but I get the error: Call to undefined method className::getTitle() How do I submit to the same page? LTech (talk) 08:17, 5 March 2012 (UTC)

You can't call getTitle statically. Try $this->getTitle() instead of self::getTitle(). Reach Out to the Truth (talk) 14:42, 5 March 2012 (UTC)
This would depend on the context of where this code is running. If its from a hook, it is very unlikely self::getTitle() (or $this->getTitle() for that matter) is the right thing to do in order to get the title. Bawolff (talk) 20:03, 5 March 2012 (UTC)

SMW Result Formats Timeline: Data range < 1900 doesn't appear

Hello,
I already have posted this query on the SMW Result Formats talk page, but it might be related to the general Mediawiki code - therefore here we go:

I recently have installed the latest revision of Mediawiki (1.18.1) and created my own wiki. I also installed the lates version of SMW (1.7.0.2) and Semantic Result Formats (1.7.0) in order to create a timeline with historic data from the village where I live. It all works perfectly well - except the fact that all dates prior to 1900 are not displayed in the timeline. In the documentation of the SMW Extension it says that dates back to the beginning of time are supported. However, somewhere inside the Mediawiki forums I read a hint that Mediawiki might only support dates back to approx. 1900 and not further back. Is this true and is there any workaround? I actually can't believe that there isn't one... Furthermore, I've seen other Mediawiki timeline extensions like EasyTimeline that show up historic data back to stoneages, therefore it's hard to believe that the reason for this behavour is Mediawiki.
URL of my page is: http://hvg-wiki.heimatverein-gymnich.de/index.php/Zeitleiste.
Versions:
PHP: 5.2.12-nmm2 (apache2handler)
MySQL: 5.1.43-nmm4-log
Could anybody please give me a hint?
Many thanks!
Sochin67 (talk) 09:22, 5 March 2012 (UTC)

Depending on how SMW is programmed, there may be issues with dates before Fri, 13 Dec 1901 20:45:54 UTC when using 32 bit php. (Some of MW's core date functions have issues [mostly because php has issues], so it depends on if SMW uses them or not).
p.s. These issues are not present if using 64-bit php. The issue is basically the reverse w:Year_2038_problem Bawolff (talk) 20:24, 5 March 2012 (UTC)
Dear Bawolff,
many thanks for your note, at least it's a first indication! That date you're mentioning in your post does correlate to the date where the issue appears in my timeline.

However, I spoke to my web hoster and he confirmed that their environment is running on 64 Bit. When checking the phpinfo I saw that the System is a 64 Bit one (Linux dd6904 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64), but is this what you mean? Or did you mean that the php installation as such needs to be a 64 Bit version? The PHP API listed in phpinfo is "20041225" and PHP Extension is "20060613".
Many thanks for another hint =;-)
Cheers!
Sochin67 (talk) 09:24, 6 March 2012 (UTC)
I believe both the OS and the php version would have to both be 64 bit, but it would be very odd to run 32 bit php on a 64bit host, so if the host is 64bit, there is a very good chance that the php version is 64 bit.
However, I'm at a loss as to how this could happen on a 64bit host... Bawolff (talk) 15:01, 6 March 2012 (UTC)
Too bad - but many thanks anyway!!! Sochin67 (talk) 20:29, 6 March 2012 (UTC)

uploaded image are not getting saved to page

Hi,

I am new to wiki. I have uploaded image but when I add it to page and click on 'show preview' it shows it.

but once clicked on 'save page', image will not be displayed.

I have tried adding image to page as [[File:filename.jpg]]


I am using mediawiki 1.17 Php 5.2+ Mysql 5.1+

Thanks in advance! 203.201.62.202 (talk) 14:18, 5 March 2012 (UTC)

It'd be helpful to have a link to your wiki. Bawolff (talk) 20:04, 5 March 2012 (UTC)
hey , my link is on local LAN , it is not public yet. 122.181.146.157 10:46, 6 March 2012 (UTC)
issue fixed!
just removed this line and deleted existing images and re uploaded.
$wgUploadDirectory = true;
It worked like a charm! 122.181.146.157 11:55, 6 March 2012 (UTC)

Cannot seem to secure my wiki from unauthorized account creations, edits, etc.

MediaWiki 1.15.2 PHP 5.3.5 (apache2handler) MySQL 5.1.54-log

I have a Mediawiki installation at Climatewiki.org. Over the past several months, we've had many occasions of unwanted spam entries, even edits to existing pages. After each episode, I would discover the LocalSettings.php had been modified back to less-secure settings. I'd replace it with my more-secure version and things would be fine again for awhile.

This episode is different. I've pasted my LocalSettings.php below. But it hasn't made a difference -- account creation is still being permitted, even though I'm fairly sure it shouldn't be. I'm wondering now if someone who knows more about this stuff than I do has somehow over-ridden the localsettings.php. How would they do that?

Any help would be appreciated. LocalSettings.php currently is (I've replaced with xxxxx passwords and other information I'd rather not share); relevant settings at the bottom of the file:

<?php

# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
# recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.

# If you customize your file layout, set $IP to the directory that contains
# the other MediaWiki files. It will be used as a base to locate files.
if( defined( 'MW_INSTALL_PATH' ) ) {
	$IP = MW_INSTALL_PATH;
} else {
	$IP = dirname( __FILE__ );
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );

require_once( "$IP/includes/DefaultSettings.php" );

# If PHP's memory limit is very low, some operations may fail.
# ini_set( 'memory_limit', '20M' );

if ( $wgCommandLineMode ) {
	if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
		die( "This script must be run from the command line\n" );
	}
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename         = "ClimateWiki";

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
$wgScriptPath       = '.' == '.' ? '' : "/.";
$wgScriptExtension  = ".php";

## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail      = true;
$wgEnableUserEmail  = true;

$wgEmergencyContact = "xxxxxxxxxx";
$wgPasswordSender = "xxxxxxxxxx";

## For a detailed description of the following switches see
## http://www.mediawiki.org/wiki/Extension:Email_notification 
## and http://www.mediawiki.org/wiki/Extension:Email_notification
## There are many more options for fine tuning available see
## /includes/DefaultSettings.php
## UPO means: this is also a user preference option
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;

$wgDBtype           = "mysql";
$wgDBserver         = "localhost";
$wgDBname           = "xxxxxxxx";
$wgDBuser           = "xxxxxxxx";
$wgDBpassword       = "xxxxxxxx";

# MySQL specific settings
$wgDBprefix         = "";

# MySQL table options to use during installation or update
$wgDBTableOptions   = "TYPE=InnoDB";

# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = false;

# Postgres specific settings
$wgDBport           = "5432";
$wgDBmwschema       = "mediawiki";
$wgDBts2schema      = "public";

## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = array();

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

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
# $wgHashedUploadDirectory = false;

## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX           = false;

$wgLocalInterwiki   = $wgSitename;

$wgLanguageCode = "en";

$wgProxyKey = "xxxxxxxxxx";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
$wgDefaultSkin = 'monobook';

## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
# $wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# $wgRightsCode = ""; # Not yet used

$wgDiff3 = "";

# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );


$wgLogo             = "/skins/monobook/climatewiki-logo.png";

# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['*']['edit'] = false;

# Anonymous users can't create pages or talk
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['createtalk'] = false;

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

Dbast (talk) 14:43, 5 March 2012 (UTC)

"After each episode, I would discover the LocalSettings.php had been modified back to less-secure settings." Let's talk about this first. Was it modified by someone authorized to do so, or have you been hacked? If it's the latter, further modifications to LocalSettings.php are unlikely to be of any help whatsoever. Sorry. Reach Out to the Truth (talk) 14:58, 5 March 2012 (UTC)
I definitely agree the question of who has been modifying these settings is the important one! Of five authorized users, only one besides me would have a clue as to how to do this. Hacking would seem to be a possibility, which I guess means the security issues run deeper than I feared. Thanks ... I think! Dbast (talk) 15:08, 5 March 2012 (UTC)
Well, if you have five people who could have done it, you could try asking them. If they all say they haven't done it, then definitely look into improving your security. Reach Out to the Truth (talk) 15:45, 5 March 2012 (UTC)
"Try asking them" -- why didn't I think of that? Oh, I did, and they all didn't. There is work to be done, for sure. Dbast (talk) 16:32, 5 March 2012 (UTC)
Try setting:
$wgGroupPermissions['user']['createaccount']=false;
Try securing your server/webhost, maybe try a better password. Jasper Deng (talk) 03:57, 8 March 2012 (UTC)

Mediawiki not working properly when installed under proxied zone

Our MediaWiki is set up on a zone that is sitting behind a proxy: "https://domainname.com/wiki" It is installed under /etc/opt/csw/apache2/share/htdocs/mediawiki/.

For some reason, it has problems with the path ("https://domainname.com/wiki/mediawiki"). We have tried combinations of the following paths in LocalSettings.php, but nothing is working.

$wgScriptPath = "/mediawiki" or "/wiki/mediawiki" $wgServer = "http://zonename" or "https://domainname.com/wiki"

Any advises or suggestions? Thanks for your help.

MediaWiki 1.18.1 PHP Version 5.3.10 MySql Ver 8.41 Distrib 5.0.95, for sun-solaris2.9 on sparc Sierrawiki (talk) 20:32, 5 March 2012 (UTC)

$wgServer should definitely have only the protocol and the host. It should not have any of the path (aka not the /wiki ), and it should contain the server name as the outside world sees it. $wgScriptPath needs to point actually to the directory containing the file index.php for your wiki.
If /etc/opt/csw/apache2/share/htdocs corresponds for the outside world to something like http://domainname.com/ and your wikis php files (index.php, load.php etc) are in the directory /etc/opt/csw/apache2/share/htdocs/mediawiki then your config would probably look like:
$wgScriptPath = '/mediawiki';
$wgServer = 'http://domainname.com';
// if you wanted both http and https to work, you might try $wgServer = '//domainname.com'; . If using squid caching, that might require some additional set up to make it purge things correctly for both http and https.
I can't really make suggestions any more specific then that without knowing fully how your wiki is configured. Bawolff (talk) 20:47, 5 March 2012 (UTC)
Thanks for your help Bawolff.
  1. uname -a
SunOS wiki-zone 5.10 Generic_147440-09 sun4u sparc SUNW,SPARC-Enterprise
We have created a Solaris zone called 'wiki-zone' and configured the proxy so that the url for the zone is 'https://domainname.com/wiki/'. What we are trying to find out is if this type of setup is allowed and if so, what the workaround is.
As I mentioned in my original post, we have tried different combinations of:
$wgScriptPath = "/mediawiki" or "/wiki/mediawiki"
$wgServer = "http://wiki-zone" or "https://domainname.com/wiki"
Please let me know if you need any other information. Thanks. Sierrawiki (talk) 22:41, 5 March 2012 (UTC)
Well basically those configuration variables need to be set in such a way that the following would give an edit page url $wgServer . $wgScriptPath . '/index.php?title=Some_Page&action=edit' that would, if you directly typed it into your web browser, actually go to the edit page. (That's a bit of a white lie, the construction of such urls is actually a bit more complicated, but that's the basic version of how those variables work)
Note, all these variables are for how the web browser sees the url (and not how the web server sees the url), so even if https://domainname.com/wiki maps to some sort of virtual server, as far as the web browser is concerned, the actual server is https://domainname.com and the /wiki part is part of the $wgScriptPath.
(MediaWiki has other variables for internal server names - manual:$wgInternalServer - but its unlikely you would need those unless you have a caching web proxy in front of your web server you need to purge cached pages out of) Bawolff (talk) 23:25, 5 March 2012 (UTC)
Thanks again.
This is the version of Apache we are currently running on the host:
Server version: Apache/2.2.21 (Unix)
Server built: Jan 13 2012 04:40:42
And this is how the proxy is set up:
<Location /wiki/ >
ProxyPass http://wiki-zone:80/
ProxyPassReverse http://wiki-zone:80/
</Location>
With $wgScripPath = "/wiki/mediawiki" and $wgserver = "http://wiki-zone", the main wiki page looks fine, but it's not the case for subsequent pages including the login page. The login page would not come up at all.
Main Page: https://domainname.com/wiki/mediawiki/index.php
Login Page: https://domainname.com/wiki/mediawiki/index.php/Special:UserLogin
Is this because of the /wiki in the url or /Special:UserLogin at the end of the link? I'm just trying to see if anyone has done this type of installation and what the workaround is. Sierrawiki (talk) 19:23, 6 March 2012 (UTC)
>The login page would not come up at all.
Do you mean it was a total blank page? This could indicate some other issue (Blank page is usually a PHP fatal error if error reporting is disabled. It'd be a good idea to enable error reporting just to rule out this case).
Generally if the $wgScriptPath related variables are wrong, you're more likely to get 404 pages and urls constructed incorrectly, the worse case that could possibly happen is a redirect loop.
https://domainname.com/wiki/mediawiki/index.php/Special:UserLogin generally looks like a correct url. It could be something about your set up interferes with path info stuff. You can try just setting $wgUsePathInfo to false at the bottom of your LocalSettings.php (This changes the url from https://domainname.com/wiki/mediawiki/index.php/Special:UserLogin to https://domainname.com/wiki/mediawiki/index.php?title=Special:UserLogin which works better on some webservers. Bawolff (talk) 20:26, 6 March 2012 (UTC)

Retrieve password... safe mode problem.

Hi, I created a new user account in my MW, but forgot the password. When I try to change it (or when the user himself tries to) the following message appears:

"SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE"

How can I:

1) delete the fifth parameter OR 2) disable the safe mode?

Sorry but I only found people asking why they can't upload files due to safe mode, but nobody having problems with resetting/retrieving passwords. Thanks for your help!! Si-co (talk) 21:41, 5 March 2012 (UTC)

We really recommend avoiding using safe mode if possible. It doesn't actually make anything "safer" but is a giant pain.
This particular message seems to be related to sending email. This particular issue has been fixed on the unstable version MediaWiki. The ways around this problem are:
  • Use MediaWiki 1.19 or higher. This isn't officially released yet, so you'd need to download from svn, etc. Should be out in a month or 2 though.
  • Find the file includes/UserMailer.php in your mediawiki install, and make the change described by the diff at rev:99411
  • Use manual:$wgSMTP to send mail (may or may not be possible on your set up)
  • Use one of the alternative methods that don't require email support to reset the password (there's a list of methods at Manual:Resetting_passwords)
Hope that helps. Bawolff (talk) 03:45, 6 March 2012 (UTC)

I mirror a wikipedia in local computer.and I also had download all the images(about 50G) from the "http://zh.wikipedia.org" using Wikix. how the local wikipedia can link the download images? and make the local wikipedia can dispaly the images and being a complex similar with the offical website "http://zh.wikipedia.org".Thank you! Jxjadzl (talk) 02:08, 6 March 2012 (UTC)

I'm not sure if i understand your question - but maybe manual:ImportImages.php might help you. It takes images from a local directory and makes it so a local mediawiki install can use them.
(Also note that zhwikipedia uses images from Commons in addition to the local images. You can also check out manual:$wgForeignFileRepos for info on how to make mediawiki dynamically use images from another wiki without downloading all of them all at once). Bawolff (talk) 03:34, 6 March 2012 (UTC)
yes,you are right!thank you very much. Jxjadzl (talk) 05:54, 6 March 2012 (UTC)
Instead of configuring $wgForeignFileRepos manually to get images from Wikimedia Commons, you can also set $wgUseInstantCommons = true; which does it automatically. Krinkle (talk) 05:51, 9 March 2012 (UTC)

Show always TOC on 2 or more headings?

There is $wgMaxTocLevel, but is there a min level? I want to force TOCs whenever there are 2 or more headlines without using __FORCETOC__. Subfader (talk) 11:34, 6 March 2012 (UTC)

I can do this to just display an image in it's orignal size without the image having a link to the image page[[Image:ImageName.png|link=|caption]]

However if I add "thumb" to it, it then has a link to the image page again even though I told it to not have a link like this:

[[Image:ImageName.png|thumb|link=|caption]]

How can I get a thumbnail to NOT link to the image page? Holygamer (talk) 16:58, 6 March 2012 (UTC)

Use search please! Help:Images Subfader (talk) 18:04, 6 March 2012 (UTC)
I already looked at that page before I posted my question. That page didn't have a solution. I've re-edited my question as it didn't appear properly before. Holygamer (talk) 18:08, 6 March 2012 (UTC)
caption
Works as advertised: [[File:example.jpg|link=|thumb|150px|caption]] Subfader (talk) 10:13, 7 March 2012 (UTC)
That picture still has a link to the file description page when I hover over the square in the bottom right corner. Holygamer (talk) 10:33, 7 March 2012 (UTC)
The link parameter only affects the link on the image itself. The icon below always goes to the image description page regardless of where the image links to. That is its purpose, and I don't know if it's possible to change that behaviour. Reach Out to the Truth (talk) 14:53, 7 March 2012 (UTC)
The best you can do [[File:example.jpg|link=|frame|caption]] - however then the image isn't scaled. (I suppose alternative is hide the magnification icon with css...) Bawolff (talk) 14:59, 7 March 2012 (UTC)
It's an SEO issue. The search engines still see the link in the code even if you hide it with CSS. Even if I don't have a caption there is still an "enlarge" link. Is there any way to hack the code to remove the enlarge link? Holygamer (talk) 15:18, 7 March 2012 (UTC)
/me believes all that SEO stuff is a bunch of hocus pocus ;)
Note, you can make a template (lets call it template:thumb) that would do something like:
<div class="thumb tright">
<div style="width: {{#expr:{{{2}}}+2}}px;" class="thumbinner">[[file:{{{1}}}|{{{2}}}px|link=]]
<div class="thumbcaption">
{{{caption}}}</div>
</div>
</div>
And then you could call like {{thumb|Example.png|120|caption=An Example}}, which would make:
An Example
Officially we discourage people from making custom patches to MW. Things tend to break when people do that, especially on upgrade, and then they blame us ;). However, I will note the relavent code is in the Linker::makeThumbLink2 method (in includes/Linker.php), specifically the $zoomIcon variable. Bawolff (talk) 03:10, 8 March 2012 (UTC)
Hi, I tried to make that template but I get the following error message: Expression error: Unrecognised punctuation character "{" Holygamer (talk) 11:36, 8 March 2012 (UTC)
or use CSS: put the image code in a span with some classname Subfader (talk) 09:07, 8 March 2012 (UTC)
Bawolff, Am I just supposed to use that first lot of code you gave me in a template? I created that template but I get the following error message when I save the template: Expression error: Unrecognised punctuation character "{"
You also mentioned the Linker::makeThumbLink2 method but I've no idea what I'm supposed to do. I'm not familiar with code.
Subfader, could you please suggest what CSS I could use? Holygamer (talk) 23:01, 10 March 2012 (UTC)
The template may have an error on the template page, but it should work when you actually use it I think (The error more comes from it not having an image width to substitute in). I strongly suggest you avoid modifying Linker::makeThumbLink2 unless you absolutely have to, and if you do, that you know what you're doing - since custom patches make things rather complicated. I only mentioned it because if push comes to shove you can do that as a last resort. Bawolff (talk) 01:54, 12 March 2012 (UTC)
Change where the link goes with "link=" parameter. DaveL (talk) 02:05, 12 March 2012 (UTC)

Importing non allowed media

I'm looking for a method to import files that are not on the allowed file extensions list, like allowing sysops to upload any type of media, there doesn't seem to be a extension that allows this anywhere, tried hacking a solution into localsettings, but the user class isnt loaded that early (Or Im doing it flat out wrong) 69.171.162.76 (talk) 23:34, 6 March 2012 (UTC)

WikiEditor problem

Hi, i'm from italy, so I have a custom skin "MistyLook" (downloaded from here, but not official skin) this skin works fine, but when I edit a page, I can't see any toolbar.

From preference everything fine, from "versione" it's all ok, if I use another skin, wikieditor works great, the problem are only with this skin, can everybody help me with that?

http://www.hogwartsexpress.it/wiki this is the page

"Admin" "test" for login 95.238.103.133 (talk) 05:08, 7 March 2012 (UTC)

Short version: The skin isn't fully compatible with 1.18
Long version: The skin hard coded some stuff relating to how js is loaded. However, the way js is loaded has changed over time (especially with RL being introduced). As a result, the skin isn't properly loading all of MediaWiki's js, which is breaking some functionality, most noticeably the edit toolbar.
You should ask whomever the author of the skin is to update the skin. Bawolff (talk) 07:01, 7 March 2012 (UTC)

PHP not working

The PHP is not running! It's instead displaying the source code. What went wrong? How do I fix it? Does my browser (Safari 4.0.3) not support PHP? Or do I need to re-install PHP? Mac OS X 10.6.2 187.126.116.166 (talk) 06:39, 7 March 2012 (UTC)

Most likely your webserver (apache in all probability) isn't configured properly. Refer to the install documentation for php Bawolff (talk) 06:57, 7 March 2012 (UTC)
If you have already set up your wiki, immediately move LocalSettings.php to a location that is not Web-accessible until you get this fixed. Reach Out to the Truth (talk) 14:47, 7 March 2012 (UTC)

Permanent deletion?

Okay, so here is an example vandalism scene I replayed in a test installation of MediaWiki:

  1. 127.0.0.1 replaces the Main Page with nonsense
  2. Administrator reverts the edit
  3. 127.0.0.1 replaces the Main Page with nonsense again
  4. Administrator reverts the edit
  5. Administrator protects the Main Page
  6. 127.0.0.1 copies off the article about MediaWiki on Wikipedia (a copyrighted source) and pastes it on Test Wiki
  7. Administrator deletes the "MediaWiki" page
  8. 127.0.0.1 pastes Wikipedia's article about MediaWiki on Test Wiki again
  9. Administrator deletes the "MediaWiki" page again

However, the pages with their content, revision entries and so on remain in the database.

Therefore, the database size unnessecarily increases nearly 1MB and, if the full database is available publicly, especially speaking for the copyright violation, anyone can look at the database dump to see the page which violated copyright law.

Will there ever be a way to permanently delete pages along with the regular way to delete pages in MediaWiki (completely remove them from the database, although the permanently-deleted pages cannot be restored) and solve any of the problems with deleted pages remaining in the database just so another administrator can restore it? --218.186.15.10 07:22, 7 March 2012 (UTC)

Hi,
I think no one should have to care, if the DB is an MB bigger or smaller. If DB size is a problem for you, you should maybe change to a hoster, which offers more ressources there. For permanently deleting pages try the Extension:Nuke, which comes with MediaWiki 1.18 by default. It can delete pages permanently. 88.130.75.113 12:00, 7 March 2012 (UTC)
No it doesn't. Nuke allows mass deletion of pages created by a specific user. The deletions are done the same way as a normal deletion, it just lets you do a bunch of them at once. Reach Out to the Truth (talk) 14:43, 7 March 2012 (UTC)
Telling someone they "shouldn't care" and "get a better host" in response to a feature request is non productive.
I would love to see a way to delete old revisions on a per-article or per-revision basis. Currently, since I don't care about saving old revisions in my implementation, I run deleteOldRevisions on occasion to throw out the junk. I would prefer a way to do it in a more limited way, and was surprised that mediawiki doesn't provide one. 209.29.183.172 18:45, 8 March 2012 (UTC)
Where exactly did I tell him that he shouldn't care? I told him that in my opinion he should not have to care about the available DB size. This is something completely different. But obviously some guys could misunderstand that; let me make this more clear: Today you can purchase harddisks with some terrabytes in size. Depending on usage, MediaWiki databases can grow quickly up to a few hundred megabytes or more. There it sounds like a joke to tell us that you had to care for "nearly one megabyte". If you cannot save new data in your database, you won't be able to run MediaWiki correctly. In the worst case you will even break your system. You need free space just to continue running the system; any changes on pages and such will need even more space. If you have to worry about a single megabyte, you should really change to a hosting package or even to another hoster, where you have more space available. 88.130.66.109 22:24, 8 March 2012 (UTC)
My MediaWiki installation has over 8 gigabytes of spam in it. The server has less RAM than that, and I feel the SQL server is slowing down very noticably. This sort of thing is a problem. 62.78.217.227 19:14, 9 February 2015 (UTC)
In this situation you basically have two options:
1. You export those pages, which are OK and import them in a new MediaWiki install.
2. You keep your original install and delete the spam pages. Afterwards you can run the maintenance script deleteArchivedRevisions.php, which actually removes those revisions, which have been deleted before. If you only want to remove selected revisions from the archive table, you cn also just remove the according rows in MySQL. Afterwards, run purgeOldText.php to also remove the according texts. 88.130.81.215 22:25, 9 February 2015 (UTC)
You can use manual:RevisionDelete to add another level of "deletion" where certain users can't see the deleted things.
You can also try the manual:deleteArchivedRevisions.php maintenance script. Bawolff (talk) 15:02, 7 March 2012 (UTC)
You may want to see the original revision of the first post to see the actual archived revision that remained in the database for technical details, which was removed from the post by 88.130.75.113
"You can also try the deleteArchivedRevisions.php maintenance script."
However, some versions of SQL servers also only archive tables with "DELETE FROM" queries instead of permenantly deleting them. 218.186.15.10 09:05, 9 March 2012 (UTC)
However, some versions of SQL servers also only archive tables with "DELETE FROM" queries instead of permenantly deleting them.
I was not aware of that, however at that point it really becomes a database administration issue and not a MediaWiki issue. Its unlikey there exists a pre-built mediawiki tool that will take into account the db possibly archiving things in its own way that are deleted from the tables. Bawolff (talk) 01:50, 12 March 2012 (UTC)
Every RDBMS I know, when you delete rows from a table, doesn't deallocate that unused space so it's free for the underlying operating system to reuse it. Basically, if your datafiles are 8GB and you delete 4GB of data from the database, the datafiles will still be 8GB in size. That space can be reused by the database.
Maybe that's what 218.186 is referring to, since the OP is concerned about space usage. Ciencia Al Poder (talk) 10:38, 10 February 2015 (UTC)
This is a good point that relates to another discussion I had with fs developers regarding discards and multiple layers of the block storage API, including thin provisioning and virtualization.
Respecting the division of labor between different API layers and respecting layers of abstraction is important and there's only so far you can throw the ball before you have to punt it to the next player.
Deleting the data via the database api and making sure the transaction commits is the extent of mediawiki's duty. After that it's a sanitization issue more suited to forensics.
Since you'd have to bypass the database api and access the files directly to recover the dropped data past that point you're already engaging in undefined behavior. 2600:6C54:7800:FCAD:5826:A2C7:12BE:5413 (talk) 18:06, 18 March 2021 (UTC)

The word 'from' causes fatal errors (sometimes)!

So I have an installation of MediaWiki. When editing the content of an article, sometimes the presence of the word 'from' will cause the server to throw a 500 error. If I substitute the instances of that word with something else--say, 'DERP'--the article saves and displays no problem.

Anyone have ideas on what causes this, or what I can do to fix it? I'm on a shared hosting account, so I can't see the PHP error log--just the one linked to in cpanel.:< 66.66.190.94 (talk) 09:25, 7 March 2012 (UTC)

I recommend contacting your hosting provider. It is unlikely that anyone else could fix this problem. Reach Out to the Truth (talk) 14:36, 7 March 2012 (UTC)
Sometimes apache's mod_security has been known to cause really weird stupid issues like that (however, if that was the case there would be relavent messages in the apache error log). Bawolff (talk) 15:03, 7 March 2012 (UTC)

Template display not right!

hello, i mirror a local wikipedia.all is right.but the Template dispaly not very good, It has not the "display " and "Hidden" button.So all the Template have displayed.How to solve it? Thank you ! I have set "$wgUseTidy=true". Jxjadzl (talk) 03:51, 8 March 2012 (UTC)

What is your MediaWiki version and what extensions have you installed? Jasper Deng (talk) 03:54, 8 March 2012 (UTC)
mediawiki1.18.
require_once( "$IP/extensions/Renameuser/Renameuser.php" );
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
require_once( "$IP/extensions/Cite/Cite.php" );
require_once( "$IP/extensions/Gadgets/Gadgets.php" );
require_once( "$IP/extensions/CategoryTree/CategoryTree.php" );
require_once( "$IP/extensions/Nuke/Nuke.php" );
require_once( "$IP/extensions/Vector/Vector.php" );
require_once( "$IP/extensions/Math/Math.php" );
require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );
Jxjadzl (talk) 05:45, 8 March 2012 (UTC)
OK, nothing should be awry with those. Jasper Deng (talk) 06:05, 8 March 2012 (UTC)
Sounds like you're probably missing the project's local JavaScript that makes those links work. Take a look at MediaWiki:Common.js. Reach Out to the Truth (talk) 05:45, 8 March 2012 (UTC)
where is the Common.js file? I can't search it in the "var/www/html/w" Jxjadzl (talk) 05:58, 8 March 2012 (UTC)
It's on your wiki, like on this wiki. Jasper Deng (talk) 06:04, 8 March 2012 (UTC)
yes, i can see.so? after i should do what? Jxjadzl (talk) 06:33, 8 March 2012 (UTC)
http://127.0.0.1/w/index.php/MediaWiki:Common.js? Jxjadzl (talk) 06:20, 8 March 2012 (UTC)
Yes, that's the page. Locate the relevant part on Wikipedia's version, and copy it to yours. The comments should help guide you.
Or just copy the whole thing. Reach Out to the Truth (talk) 17:26, 8 March 2012 (UTC)
Thank you! But I don't know how to solve this problem. are these JavaScrip will auto load?
===== Jxjadzl (talk) 04:14, 13 March 2012 (UTC)
Not all of them, especially since the WMF wikis are like 90% of the world's wiki space. Jasper Deng (talk) 05:01, 13 March 2012 (UTC)
help! Jxjadzl (talk) 06:08, 13 March 2012 (UTC)
Can you please give us more details? Jasper Deng (talk) 19:31, 13 March 2012 (UTC)
The key problem is the template and menu don't have the "Hide " or "Show" button(triangle),so the page dispaly not pretty!Other information is on the top talk! yhank you! Jxjadzl (talk) 07:16, 14 March 2012 (UTC)

Tag hook: recursiveTagParse() - TOC not loaded

I'm using tags like

<foo>
== Heading 1 ==
Text

== Heading 2 ==
Text

== Heading 3 ==
Text
</foo>

To create a div around the content:

function efMoreMarkup( &$parser ) {
      $parser->setHook( 'foo', 'efFoo' );
      return true;
}
function efFoo( $input , $args , $parser )	{
      $input = $parser-> recursiveTagParse( $input );
      return '<div class="foo">' . $input . '</div>';
}

But then tag doesn't work and the TOC is not loaded (forcing it via __TOC__ doesn't help). Is there a solution to it so the tag doesn't need to be set below each heading? [MW 1.18.0] Subfader (talk) 15:19, 8 March 2012 (UTC)

I have the same Problem.
Have someone any solution ? 80.156.43.136 06:20, 14 March 2012 (UTC)
I suppose use a parser function instead of a tag extension is not considered a valid solution? (It would probably fix the issue).
Placing __TOC__ inside the <foo> seems to work in my tests. For example:
<foo>
__TOC__
== Heading 1 ==
Text
== Heading 2 ==
Text
== Heading 3 ==
Text
</foo>
produces a toc on my test wiki.
Note, using parser tags in this manner has some other limitations. Namely <foo> cannot be nested, and PST (processing subst:, pipe trick, and ~~~~) is not done on the contents of foo Bawolff (talk) 01:51, 15 March 2012 (UTC)
The fun part of this is:
__TOC__
==header==
<foo>
__TOC__
==header 2==
</foo>
produces 2 ToC's. I guess its an artifact of when recursiveTagParse happens vs normal header/TOC magic happens. Bawolff (talk) 01:53, 15 March 2012 (UTC)
btw, this should probably be filed as a bug. It probably wouldn't be a trivial fix, so it might languish in bugzilla like many non-trivial parser changes tend to, but its probably somewhat do-able, after all it already has $isMain argument to determine if its coming from a recursiveTagParse Bawolff (talk) 02:12, 15 March 2012 (UTC)
Created a bug report: https://bugzilla.wikimedia.org/show_bug.cgi?id=35382 Subfader (talk) 12:50, 21 March 2012 (UTC)

[RESOLVED] Cannot Login or Register. Enable Cookies

I've been getting this error today when I tried working on my Wiki. I just installed MediaWiki about a week ago and have been edited every single day with no issues at all... until today.

"Darksiders Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again."

How do I assure that cookies are enabled? I did some basic research online, and I was told to edit the session.save_path... I don't have that. I have no idea where to find my php directory that has these files. I've looked everywhere and it's quite frustrating. Mases (talk) 20:13, 8 March 2012 (UTC)

I have fixed this error. It turns out that my PHP's session folder wasn't writable. The issue was that I couldn't see this folder via FTP and I needed to login via root SSH access to fix it. All is good now. Mases (talk) 07:27, 9 March 2012 (UTC)
This also fixed my problem - thank you for sharing.
Ade. 66.83.172.114 18:32, 16 May 2012 (UTC)
I can't find the PHP session file anywhere. I even connected we SSH as per your recommendation... where is it? 71.57.105.241 21:37, 30 January 2013 (UTC)
It depends on your server. You can find it with the following command:
$ php -r 'echo ini_get("session.save_path"),"\n";' MarkAHershberger(talk) 22:02, 30 January 2013 (UTC)
FYI, for me it is: /var/lib/php5
http://i.gyazo.com/06f2883fc305f02f26b82b7ad7136116.png Igottheconch (talk) 23:50, 8 May 2014 (UTC)

How to customize list numbering

I want to have a numbered list, but on the next level, I want letters instead of numbers. How do I do that?

  1. Basketball
    1. Blazers
      1. Lamarcus
      2. Felton
    2. Lakers
    3. Clippers
  2. Football
    1. Broncos
    2. Cowboys
    3. Cardinals

Here is what I want:


1. Basketball

  a. Blazers
     1. Lamarcus
     2. Felton
  b. Lakers
  c. Clippers

2. Football

  a. Broncos
  b. Cowboys
  c. Cardinals 67.139.76.194 (talk) 21:25, 8 March 2012 (UTC)
Use CSS list-style-type for ol-tags Subfader (talk) 10:14, 9 March 2012 (UTC)

erros with wiki page, appears to be some sort of spam like attack

please check out this link and advise on what is happening

http://lohere.net/kulkapedia/samuel/I_Nyoman_Masriadi

this is the original wiki page : http://en.wikipedia.org/wiki/Nyoman_Masriadi Roeshini (talk) 08:39, 9 March 2012 (UTC)

None of your links are working (also "static" links like to the RecentChanges page), because they miss the base URL. Having a look at the Recent Changes page for example you have spam in that page at places, where it cannot be put, if the attacker was just using the web interface.
This is not only a spam attack, where people create (or edit) pages to add spam. Your wiki seems to have been hacked.
You should disable access from the web and check the situation. Then you must close the whole through which the attacker came in. This whole can also be some other software on the server (it must not necessarily be MediaWiki). Server logs (Apache Logs/FTP Logs) might be helpful to find out what went on. Having a look at the symptoms I guess that someone is able to manipulate the files on your server, e.g. the PHP files. A common place where you might find malicious code is in LocalSettings.php, maybe in some obscure way like decode(base64(...)). But it can be placed basically anywhere. 88.130.104.171 11:29, 9 March 2012 (UTC)

Warning and Fatal error when running web update for 1.18

We are currently runnning MW 1.14.0 and we are trying to upgrade to 1.18.

When I go to do the web updater I get the following errors

Warning: call_user_func(Installer::overrideConfig) [function.call-user-func]: First argument is expected to be a valid callback in D:\xampp\htdocs\XXXXXXXX\includes\WebStart.php on line 101

Fatal error: Class 'WebInstaller' not found in D:\xampp\htdocs\XXXXXXXX\mw-config\index.php on line 23 64.206.79.221 (talk) 16:22, 9 March 2012 (UTC)

Try installing version 1.18 into a new folder, copy your extensions/, images/ and skins/ folder and your LocalSettings.php there and then try again. When updating to 1.18 there sometimes are problems with leftovers from older versions. 88.130.104.171 18:59, 9 March 2012 (UTC)

1.18.1 archive corrupt

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.


<pre>tar -xzvf mediawiki-1.18.1.tar.gz ... mediawiki-1.18.1/extensions/ParserFunctions/funcsParserTests.txt mediawiki-1.18.1/extensions/ParserFunctions/ParserFunctions.php mediawiki-1.18.1/extensions/ParserFunctions/COPYING mediawiki-1.18.1/extensions/ParserFunctions/ParserFunctions.i18n.magic.php mediawiki-1.18.1/extensions/Gadgets/ mediawiki-1.18.1/extensions/Gadgets/Gadgets_body.php mediawiki-1.18.1/extensions/Gadgets/install.settings mediawiki-1.18.1/extensions/Gadgets/Gadgets.alias.php

gzip: stdin: unexpected end of file mediawiki-1.18.1/extensions/Gadgets/ApiQueryGadgetCategories.php mediawiki-1.18.1/extensions/Gadgets/Gadgets.i18n.php tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now

Downloaded it twice. Linux. 216.82.241.35 (talk) 18:48, 9 March 2012 (UTC)

Hmm, works for me. If you can't get it to work, you can still download the files from here. 88.130.104.171 18:57, 9 March 2012 (UTC)
Did you download it from the official source ( http://download.wikimedia.org/mediawiki/1.18/mediawiki-1.18.1.tar.gz )?
If you know how to, check if you can verify the download with its PGP signature - http://download.wikimedia.org/mediawiki/1.18/mediawiki-1.18.1.tar.gz.sig Bawolff (talk) 02:56, 13 March 2012 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I Need to edit the picture for my wiki But where is $WgLogo? 82.34.175.220 (talk) 19:20, 9 March 2012 (UTC)

In LocalSettings.php. If it isn't in LocalSettings.php, you need to add in manually to the bottom. See Manual:$wgLogo and How do I change the logo? for more information. MrBlueSky (talk) 00:09, 10 March 2012 (UTC)

where i find title-to-url rewriting function?

I want to study PHP code of function used to rewrite the title to SEF URLs.

Where i find this function in mediawiki-1.18.1? I need file's path and function name.

Thanks!!!!! 151.42.186.204 (talk) 01:13, 10 March 2012 (UTC)

What you search is done in includes/Title.php. The results are available in MediaWiki in the Title object. 88.130.76.58 13:58, 10 March 2012 (UTC)

Nesting tags from tag extension

I have been trying to write an extension including some tags like 'section'. However, when trying to nest these, I cannot do anything but conclude that MW's tag detection does not support nested tags.

Suppose I use the following code:

<section name="name">This is a test
<section name="sub">What should be a subsection</section>
Some further text
</section>

The output generated then becomes of the following kind

start sample output

Section

This is a test

Section

What should be a subsection


Some further text<labeledsectiontransclusion />

end sample output

I am using calls to recursiveTagParse to support this kind of tag nesting, but it appears (also when checking with the PHP function print_r the text that is sent to the parsing function) that the detection of tags is fundamentally flawed.

The current versions used are:

Its not supported (see bugzilla:1310). If you need nesting, you have to use a parser function (if you have an existing parser tag, you can use #tag syntax as well). Bawolff (talk) 02:52, 13 March 2012 (UTC)

My Versions: MediaWiki: 1.16.5, PHP: 5.2.17, MySQL: 5.1.61

I have a music wiki but I also have links within the wiki to MP3s on the site (not stored within the wiki). For security reasons I want to block people from adding external links.

With SpamRegex I can block external links like below, however it also blocks admins such as myself. Is there any way via an extension or a spam filter or otherwise that I can allow myself to add external links?

# Block ALL external links
$wgSpamRegex = "/http:\/\//";

Holygamer (talk) 23:12, 10 March 2012 (UTC)

Add Background (File) to Vector Skin

Hey!

Is it possible to add a background in vector skin? I mean a file (jpg etc.) as a background.


Seriana Seriana (talk) 14:51, 11 March 2012 (UTC)

You can modify the Vector skin by editing MediaWiki:Vector.css in your wiki. Styles, which you define there, will override the ones, which come with Vector by default. 88.130.110.94 15:11, 11 March 2012 (UTC)
The background I have now changed, but the header is still displayed.
I have no idea how I can now hide this. Seriana (talk) 17:42, 11 March 2012 (UTC)
You can hide elements with CSS by defining display: none; for the element you don't want to see. Check the sourcecode of the wiki page to see, how you can address the element (e.g. with its id attribute if it has one). 88.130.110.94 18:07, 11 March 2012 (UTC)
I don't find any sourcecode for the header,the only i find was "div id=mw-head class=noprint" with firefox...but i have no idea how i can remove them.
display: none; did not work or I did something wrong... :( Seriana (talk) 00:10, 12 March 2012 (UTC)
can you provide a screenshot or a link? and what exactly you would like to hide Myidealh (talk) 07:12, 12 March 2012 (UTC)

collapsible menu 1.1.8.1

Hi.

Could You help me how can I enable collapsible menues in Mediawiki 1.18.1?

Thanks in advance

Charles 190.131.72.35 (talk) 00:17, 12 March 2012 (UTC)

I want to enable collapsible menu in SideBar. 190.131.72.35 00:20, 12 March 2012 (UTC)
Hi!
Have you tried http://www.mediawiki.org/wiki/Extension:Vector? Myidealh (talk) 08:26, 12 March 2012 (UTC)
I´ve tried adding this to LocalSettings.php (my mediawiki 1.18.1:)
require_once( "$IP/extensions/Vector/Vector.php" );
But nothing happens. I can't get the collapsible menus. Should I use some special tag in the MediaWiki:SideBar ? 157.100.80.156 00:29, 13 March 2012 (UTC)
Verify the vector extension is installed correctly by checking for it being listed at Special:Version on your wiki. Also check for any js errors in your browsers javascript console, which could potentially interfere with the extension.
You do not need any special tag in MediaWiki:Sidebar, the collapse feature should happen automatically upon enabling that extension. Bawolff (talk) 02:29, 13 March 2012 (UTC)

In verson 1.18.1, I'm trying to use this hook to add an external link in the footer: $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfTOSLink'; function lfTOSLink( $sk, &$tpl ) {

       $tpl->set( 'termsofservice', $sk->footerLink( 'linktexthere', 'termsofservicepage' ) );
       $tpl->data['footerlinks']['places'][] = 'termsofservice';
       return true;

} Where does the link URL go? Thanks. 70.108.249.43 (talk) 15:31, 12 March 2012 (UTC)

не работает загрузка картинок

перенесли wiki на соседний сервер и теперь страница http://www.e-xecutive.ru/wiki/index.php/Служебная:Upload вместо загрузки просто перезагружается но загрузки картинки не происходит, может кто сталкивался подскажите куда копать? на старом сервере всё работает "на ура" те же файлы один в один VictorFX (talk) 16:49, 12 March 2012 (UTC)

Hi!
As far as I understand your images are not getting uploaded. If this is right, then try checking $wgEnableUploads = true; in your LocalSettings file. Myidealh (talk) 10:58, 13 March 2012 (UTC)
$wgUploadDirectory = '{$IP}/images/';
$wgEnableUploads = true; VictorFX (talk) 14:21, 13 March 2012 (UTC)

External image as text not image

I have enabled external images to work by directly pasting the URL

How can I do if I need one specific to show as text?

I need to show something like

[img]the_url_here[/img]

and Im getting

[img](the image displayed)[/img]

Thanks. 190.138.76.138 (talk) 17:44, 12 March 2012 (UTC)

I think wrapping the URL in a <nowiki> tag should do the trick.
Like this:
[img]&lt;nowiki>the_url_here</nowiki>[/img]
Reach Out to the Truth (talk) 21:20, 12 March 2012 (UTC)

css for extension overriding site css

I have created an extension with css for a table:

        $wgOut->addHtml('<div class="exsitingimage">');
   	$wgOut->addHtml('<table><tr><th></th><th>Name</th><th>Thumbnail</th><th>Dimensions</th><th>User</th><th>Comment</th>       </tr>'); 	
   	foreach($uploaded as $upload){
   		 
   	$wgOut->addHTML('<tr><td><button class="imageSetting">Add</button></td><td>'); 	
   	$wgOut->addHTML($upload[0]);
 	$wgOut->addHtml('</td><td>'); 
 	$wgOut->addHtml('<img src="images/thumb/'.$upload[0].'/120px-'.$upload[0].'" />'); 
 	$wgOut->addHtml('</td><td>'); 
 	$wgOut->addHTML($upload[1]); 
 	$wgOut->addHTML('x'); 
 	$wgOut->addHTML($upload[2]); 
 	$wgOut->addHtml('</td><td>');
 	$wgOut->addHTML($upload[3]); 
 	$wgOut->addHtml('</td><td>');
 	$wgOut->addHtml($upload[4]);
 	$wgOut->addHtml('</td></tr>'); 
 	}
 	$wgOut->addHtml('</table>');
	$wgOut->addHtml('</div>');
	}

I only want the class to be change what is within the

but it is effected all tables on the site.

What is going on? How do I customise css for extensions? LTech (talk) 19:26, 12 March 2012 (UTC)

PHP/libxml2 combination error when installing 1.18.1; any workarounds?

So when I try to install MediaWiki 1.18.1 I get the following error: "Your system has a combination of PHP and libxml2 versions which is buggy and can cause hidden data corruption in MediaWiki and other web applications. Upgrade to PHP 5.2.9 or later and libxml2 2.7.3 or later (bug filed with PHP). Installation aborted."

My host is running PHP 5.2.17, so I'm okay there. However, it's only running libxml2 2.6.30, and they've not given me any indication as to when they'll be upgrading. Is there any workaround for this error that I can use? Dark T Zeratul (talk) 21:42, 12 March 2012 (UTC)

No, there's not really a non-upgrade related work around.
As an aside, MediaWiki actually checks for the bug being present, not the version numbers - so if you get the error its because the issue is actually present, not because a version number was blacklisted. Bawolff (talk) 02:36, 13 March 2012 (UTC)
In that case, what's the newest version of MediaWiki that doesn't have this problem that I can try and revert to? Dark T Zeratul (talk) 02:28, 14 March 2012 (UTC)
Probably around 1.15. But note that's just when we started giving warnings, things will still be subtly broken in confusing ways, there just won't be any warnings about. Bawolff (talk) 02:35, 14 March 2012 (UTC)
Guess I'll just start e-mailing them once a week until they update libxml2, then. Dark T Zeratul (talk) 02:46, 14 March 2012 (UTC)

URLs are rewritten, but not redirecting

I'm having difficulty with the directions here to rewrite URLs. In LocalSettings I set:

$wgScriptPath = "/w";

$wgArticlePath = "/wiki/$1";

And this is my .htaccess file in the web root:

RewriteEngine On

RewriteBase /

RewriteRule ^/?wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA]

RewriteRule ^/?wiki/*$ /w/index.php [L,QSA]

RewriteRule ^/*$ /w/index.php [L,QSA]

(My host, Laughing Squid, suggested I add the RewriteBase line.)

The rewritten URLs are accessible (http://ilaisu.org/wiki/Test), which suggests I did SOMETHING right, but when I do anything like edit a page or use the logo to go back to the main page, it keeps going back to the long form of the URL (http://ilaisu.org/w/index.php/Test). All the links such as preferences, contributions, etc. also use the long forms. What am I doing wrong?

-Joey 50.137.113.187 (talk) 23:49, 12 March 2012 (UTC)

You have $wgArticlePath set incorrectly somehow. MediaWiki thinks it is set to $wgArticlePath = "/w/index.php/$1"; . Double check you don't have conflicting settings in LocalSettings.php or something like that. Try moving the $wgArticlePath = "/wiki/$1"; to the very end of the file.
You can check what mediawiki thinks the setting is by looking at: http://ilaisu.org/w/api.php?action=query&meta=siteinfo&siprop=general&format=txtfm Bawolff (talk) 02:33, 13 March 2012 (UTC)
Moving that line to the very end did the trick. Thanks for your help.
-Joey 50.137.113.187 03:14, 13 March 2012 (UTC)

update local wikipedia database

hi,I want to update my local wikipedia database,but the wikipedia didn't support the increment dump.Is someone have research this problem?Thank you very much! Jxjadzl (talk) 06:13, 13 March 2012 (UTC)

Warning: This page was deleted after you started editing! Read more: I want a new page - TestMediaWiki

I have an extension which creates a form when you edit a page. When I submit the form I get the error Warning: This page was deleted after you started editing! and the page is deleted! Does anyone know why this is happening and how I can send $post variables without this taking place. thanks LTech (talk) 09:07, 13 March 2012 (UTC)

Force display of navbar elements

First, I'm sorry if this is the wrong place to ask my question. In case, please tell where to go...

I display two Wikipedia pages within an iframe on my website. I hide some elements (e.g. #mw-head, #mw-panel, ...) using CSS.

My problem: I want to force the display of those collapsable/expandable "navbar/NavFrame" (English/German Wikipedia) elements.
This works great with the German wikipedia page using this injected js-code: "var NavigationBarShowDefault=99;var autoCollapse=99;".

It does not work with the English version of the page :-(

For reference (please check the tables at the end of the page, listing the available Yamaha motorbikes):
*OK*: http://www.tr1.de/pages/misc_wikipedia_german.php
*NOT OK*: http://www.tr1.de/pages/misc_wikipedia_english.php

Note: Both links work now, since I used the solution from the first reply to this post

In general. Any idea why the English Wikipedia is implemented different to the German (or vice versa)?

Thanks for any help on this and many greetings from Bavaria
Manfred 84.145.11.17 (talk) 09:14, 13 March 2012 (UTC)

Found a "dirty" solution. If I remove the class "autocollapse" (parse HTML before display in iframe) from
all class definitions, all elements are shown expanded on initial display of the above English Wikipedia page.
But I guess this is not the proper way to achive my request...
Manfred 84.145.11.17 11:54, 13 March 2012 (UTC)

Editing "Login Required" Page.

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


I currently have my company Wiki setup so that only registered users can view the pages. If they are not registered (or logged in) the standard "Login Required" page shows up. I would like to edit that page so that it gives an explanation of why the wiki is locked and who they can contact to get approval to join. I cannot for the life of me figure out how to do this!! Any tips would be helpful. Zackmann08 (talk) 17:58, 14 March 2012 (UTC)
Try editing the page mediawiki:loginreqpagetext on your wiki ($1 is the link to special:userlogin using the title text at mediawiki:loginreqlink).
(Note: on newer mediawiki, you can see where the system messages come from by appending ?uselang=qqx to a url) Bawolff (talk) 22:45, 14 March 2012 (UTC)
The 'login required' page text is visible, but still not editable! Do I need to do something else? 49.32.0.141 06:25, 25 September 2013 (UTC)
"still not editable" where, and why "still"? Which exact steps did you perform? AKlapper (WMF) (talk) 08:43, 25 September 2013 (UTC)
i am having same problem ;is there any way to edit that message which com in default Login required page ? 14.139.82.6 (talk) 09:36, 3 November 2015 (UTC)
Thank you Bawolff. Worked like a charm. Motzi (talk) 18:02, 22 February 2016 (UTC)
i am having same problem ;is there any way to edit that message which com in default Login required page ? 14.139.82.6 (talk) 09:35, 3 November 2015 (UTC)
You can change the content of the wiki page MediaWiki:Loginreqpagetext in your wiki. The content of this page is what shows up on the login page. 88.130.113.200 (talk) 11:52, 3 November 2015 (UTC)
And in this text, the $1 sign gets replaced by the login link. 88.130.113.200 (talk) 12:59, 3 November 2015 (UTC)
i have edited as u suggested but no change happen to default page as my changes are also save here i am attaching two images .
  1. showing my changes.
  2. some two line came up with system message
  3. Bis001 (talk) 09:52, 4 November 2015 (UTC)
two line errpor Bis001 (talk) 10:05, 4 November 2015 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

1062: Duplicate entry '1' for key 'ss_row_id' (1.18.1)

Guest visitors of my wiki get 1062: Duplicate entry '1' for key 'ss_row_id' every time site_stat table refreshing (SiteStatsInit::refresh). Login user do not see this error, and if I put ?action=purge to main page all be okay. File cache is turn on. Please, help!

My db looks like:

CREATE TABLE IF NOT EXISTS `site_stats` (
  `ss_row_id` int(8) unsigned NOT NULL,
  `ss_total_views` bigint(20) unsigned DEFAULT '0',
  `ss_total_edits` bigint(20) unsigned DEFAULT '0',
  `ss_good_articles` bigint(20) unsigned DEFAULT '0',
  `ss_total_pages` bigint(20) DEFAULT '-1',
  `ss_users` bigint(20) DEFAULT '-1',
  `ss_active_users` bigint(20) DEFAULT '-1',
  `ss_admins` int(10) DEFAULT '-1',
  `ss_images` int(10) DEFAULT '0',
  UNIQUE KEY `ss_row_id` (`ss_row_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `site_stats` 
(`ss_row_id`, `ss_total_views`, `ss_total_edits`, `ss_good_articles`, `ss_total_pages`, `ss_users`, `ss_active_users`, `ss_admins`, `ss_images`) 
VALUES (1, 50, 11920, 1134, 2816, 314, -1, -1, 829);
178.204.14.199 (talk) 21:18, 14 March 2012 (UTC)
Possibly only happened once, but that one time it happened it somehow got cached in file cache, and then shown to all subsequent anon users (logged in users don't get the file cache).
In theory file cache isn't supposed to cache errors, but maybe there's something wrong with it (If you're using an older version of MediaWiki, try upgrading. I think some earlier versions of MediaWiki's file cache support was less good then more modern versions of MediaWiki [but don't quote me on that, that could be wrong]) Bawolff (talk) 01:40, 15 March 2012 (UTC)
I use latest stable version (1.18.1) but thank you. 178.213.240.2 10:42, 15 March 2012 (UTC)
So, it's seems to be NewestPage extension error. If I delete its template from Main_Page all work perfectly. 178.204.73.170 16:16, 18 March 2012 (UTC)

My Versions: MediaWiki: 1.16.5, PHP: 5.2.17, MySQL: 5.1.61

Basically I don't like the way MediaWiki displays categories. The page name looks ugly like this: "Category:List of Playstation Games" instead of this "List of Playstation Games". Also I don't like the way categories are displayed, they are displayed in columns which doesn't allow long page names to display on 1 line.

I prefer to create a page with any name I want and then use the Nice Category List extension to show all the pages tagged with a category so I get a list like this:

  • Page 1
  • Page 2

Unfortunately in articles I then have lots of links to useless category pages which I don't want as I've added tags to the articles. Is there any way to keep the functionality of the tags but to not have the Category links display at the bottom of articles as it's hurtful to Search Engine Optimization? I know I can hide them with CSS but the search engines still see the links. Holygamer (talk) 23:46, 14 March 2012 (UTC)

Note: A page's name can be changed using displaytitle if $wgRestrictDisplayTitle is set to false. Note, that the format of a category page can be customized by extensions (of course that would actually require someone to write an extension that meets your needs).
In order to remove the list of categories the current page is in from the bottom of a page, put the following at the bottom of LocalSettings.php (note: only tested on svn [1.20alpha], so ymmv. If it doesn't work let me know).
$wgHooks['OutputPageMakeCategoryLinks'][] = 'wfKillCatLinks';
function wfKillCatLinks( $out, $categories, &$catLinks ) {
                        global $wgContLang;
                        #Stops categorylinks from appearing at bottom of page
                        foreach ( $categories as $category => $type ) {
                                $origcategory = $category;
                                $title = Title::makeTitleSafe( NS_CATEGORY, $category );
                                $wgContLang->findVariantLink( $category, $title, true );
                                if ( $category != $origcategory ) {
                                        if ( array_key_exists( $category, $categories ) ) {
                                                continue;
                                        }
                                }
                                #this part is still needed so that
                                # js can see what categories are on a page
                                $out->mCategories[] = $title->getText();
                        }
           return false;
            }
p.s. I still think that SEO is a bunch of hocus pocus, and this stuff doesn't really matter. Bawolff (talk) 01:31, 15 March 2012 (UTC)
Thank you very much. It works. SEO doesn't matter for big sites such as Wikipedia but for individuals with their own site, I promise you SEO isn't hocus pocus! If an article page has several links to categories or other useless pages it means that page as well as all the other important pages such as your homepage have less PageRank. If your homepage has less PageRank then it won't appear as high in Google search results. And if people can't find my site then nobody will visit it!
I also used to use Extension:DynamicTabs so that useless pages (SEO wise) such as the talk, edit, history, etc tabs would not show to people who aren't logged in. However it doens't work on the Vector skin. I don't suppose you know anyone that could update it to work with the Vector skin do you? Thanks again. Holygamer (talk) 18:57, 17 March 2012 (UTC)
"If an article page has several links to categories or other useless pages it means that page as well as all the other important pages such as your homepage have less PageRank. If your homepage has less PageRank then it won't appear as high in Google search results. And if people can't find my site then nobody will visit it!"
That's a problem with Google & co, not MW. SEO = search engine manipulation = destroying proper webdesign. Subfader (talk) 12:41, 21 March 2012 (UTC)

upgrading MediaWiki to Version 1.17.2

Hi,

we are using MediaWiki for 6 years (version 1.8.2) now and currently we run into many problems. So I decided to upgrade to version 1.17.2, I checked all the requirements and also the manual for updating. After the 4th unsuccessful try to update I would need some help, what's currently the problem.

Here some info:

Virtual Windows Server Apache WebServer 2.2.21, PHP 5.2.17, MySQL 5.0.51a, MW 1.8.2

The PHP update command runs 3 seconds and that's it, no errors showing. The only error we find was in the PHP logs [15-Mar-2012 12:26:02] PHP Fatal error: Call to a member function setCacheTime() on a non-object in D:\Websrv\Apache2\WebSites\...\wiki\includes\parser\Parser.php on line 4771

Please could you help me in this case

kind regards Mike 81.223.23.58 (talk) 12:36, 15 March 2012 (UTC)

The PHP update command runs 3 seconds and that's it, no errors showing. The only error we find was in the PHP logs [15-Mar-2012 12:26:02]
PHP Fatal error: Call to a member function setCacheTime() on a non-object in D:\Websrv\Apache2\WebSites\...\wiki\includes\parser\Parser.php on line 4771
Most likely an extension doing something like $wgParser->disableCache() while not parsing anything. (Some older extensions seem to make weird assumptions about if stuff is currently being parsed which don't make a lot of sense. Starting in 1.19 with r106310 a much more informative error would be given for this situation).
Try disabling all extensions, and see if it works. Bawolff (talk) 01:19, 16 March 2012 (UTC)
Hi Mike, I would suggest the same as Bawolff from experience. We upgraded from 1.10.1 to 1.18.1, and all error messages were caused by extensions. ThT (talk) 07:49, 19 March 2012 (UTC)
Thanx for the help so far, I could go a bit further upgrading than before.
But now I have got into a problem when upgrading the MySQL DB. Everything works fine until

.....
Creating page_restrictions table...done.
Migrating old restrictions to new table...
.....
at this point there is no ending or finish.
Can it be that I try to make the upgrade from a client and not at the server itself ?
Or is it maybe browser depending ?
Mike 81.223.23.58 09:58, 19 March 2012 (UTC)
If you're using the web updater, try the command line updater instead (update.php). The web updater has some issues with larger wikis. Bawolff (talk) 18:16, 19 March 2012 (UTC)
Ok than I have a big problem, because I tried this before I used the Web updater, as I wrote in the first note

The PHP update.php command runs 3 seconds and that's it, no errors showing. <--------
The only error we find was in the PHP logs [15-Mar-2012 12:26:02]
PHP Fatal error: Call to a member function setCacheTime() on a non-object in 
D:\Websrv\Apache2\WebSites\...\wiki\includes\parser\Parser.php on line 4771

What else can I do ?? What about only upgrading the database in a manual or external modul run ??


Mike 81.223.23.58 20:41, 19 March 2012 (UTC)
You could disable all your extensions and then run the command line updater. Bawolff (talk) 05:01, 20 March 2012 (UTC)
81.223.23.58 11:26, 20 March 2012 (UTC)
Again thank you for your help, but a rerun of the Web update (which is working instead of the commandline update)shows following error:
An error occured:
A database query syntax error has occurred.
The last attempted database query was:
"SHOW INDEX FROM `oldimage`"
from within function "DatabaseBase::indexExists".
Database returned error "1146: Table 'wikichis.oldimage' doesn't exist (ibmatmgmt.vienna.at.ibm.com)"
Backtrace:
#0 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\db\Database.php(751): DatabaseBase->reportQueryError('Table 'wikichis...', 1146, 'SHOW INDEX FROM...', 'DatabaseBase::i...', false)
#1 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\db\DatabaseMysql.php(293): DatabaseBase->query('SHOW INDEX FROM...', 'DatabaseBase::i...')
#2 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\db\Database.php(1220): DatabaseMysql->indexInfo('oldimage', 'oi_usertext_tim...', 'DatabaseBase::i...')
#3 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\installer\DatabaseUpdater.php(408): DatabaseBase->indexExists('oldimage', 'oi_usertext_tim...')
#4 [internal function]: DatabaseUpdater->addIndex('oldimage', 'oi_usertext_tim...', 'patch-oldimage-...')
#5 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\installer\DatabaseUpdater.php(250): call_user_func_array(Array, Array)
#6 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\installer\DatabaseUpdater.php(218): DatabaseUpdater->runUpdates(Array, false)
#7 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\installer\DatabaseInstaller.php(265): DatabaseUpdater->doUpdates()
#8 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\installer\WebInstallerPage.php(492): DatabaseInstaller->doUpgrade()
#9 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\includes\installer\WebInstaller.php(250): WebInstaller_Upgrade->execute()
#10 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\mw-config\index.php(46): WebInstaller->execute(Array)
#11 D:\Websrv\Apache2\WebSites\chis.at.ibm.com\wiki\mw-config\index.php(14): wfInstallerMain()
#12 {main}
I also tried with an update clean database, but the same error.
I'm getting increasingly nervous about this update !!

Mike 81.223.23.58 11:35, 20 March 2012 (UTC)
Database returned error "1146: Table 'wikichis.oldimage' doesn't exist (ibmatmgmt.vienna.at.ibm.com)"
Backtrace:
Something is very wrong with your database if you get that error. Oldimage table has existed since the very beginning of Mediawiki, so should be in your old install.
Basically the updater can't update your db if it cannot find the old data it needs to update. Bawolff (talk) 17:49, 20 March 2012 (UTC)
Did you try running maintenance.php? That would fix missing tables, etc. Jasper Deng (talk) 02:29, 22 March 2012 (UTC)

Extensions do not load

Hello. I have downloaded the widgets extension to $ip/extensions and un-zipped it, but i still can't get it to work. my wiki is at www.eno.x10.mx/wiki. I have tried EVERYTHING I can and it still dosen't work. p.s. - Once I tried to make my own special page using the guide on this site, and it did not work either. Thanks- Htmlguy999 Vanished user 999214 (talk) 21:51, 15 March 2012 (UTC)

Sorry i posted that twice - my bworser wasn't responding. Htmlguy999 (talk) 21:53, 15 March 2012 (UTC)
Did you follow the installation instructions? http://eno.x10.mx/wiki/index.php/Special:Version shows that the only extension running on yohr wiki is ParserFunctions. Reach Out to the Truth (talk) 21:56, 15 March 2012 (UTC)

[RESOLVED] Can't run Update with Semantic MediaWiki

I've tried to install two extensions that require an update to the database tables (Liquid Thrheads & Advancedmeta) and the update fails with the following error messages for each. Warning: include_once(languages/SMW_LanguageEn.php) [function.include-once]: failed to open stream: No such file or directory in /home/content/65/6092565/html/scientolipedia/extensions/SemanticMediaWiki/includes/SMW_Setup.php on line 508

Warning: include_once() [function.include]: Failed opening 'languages/SMW_LanguageEn.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/65/6092565/html/scientolipedia/extensions/SemanticMediaWiki/includes/SMW_Setup.php on line 508

Fatal error: Class 'SMWLanguageEn' not found in /home/content/65/6092565/html/scientolipedia/extensions/SemanticMediaWiki/includes/SMW_Setup.php on line 512

I posted this on the Semantic Bundle page and Yaron Koren said he didn't know what was causing it but suggested I install the newest version of Semantic Bundle, which I did, but still get the above. Any help is appreciated.

MediaWiki 1.18.0,PHP 5.2.17 (cgi-fcgi),MySQL 5.0.92-log, Semantic Bundle (Version 20120308) DaveLMW 1.25.1, PHP 5.4.37, MySQL5.1.73-cll SMW 2.2 23:47, 15 March 2012 (UTC)

This is probably a SMW bug, using a relative path in a place where it should not (That would be my guess anyways, I don't know for sure).
One possibility is to temp disable SMW, run update.php, and then re-enable SMW. Bawolff (talk) 01:13, 16 March 2012 (UTC)
Bawolff, you are brilliant! That worked. Must be a bug but I've never reported a bug before. Will look to find out how. Thank You so much. DaveL (talk) 04:26, 16 March 2012 (UTC)
Hi - i have just experience the exact same thing. I was running the update from inside softaculous, and I don't see an obvious way inside softaculous toroll back the update and try again. And I'm a wee bit spooked by doing it manually (I'm a user and not a PHP expert or anything). I have taken out the require_onces from local settings.php that relate to SMW. But I'm not even sure how to get to the command prompt (the wiki is hosted on siteground, not on my local machine)
Is there an easy way of rerunning update.php? ElectricRay (talk) 23:01, 13 November 2012 (UTC)
actually, i figured it out - I restored the backup inside softaculous. A bit worried there for a while! All good now - I think i can now switch off SMW in localsettings.php, reupgrade and... well, let's see. ElectricRay (talk) 23:11, 13 November 2012 (UTC)
Hi, I am from the softaculous team. If you need any help, please do let us know. Also its always good to use the Softaculous Backup Utility before upgrading. This will help you to roll back later if anything goes wrong. 120.62.34.20 18:59, 14 November 2012 (UTC)

Not working in 1.16.2?

Is this a new feature?

I put some JavaScript on this page and force-reloaded the browser. Looking at the source returned, I expected to see either my JavaScript in the head or a "script src" call to Common.js. I see neither.

I have been putting off upgrading because (I know, bad) I've changed some of the files, and 1.16 was working well for me. But I need to do some JavaScript on pages now. 02:32, 16 March 2012 (UTC)

1.16 is end of life; we are not releasing security updates for it any longer. See Version lifecycle for details. And when you upgrade, you should consider keeping your customizations separate from core MediaWiki as MediaWiki extensions for easier maintenance.
That said, putting your code at MediaWiki:Common.js should work, provided that your customizations did not break it. Putting it at User:Bytesmiths/common.js will not work on your old version, and putting it at User:Bytesmiths/monobook.js (if you use the Monobook skin) will only work if you have $wgAllowUserJs = true; in your LocalSettings.php file.
You may need to bypass or clear your web browser's cache (instructions are at the top of the JavaScript page) to see the effect. PleaseStand (talk) 04:24, 16 March 2012 (UTC)
Note, on 1.16 MediaWiki:Common.js is loaded from a very misleading named page that has a url that looks something like ?title=-&aaction=raw&ctype=text/javascript&gen=js This should be somewhere in your <head>.
(Starting with 1.17 the way js was loaded totally changed) Bawolff (talk) 19:23, 16 March 2012 (UTC)

Namespace localization

Hi,

I'm having trouble localizing namespaces in a Custom extension. You'll find a simplified version of the Custom extension code supposed to deal with namespace declaration and localization :

<?php
/**
 * extensions/Custom/Custom.php
 */
define('NS_XXXX', 10000);
 
$wgExtraNamespaces[NS_XXXX] = "XXXX";
$wgExtraNamespaces[NS_XXXX + 1] = "XXXX_talk";   # underscore required

$wgContentNamespaces[] = NS_XXXX;
 
$wgNamespacesToBeSearchedDefault[NS_XXXX] = true;
 
$wgExtensionMessagesFiles['CustomNamespaces'] = dirname( __FILE__ ) . '/Custom.namespaces.php';
?>
 
<?php
/**
 * extensions/Custom/Custom.namespaces.php
 */
$namespaceNames = array();
 
if( !defined( 'NS_XXXX' ) ) {
        define('NS_XXXX', 10000);
}
 
/** English */
$namespaceNames['en'] = array(
                NS_XXXX => 'YYYY',
                NS_XXXX + 1 => 'YYYY_talk'
);
 
/** French (Français) */
$namespaceNames['fr'] = array(
                NS_XXXX => 'ZZZZ',
                NS_XXXX + 1 => 'Discussion_ZZZZ'
);
?>

With this code, I can only find the namespaces named XXXX and XXXX_talk, no way to have it being localized. Am I missing the point ?

MediaWiki 1.18.1

PHP 5.2.11 (cgi-fcgi)

MySQL 5.1.57-community-log 82.234.132.251 (talk) 10:11, 16 March 2012 (UTC)

Well for namespaces, only the language that is the content language of your wiki is used. So if your wiki has a content language (content language is defined in LocalSettings.php) of "en", then only the english namespace names would be visible. Bawolff (talk) 19:28, 16 March 2012 (UTC)
Actually, the wiki is in french and the displayed namespace names are, as said, XXXX and XXXX_talk instead of ZZZZ and Discussion_ZZZZ. 82.234.132.251 11:00, 19 March 2012 (UTC)
Looking closer, I believe your issue is the result of doing
$wgExtraNamespaces[NS_XXXX] = "XXXX";
$wgExtraNamespaces[NS_XXXX + 1] = "XXXX_talk";
I believe $wgExtraNamespaces is un-needed with the $namespaceNames stuff in the i18n file, and if present that $wgExtraNamespaces takes priority over the $namespaceNames. Bawolff (talk) 14:00, 21 March 2012 (UTC)
Removing $wgExtraNamespaces stuff only led to the namespace removal. 82.234.132.251 14:25, 21 March 2012 (UTC)
Note to self: I shouldn't try to answer questions I don't know the answer to ;)
Looking into the issue further, you also have to register the namespaces with the CanonicalNamespaces hook, in order for them to work. For an example, see the LqtHooks::onCanonicalNamespaces method in LiquidThreads. (Note you would also have to register your hook handler with $wgHooks in the standard fashion, which is done in a different file in lqt then the one i linked to) Bawolff (talk) 23:21, 23 March 2012 (UTC)
Way to go ! As you said, removing $wgExtraNamespaces and registering namespaces with the CanonicalNamespaces hook did the job. Thanks for the help, I probably didn't focus on the right side of custom namespaces. 82.234.132.251 07:48, 26 March 2012 (UTC)

Installation problem, session data loss

I have installed mediaWiki, version 1.18.1 on a Windows 2008 R2 server under IIS. I am running PHP v 5.3.8 No matter what I do, I get "Your session data was lost! Check your php.ini and make sure session.save_path is set to an appropriate directory" error. The path is fine, the IUSR can read and write, it work fin with other php-applications we have installed. I have tried every possible modification in php.ini to make it work, but nothing.

Anyone have an idea? 193.10.63.101 (talk) 10:20, 16 March 2012 (UTC)

Did you ever find the solution to this problem? I'm facing the same issue with mediawiki 1.19.0, php 5.3.2 on ubuntu 10.04. 213.118.119.116 10:36, 6 June 2012 (UTC)
Same problem here. Did someone find a solution? Hanniball76 (talk) 09:36, 18 November 2014 (UTC)
Same problem with 1.23.8 on ubuntu 12.04 LTS. All other sites on the same server work with the sessions directory and permissions. I even created a test.php on the same wiki site and stored some items in the session and was able to recall them. I think it's a problem with MediaWiki's code. MikeH 16:52, 9 February 2015 (UTC)

Watchlist error after upgrade to 1.18.1

After upgrading from 1.10.1. to 1.18.1 the change of the watchlist using the link on the page does not work, instead the message MediaWiki:Watcherrortext turns up. Special:Watchlist works fine. I detected, that the target address generated by the link after action=watch&token= contains a different token as in Special:Preferences#mw-prefsection-watchlist, if that matters.

  • MediaWiki 1.18.1
  • PHP 5.2.14 (apache2handler)
  • MySQL 5.0.26

Any piece of advice is welcome. ThT (talk) 11:04, 16 March 2012 (UTC)

They're different tokens, with different purposes. Reach Out to the Truth (talk) 15:11, 16 March 2012 (UTC)
Thanks, I assumed so, but wasn't sure. Meanwhile I also checked the template "watch", which we copied from w:en:template:watch. The template generates &action=watch, i.e. without a token, and it works fine. So the token seems to be the reason of the watchlist error, but I don't know how to fix it yet. ThT (talk) 16:35, 16 March 2012 (UTC)
After upgrading from 1.10.1. to 1.18.1 the change of the watchlist using the link on the page does not work&lt;/pre&gt;
You mean the link that's part of the skin? If you're using a non-standard skin it could be a bug in that skin.
Wikipedia is using 1.19 which may account for the differences in behavior. (I'm not at my home computer so I can't easily check how/if the behavior changed between versions) [[User:Bawolff|Bawolff]] ([[User talk:Bawolff|talk]]) 19:21, 16 March 2012 (UTC)
::::Thanks, but actually it's about the standard skin ''Vector''. Your question brought me to check ''MonoBook'', which shows the same behavior. Then I tried ''Cologne Blue'', and this one works fine. [[User:ThT|ThT]] ([[User talk:ThT|talk]]) 07:37, 19 March 2012 (UTC)
:Meanwhile I found [https://bugzilla.wikimedia.org/show_bug.cgi?id=30372 Bug 30372 - Users able to watch pages get a script error ...]. Setting ''$wgAjaxWatch = false'' seems to solve the problem, but [https://bugzilla.wikimedia.org/show_bug.cgi?id=30372#c8 Comment 8] makes me wonder, if this is really a good solution. [[User:ThT|ThT]] ([[User talk:ThT|talk]]) 16:04, 26 March 2012 (UTC)
::The same issue occurs on MW 1.19.2 (Vector, Mozilla + IE). Sure I could set $wgAjaxWatch to "false", but I need it to be set to "true" in order to run Extension:CategoryTree. There is a slim chance that in my case, this is related to a recent upgrade of SMW from 1.8.0.3 to SMW 1.8.0.4, but that doesn't seem very likely. [[User:Cavila|Cavila]] <span style="font-size:65%;">(MW 1.19.2, MySQL 5.1.66, Php 5.3.3-7, SMW 1.8, SF 1.5.2}</span> 12:36, 3 March 2013 (UTC)
:::Check the JavaScript error console to be sure it has no JavaScript errors when loading the page. Maybe you have any conflicting script that breaks the load of other MediaWiki stuff, including the watch/unwatch tab. [[User:Ciencia Al Poder|Ciencia Al Poder]] ([[User talk:Ciencia Al Poder|talk]]) 10:33, 4 March 2013 (UTC)
::::Sure enough, though I haven't been to locate the issue yet. I'll let you know when I have. [[User:Cavila|Cavila]] <span style="font-size:65%;">(MW 1.19.2, MySQL 5.1.66, Php 5.3.3-7, SMW 1.8, SF 1.5.2}</span> 14:31, 5 March 2013 (UTC)
:::::Using Firebug just helped me to pin the issue down to the following error: 
:::::<syntaxhighlight lang='text'>TypeError: $link.attr(...) is undefined
which refers to line 23 (beginning with "accesskeyTip...") in the file .../resources/mediawiki.action/mediawiki/mediawiki.action.watch.ajax.js. The fuller context is as follows:
function updateWatchLink( $link, action, state ) {
	// message keys 'watch', 'watching', 'unwatch' or 'unwatching'.
	var	msgKey = state === 'loading' ? action + 'ing' : action,
		accesskeyTip = $link.attr( 'title' ).match( mw.util.tooltipAccessKeyRegexp ),
		$li = $link.closest( 'li' );
Cavila (MW 1.19.2, MySQL 5.1.66, Php 5.3.3-7, SMW 1.8, SF 1.5.2} 18:30, 1 July 2013 (UTC)
Could this be bug Bug 47480? If so, what would be the solution? Cavila (MW 1.19.2, MySQL 5.1.66, Php 5.3.3-7, SMW 1.8, SF 1.5.2} 19:46, 1 July 2013 (UTC)

Table column unsortable when fields begin with $

I've got a table with 3 columns that I want to be able to sort. The first and second columns list a bunch of values that all begin with the $ character, followed by a single letter. I cannot seem to get them to sort (i.e., nothing happens when I press the sorting arrows), although the third column (simple text) sorts just fine. Is there a way to solve this?

  • Mediawiki 1.15.1
  • PHP 5.1.6
  • MySQL 5.0.22

Below is the table:

{|  class="wikitable sortable" cellspacing="0" cellpadding="5" 
! Token
! Alt
! Description
|-
| $C 
| $c 
| Cost
|-
| $P 
| $p 
| CPS
|-
| $H 
| $h 
| Percent chance
|-
| $N 
| $n 
| Number
|-
| $U 
| $u 
| Cumulative 
|-
| $Z 
| $z 
| Current location
|-
| $I 
| $i 
| Max 
|-
| $V 
| $v 
| Max TL
|-
| $W 
| $w 
| Current value
|-
| $@ 
|  
| Multicharacter
|}
Jcseely (talk) 19:27, 16 March 2012 (UTC)
bump 216.148.0.72 18:15, 3 April 2012 (UTC)

Possible bug in the search API

Hi

i'm trying to use the API to perform searches on the french wiktionnary (letter may have accents). I wanted to make a case-insensitive search for CREE :

http://fr.wiktionary.org/w/api.php?action=opensearch&search=%22CREE%22&format=json

It returns :

["\"CREE\"",["cr\u00e9er","Cree","cr\u00e9\u00e9","cr\u00e9\u00e9e","creek","cr\u00e9eras","creer","creed","creep","cr\u00e9ent"]]

But "cr\u00e9e" seems to be missing (this page exists : http://fr.wiktionary.org/wiki/cr%C3%A9e)

Am I missing someting ?


BTW is it possible to user meta characters such as '^' and '$' Apc005 (talk) 20:57, 16 March 2012 (UTC)

question about php code

Hi, If I change

require_once( "$IP/extensions/Gadgets/Gadgets.php" );
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );
require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
require_once( "$IP/extensions/Nuke/Nuke.php" );
require_once( "$IP/extensions/Renameuser/Renameuser.php" );
require_once( "$IP/extensions/Vector/Vector.php" );
require_once( "$IP/extensions/Cite/Cite.php" );

to

$extensions_array = array ('Gadgets', 'WikiEditor', 'Cite', 'ConfirmEdit', 'ParserFunctions', 'Nuke',  'Renameuser', 'Vector');

for($i=0;$i<sizeof($extensions_array);$i++){
     require_once( "$IP/extensions/$extensions_array[$i]/$extensions_array[$i].php" );		
}

(make it easier to add new extensions) will be the additional load on the server or not? Thanks in advance. P.S. Perhaps this question is stupid, just I don't understand why it has not been done by default. 0x0F (talk) 12:28, 17 March 2012 (UTC)

first, does it work? maybe this is better to read:
     require_once( "$IP/extensions/{$extensions_array[$i]}/{$extensions_array[$i]}.php" );
i think it's because this is only the recommended naming for extensions. some very simple do only have a single file in the extension-directory. Cembon (Talk | Contributions) 13:45, 17 March 2012 (UTC)
The load is probably very minimal. If you're really concerned you should use profiling. However I highly doubt it makes a significant difference.
>i think it's because this is only the recommended naming for extensions. some very simple do only have a single file in the extension-directory.
That's correct, but to be honest you'd be hard pressed to find an extension that is both not totally crap, and also doesn't follow that convention. All the extensions in his list follows the convention as far as I know. Bawolff (talk) 22:36, 17 March 2012 (UTC)
In his list all extensions are named recommended, but his suggestion was to do this by default and other people may dont't want this, because they need extensions that have a different naming. Cembon . . (Talk | Contributions) 08:01, 18 March 2012 (UTC)
I might be worried about $i being used elsewhere, but besides I don't really have much of a concern about this, besides the steep learning curve for non-programming-savvy sysadmins. Jasper Deng (talk) 19:39, 18 March 2012 (UTC)
Aside from the $i potentially being used somewhere else (and it becoming a global variable...), it also makes it harder to add an extension in an automated way.
Adding require_once( "$IP/extensions/Cite/Cite.php" ); is easy from a automated point of view. Whereas looking for this array and adding something to it is harder.
And there is the argument of some extensions (either older ones or ones not in Wikimedia SVN) not following this convention (either they don't have a directory or the file might be named differently than the directory etc.).
There's also readability to some degree (the long array is less readable, although one could add a line break after each array item). Krinkle (talk) 23:54, 18 March 2012 (UTC)
The probability of $i being used somewhere else in the code, in global scope, for something other then a loop variable that needs to persist from before LocalSettings.php to after LocalSettings.php, seems pretty small... Bawolff (talk) 23:59, 18 March 2012 (UTC)
Don't for loops have their own scope? I'm not sure why that would be an issue.
Anyway, non-conforming extensions could always be added separately. —Emufarmers(T|C) 02:37, 19 March 2012 (UTC)
Well, we could always make something like a
$wgExtensionID
. Jasper Deng (talk) 02:56, 19 March 2012 (UTC)

Duplicate Page Entries

Hi, I am trying to use the Page & PageLinks tables for my Page Rank project. I am using the mysqldump files available for download.

I have noticed that there are a few entries in the Page table that have the same Page Title.

How do I resolve a PageLink Record that is pointing to a Page Title with a duplicate Page ID.

Any help will be greatly appreciated.

Thank You, Venkata (Ravi) Adusumilli 136.237.60.105 (talk) 16:05, 17 March 2012 (UTC)

Your question is kind of confusing, and I think you're mixing up the role of a few of MediaWiki's db fields.
Each page in mediawiki has a unique id, which is a number. In a url (Where it very rarely appears) it is called the curid. Other places call it either article id, or page id. To use project:Support desk as an example, it has a page_id of 49433 (and hence can be accessed at https://www.mediawiki.org/w/index.php?curid=49433 ).
The page_title is not the full name of the page, but only the part after the colon. Thus Project:Support desk has a page_title of Support_desk. It would also have a page_namespace of 4 (4 = Project. Other common ones are 0 for main (no prefix) namespace, 1 for talk. See help:Namespaces for more info)
>I have noticed that there are a few entries in the Page table that have the same Page Title.
Provided they are in different namespace (page_namespace field), that's normal. If two pages have the same page_title, and the same page_namespace, something is wrong.
>How do I resolve a PageLink Record that is pointing to a Page Title with a duplicate Page ID
There should only be 1 page_id for each (page_namespace, page_title) pair, so there should be no duplication.
See also manual:Page table and manual:pagelinks table Bawolff (talk) 22:32, 17 March 2012 (UTC)
Thank You for the clarification. I get it now.
I was ignoring the namespace before.
Thanks Again. Venkata (Ravi) Adusumilli (talk) 19:53, 18 March 2012 (UTC)

Upload and Save Page redirects to local and not external domain/IP

On any external machine, when I upload files or save edits to my wiki I get redirected to the local IP address of my server on the network (e.g. 192.168.x.x), which gives me an error. How do I permanently disable the change of domain name? I have already tried to edit the /etc/hostconfig file, as is specified here.

I am running the version 1.18.1 of MediaWiki, 5.2.15 (apache2handler) version of PHP, version 3.3.7 without full-text search support of SQLite, and hosting from Mac 10.5.8 (Client) via Websharing for Apache. I am also using Port Forwarding. Brennonbrimhall (talk) 23:07, 17 March 2012 (UTC)

Look in LocalSettings.php for a line involving $wgServer . Its probably set to the wrong thing. Bawolff (talk) 00:44, 18 March 2012 (UTC)
What should it be set to? Brennonbrimhall (talk) 01:18, 18 March 2012 (UTC)
Usually 'http://MyDomainNameHere.com'
See also manual:$wgServer Bawolff (talk) 02:11, 18 March 2012 (UTC)
Many thanks! Brennonbrimhall (talk) 01:21, 18 March 2012 (UTC)

New users can't login

Error message when new users try to login: "Login error Incorrect or missing confirmation code." I have been using Confirmedit/Asirra for months with no problem but recently updated the database using the Web updater after installing Liquid Threads. I had also updated Semantic Bundle to the latest version at this same time. Since I wasn't made aware of the problem creating new accounts until after the above changes, I don't know which may be the culprit. I"ve tried upgrading Confirmedit/Asirra to latest version but that doesn't fix. Any guidance will be much appreciated.

MediaWiki 1.18.0, PHP 5.2.17 (cgi-fcgi), MySQL 5.0.92-log, Semantic Bundle (Version 20120308) DaveLMW 1.25.1, PHP 5.4.37, MySQL5.1.73-cll SMW 2.2 15:36, 18 March 2012 (UTC)

Why would you use the web updater? Jeffw(talk) 16:20, 18 March 2012 (UTC)
Liquid Threads & I don't have command line access. DaveL (talk) 16:33, 18 March 2012 (UTC)
Some extensions simply are not compatible with some versions of MediaWiki. That might be your issue. Bawolff (talk) 16:32, 18 March 2012 (UTC)
Thanks, I switched to a different Captcha using ConfirmEdit and it works. Also had to disable email confirmation requirement to edit but I can live with that for now. DaveL (talk) 18:55, 18 March 2012 (UTC)

Nothing?

I recently installed a new MediaWiki but when I create a page the box with bold text and other options is gone and when I make tables, no borders appear only white and text. Why is this? 83.226.84.78 (talk) 19:42, 18 March 2012 (UTC)

Can you show us what you were trying to write? Jasper Deng (talk) 04:39, 5 April 2012 (UTC)
Answered at the correct location: Project:Support desk/Flow/2012/03#h-No_tables_and_so?-2012-03-20T16:00:00.000Z. Jokes Free4Me (talk) 11:14, 8 January 2013 (UTC)

Is this possible to do?

Is it possible to, without extensions, to have a page show how far a number is from another number?

In other words, I want a page to say "This year was X years ago.", and X is the current year (Which I can set manually, as this is a wiki about another fictional universe) minus the name of the page.

I can't add extensions, as I'm using a wikihost that doesn't let you do that. 50.80.25.170 (talk) 20:54, 18 March 2012 (UTC)

It would be very very difficult to do that without extension:ParserFunctions Bawolff (talk) 23:55, 18 March 2012 (UTC)
What host are you on? Jeffw(talk) 03:04, 19 March 2012 (UTC)
Wikkii: [[1]]
There are installed extensions, and one of them is ParserFunctions. 50.80.25.170 18:08, 20 March 2012 (UTC)
In that case you can use {{#expr: to do calculations. For example This year was {{#expr:{{CURRENTYEAR}} - {{{1}}} }} years ago creates a template that does what you describe. See help:Extension:ParserFunctions for details. Bawolff (talk) 00:44, 21 March 2012 (UTC)
Then shouldn't the year thing work? If you're having problems MyWikis can help you all you need. We already have TONS of extensions installed. See? Jeffw(talk) 22:49, 20 March 2012 (UTC)
I didn't know that you could use ParserFunctions for things like that so that's why I asked how I could do it. But now I do so it's solved the problem.
And thanks to everyone for the help. 50.80.25.170 12:57, 21 March 2012 (UTC)

API error: No JSON object could be decoded

I have an error with API using latest pywikipedia. API is turn on in LocalSettings.php and have worked about 6 month ago (but since that I've moved to another server, upgraded wiki from 1.17 to 1.18 and changed permalinks as described here ).

The error is:

Logging in to domainname:ru as USERNAME via API.
 Error downloading data: No JSON object could be decoded
 Request ru:/w/api.php
 Retrying in 1 minutes...

I've checked BOM as described here (http://sourceforge.net/tracker/?func=detail&aid=3019475&group_id=93107&atid=603139) and do not get any errors.

Need advice! 178.204.102.216 (talk) 08:14, 19 March 2012 (UTC)

Can you share the URL to the wiki?
What is the wiki-family "domainname:ru" set to? Try accessing that + "/w/api.php" in your web browser.
Does it look like www.mediawiki.org/w/api.php ? Krinkle (talk) 14:46, 19 March 2012 (UTC)
http://7kingdoms.ru/w/api.php get this:
<?xml version="1.0"?>
<api servedby="server.domain.com">
<error code="help" info="" xml:space="preserve">
domainname:ru is 7kingdoms:ru but this don't matter I think, it is just profile name. 178.204.102.216 16:33, 19 March 2012 (UTC)
I still need help. My /w/api.php is similar to _mediawiki.org/w/api.php (except servedby), but server.domain.com is just name. Or not? 178.205.57.22 01:16, 21 March 2012 (UTC)
Your wiki appears to be timing out, I can't access it. Krinkle (talk) 20:00, 27 March 2012 (UTC)

Private Wiki with accessible Special:ConfirmEmail

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


Dear Community,

I am really pleased having the opportunity to ask in this Suport Section. So I first of all want to thank you for this possibility. My project at University is to build up a private wiki. On the one hand it should inform people (anonymous users) and on the other hand it should give a solution for students writing articles. This should only be accessible for registered and "CONFIRMED" Students. Students should register and confirm their Universitymail. Anonymous and registered Users do not have any rights. Here is where the problem goes: When a just registered student tries to confirm his email. He is not allowed to because he has inssufficient rights. I already tried to add the "Special:Confirm" in the WhiteListe. But in every Confirmation Email there is a different link (like .../Special:Confirm/4393939373). You can find a prototype of this wiki under:

www.rubenkrapf.de/w/index.php Thank you very much for your efforts. 143.93.63.6 (talk) 15:07, 19 March 2012 (UTC)

You might find help here:
I think, the different links in the confirmation emails are caused by the different tokens (cf. Manual:$wgEmailAuthentication).
Later you should customize MediaWiki:Prefs-help-email as well, because the standard message (Angabe einer E-Mail-Adresse ist optional) doesn't apply to your wiki. ThT (talk) 17:52, 19 March 2012 (UTC)
Thank you very much. I already tried the options mentioned above. But the problem is, as you said, that every confirmation token is different of an other. Out of this it is not whitelisteable because the URL and Site varies. Any Idea where in the SpecialPages.php I can make every URL in the index.php/Special:ConfirmEmail/xxxx readable for everyone? Its just this little thing that I need to fix. Thanks for your efforts. 93.204.248.17 13:26, 21 March 2012 (UTC)
In your situation, I would create accounts using the "By E-mail" option as a sysop. Jasper Deng (talk) 02:06, 22 March 2012 (UTC)
I have the same problem. Did the post of Jasper worked out?
@jasper: how do I configure those registrations as a sysop?
Thx! Hennio (talk) 21:41, 21 June 2012 (UTC)
Huh? Jasper Deng (talk) 21:45, 21 June 2012 (UTC)
You should not need to list the subpage of Special:ConfirmEmail in the whitelist (I believe, otherwise things are rather broken for wikis that use your setup, and I would consider that a bug ;) )
Also if your wiki is not english, you may need to use the localized version of the special page name.
Have you read Manual:$wgReadWhitelist? Bawolff (talk) 13:04, 22 June 2012 (UTC)
You should not need to list the subpage of Special:ConfirmEmail in the whitelist (I believe, otherwise things are rather broken for wikis that use your setup, and I would consider that a bug ;) )
Also if your wiki is not english, you may need to use the localized version of the special page name.
Have you read Manual:$wgReadWhitelist? Bawolff (talk) 13:04, 22 June 2012 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Is this Robots.txt Correct?

I wanted to prevent all useless pages from being indexed. Is this the correct way to do it? Does the star just mean that any page starting with the name to the left should not be indexed?

User-agent: *
Disallow: /index.php
Disallow: /w/
Disallow: /Category:*
Disallow: /Category_talk:*
Disallow: /Extension:*
Disallow: /Extension_talk:*
Disallow: /File:*
Disallow: /File_talk:*
Disallow: /Image:*
Disallow: /Image_talk:*
Disallow: /index.php
Disallow: /Help:*
Disallow: /Help_talk:*
Disallow: /Manual:*
Disallow: /Manual_talk:*
Disallow: /Media:*
Disallow: /MediaWiki:*
Disallow: /Media Wiki_talk:*
Disallow: /Project:*
Disallow: /Project_talk:*
Disallow: /Special
Disallow: /Special:*
Disallow: /Talk:*
Disallow: /Template:*
Disallow: /Template_talk:*
Disallow: /User:*
Disallow: /User_talk:*

Also I have a directory in the root of my site called "Game Music" which has MP3s in. Google is showing non-existant pages from that directory in search results (only MP3s are in that folder, there are no pages).

I tried the following a month ago but pages are still showing in search results:

Disallow: /Game Music/

Is there a problem with there being a space in the directory name?

Would this work to block everything in that directory from being indexed?

Disallow: /Game*
Holygamer (talk) 15:53, 19 March 2012 (UTC)

How to set build-in special page like (export) only valid for Bureaucrats or Administrators?

I saw there is some link in Special:SpecialPages in Bold

Restricted special pages.

How can I set a normal special page to Restricted special pages? Deletedaccount4567435 (talk) 18:47, 19 March 2012 (UTC)

Unable to upload new version of existing file

We're getting the usual "Could not rename file" error when trying to upload the new version of a file, but it's ONLY with files that have been uploaded prior to our last wiki software upgrade (around 9/13/2011... 1.13->1.16.5). We can easily upload duplicates/updated files to any file that was uploaded once the update was made, but any file uploaded prior to 9/13/2011 cannot be moved to the /archives folder.

Have checked all the directory permissions and can't find anything wrong. (We're using Windows Server 2003 with IIS, in this case the IUSR account has modify permissions on the entire /images directory as well as images/archive.)

MediaWiki version: 1.16.5
PHP: 5.2.17 (ISAPI)
MySQL: 5.1.58

Keep in mind we're on a government network, so don't chastise us too quickly for having an outdated version of PHP/MySQL. ;)

Hallllpppp! -Kendall Kchurch05 (talk) 19:01, 19 March 2012 (UTC)

Anyone?? We're at a total loss here. Kchurch05 (talk) 16:46, 3 April 2012 (UTC)
First try to set the image dir owner by Tunnelier via SSH to the same as wiki dir.
For example, if the wiki dir owner is 1001. Then set the image onwer to 1001 too.(If you have huge amount dir in the image dir, try to use script to do that)
If the firest one did not work.
Simple set all the image dir to 777.
But this is danger since everybody can execute script in your site. Zoglun (talk) 16:50, 4 April 2012 (UTC)
Thanks Zoglun, unfortunately we're on IIS. However, I figured out at what point the IUSR file permissions ceased to exist (right around the time we did the upgrade) and had to select the 15K files *before* that one, and then just add the IUSR permissions from there back. For some reason doing a directory level permissions and telling it to propagate to all the individual files wouldn't work. Either way, problem solved. :) Kchurch05 (talk) 18:39, 5 April 2012 (UTC)

404 error for just one edit window

There is just one page (and its talk page) in my wiki where the edit window won't load, giving a 404 error. I apologize for the fact that the page in question is a tad NSFW, so I'll just link it. There's nothing special about that page, at least nothing deliberate. It uses Template:Argument, which numerous other pages use with no problem (e.g. Governments should promote families). Thanks! Modrobene (talk) 03:06, 20 March 2012 (UTC)

I'm bumping this and adding more info: I can't delete or protect the page (404 errors), but I can move it. So then I did a couple things
  1. I moved it to Badpage, but I still got a 404 when I tried to edit it.
  2. I recreated the exact same text at Homosexualitytest. It worked perfectly, no problems.
  3. I moved "Homosexualitytest" to the original NSFW title (so mediawiki deleted the redirect that was there, even though I couldn't do that directly). The 404 error came back, so I can't edit it.
  4. The original article (which is now "Badpage") now works, it's just at the wrong title. Nothing has changed from when it didn't work except that there is now a different non-working page with the original NSFW title.
I realize that's confusing, sorry, but the tl;dr is that this page, and only that page, can't be edited. Modrobene (talk) 01:47, 21 March 2012 (UTC)
Show me your $wgArticlePath, $wgServer, and $wgCanonicalServer and your MediaWiki version. Jasper Deng (talk) 03:36, 21 March 2012 (UTC)
OK, I think you have a file permissions problem right there. I also noticed that you have some odd extensions like PreloadManager installed (try disabling that and StubManager first since StubManager has many known bugs and is unmaintained). Jasper Deng (talk) 03:40, 21 March 2012 (UTC)
I don't have Canonical server defined. I just deinstalled preload and stubmanager but that didn't fix it. Is there a way to check file permissions? I can't find any explanation of that.
Do iyou know if there is a better way to use preloaded text when creating articles? That's the only reason for me to use stubmanager. Thanks! Modrobene (talk) 04:15, 21 March 2012 (UTC)
Do you have shell access? Jasper Deng (talk) 04:24, 21 March 2012 (UTC)
Nope Modrobene (talk) 04:32, 21 March 2012 (UTC)
Ugh, you've gotta find out why you're being redirected to something like /w/index.php from your intended /wiki/index.php.Jasper Deng (talk) 04:42, 21 March 2012 (UTC)
I enabled short URLs using this method - Manual:Short URL/wiki/Page title -- no root access cpanel. Is there something wrong with the settings there? I also deinstalled the twitterfacebookextension, which is the only other nonstandard extension I had. Modrobene (talk) 04:55, 21 March 2012 (UTC)
OK, where's your wiki really installed? Jasper Deng (talk) 04:59, 21 March 2012 (UTC)
I don't know what that means. Modrobene (talk) 05:05, 21 March 2012 (UTC)
What's the actual folder called? Try disabling that redirection for now and see if anything changes. Jasper Deng (talk) 05:45, 21 March 2012 (UTC)
Oh, it's just "w". Removing the redirection causes the whole wiki to give a 404 error (or at least the main page). Unless would I have to change the folder name when I remove the redirection? I just removed the settings in htaccess and localsettings.php. Modrobene (talk) 06:17, 21 March 2012 (UTC)
If you remove the redirection rules you have to set $wgServer back to the original non-redirected folder. Jasper Deng (talk) 16:28, 21 March 2012 (UTC)
Ok that broke the skin or something, the text was present but the site elements weren't, and the 404 error was still there. Modrobene (talk) 22:52, 21 March 2012 (UTC)
To be specific, there's a problem on that page that's causing an incorrect redirect to an unauthorized location (a 403, not a 404, error). I think a developer should comment here. Jasper Deng (talk) 22:54, 21 March 2012 (UTC)
I was just fiddling around with the redirection settings and it started eating my localsettings.php, each time I saved it, more of the text vanished. I restored everything from a backup (except for some settings that disappeared) but it was weird. Is it to soon to comsider that mediawiki has gained consciousness and is trying to censor anti-gay rhetoric? There are worse scenarios for software gaining consciousness... Modrobene (talk) 23:10, 21 March 2012 (UTC)
Damnit, I don't know why I ever try to fix anything on my own, I always just end up making it worse. My custom namespaces are gone, and I recreated them but the pages that were there are gone now... I've got a buttload of content to recreate now. Modrobene (talk) 23:36, 21 March 2012 (UTC)
Eating your LocalSettings.php?? Something's wrong with your website security then. Jasper Deng (talk) 00:36, 22 March 2012 (UTC)
I just changed my password to something a little more secure. Modrobene (talk) 04:44, 22 March 2012 (UTC)
I mean, below MediaWiki, at the webserver level. But if it doesn't look like hacking is happening, your webhost has a problem (possibly caused by incomplete uploads of your LocalSettings.php?) Jasper Deng (talk) 04:45, 22 March 2012 (UTC)

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

Hi all,

I've got a really old MW Installation which i want to upgrad to v1.18.1. I followed all the update instruction but after calling "php update.php" over the terminal, I get this message:

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

The problem is, that my MW1.2 doesn't have a Database attached. It only runs with textfiles. I don't know what I have to do now. Can anybody help?

Thx Dan 213.200.198.65 (talk) 09:03, 20 March 2012 (UTC)

  1. Rename your old directory to something else
  2. Create a new folder, with the same name, with the files for MediaWiki 1.18.1
  3. Move your old LocalSettings.php to the root of the new folder
  4. Run the installer
This worked for me for my cases, but you may have considerably more difficulties than me considering your huge version jump. Jasper Deng (talk) 02:25, 22 March 2012 (UTC)

No tables and so?

I recently installed a new MediaWiki but when I create a page the box with bold text and other options is gone and when I make tables, no borders appear only white and text. Why is this? 83.226.84.78 (talk) 16:00, 20 March 2012 (UTC)

Can you possibly give us a screenshot and other details including your MediaWiki version? Jasper Deng (talk) 02:26, 22 March 2012 (UTC)
The tables part is by design: you have to explicitly set the style (including borders) for each table you input. A "wikitable" class might work out of the box, but i wouldn't know since i never tried testing such a feature.
As for the buttons around the edit box, there might be a configuration setting somewhere. Actually, Special:Search/edit page buttons suggests Manual:FAQ#How_do_I_add_more_buttons_on_the_edit_page.3F, which links to Manual:Custom edit buttons. Do you have Extension:WikiEditor installed and enabled? Jokes Free4Me (talk) 11:14, 8 January 2013 (UTC)

Lost Admin Username

In a marathon session setting up our website, my tech help installed our wiki and pointed me to the mediawiki site to configure it. Unfortunately although some of the setup info was noted, I failed to write down the admin username, and in the month of other projects that intervened, neither of us can remember it. I can access the wiki and of course I can configure LocalSettings.php on the server along with the files in the wiki folder, but cannot login as the administrator. How can I retrieve or reset my login?
MichaelM : http://perfectenvirons.org/wiki/index.php?title=Main_Page
MediaWiki1.18.1 PEwiki (talk) 18:07, 20 March 2012 (UTC)
Hi!
You can try going to phpMyAdmin (or any other tool you use to manage your databases) and look for the 'user' table. Myidealh (talk) 08:04, 21 March 2012 (UTC)
It's even easier: The page Special:ListUsers holds a list of those users. The username is Michael. 88.130.123.30 10:37, 21 March 2012 (UTC)
You are awesome. Thank you. 130.184.104.33 22:00, 5 March 2013 (UTC)
I have tried this route and changed the bin password file, yet my user name still cant get access? 50.194.86.193 (talk) 16:25, 15 December 2016 (UTC)
I don't know what bin password file you are talking about. Passwords for MediaWiki users are stored inside the database and can be changed using the changePassword.php maintenance script. 83.135.225.133 (talk) 17:08, 15 December 2016 (UTC)

Upgrading Issues 1.12 --> 1.18

Hello,
I am trying to upgrade our MediaWiki instance from 1.12 to 1.18 and am experiencing issues performing the upgrade.
Firstly as this Wiki is on an intranet it is not publically accessible.

Steps I have taken

1. Upload contents of 1.18 tarball over the top of the 1.12 installation excluding 'LocalSettings.php', 'extensions' and 'images' dierctory

2. Perform the database upgrade from the command line by execututing 'php update.php'


The database upgrade works just fine, it completes without error but when I try and hit the site afterwards it does not compile. Instead I get the following PHP error.

Fatal error: Cannot redeclare wfprofilein() (previously declared in /usr/share/mediawiki/includes/profiler/Profiler.php:14) in /usr/share/mediawiki/includes/ProfilerStub.php on line 12


All extensions in my 'LocalSetting.php' have been remarked out. The extensions I have remarked are 'BreadCrumbs' and 'fileLinkExtension'

If I edit '/usr/share/mediawiki/includes/profiler/Profiler.php' and remove the declaration I get another error and so on.

Any tips or advice would be appreciated.


Thanks

Shane Baldacchino 203.94.135.197 (talk) 21:41, 20 March 2012 (UTC)

Did you remember to remove the old files? In general, I don't like overwriting; I typically would make a new folder for the new MediaWiki installation, and move the LocalSettings.php file there. Then, I'd rename that new folder to the desired name after renaming the old folder to an old name. After that I'd run the installer. Jasper Deng (talk) 02:28, 22 March 2012 (UTC)
Had the same while upgrading to 1.18.1 from 1.10.1. See Manual talk:Upgrading - "Cannot redeclare wfprofilein()" for the solution. ThT (talk) 15:05, 26 March 2012 (UTC)

User account problem

My wiki host (MyWikis) is having problems with login. Users can't create accounts and update.php is useless. Please try creating an account there, thanks! Jeffw(talk) 00:45, 21 March 2012 (UTC)

You have a problem with your database. If you modified the login screen with additional fields (which it appears that you did), did you remember to add the required column to the table in question? Jasper Deng (talk) 03:49, 21 March 2012 (UTC)
I installed Extension:NewSignupPage, but now I did all necessary and it's still not working. Jeffw(talk) 23:17, 21 March 2012 (UTC)
Apparently it did not create the correct table row for you. Jasper Deng (talk) 00:35, 22 March 2012 (UTC)
Now what? Jeffw(talk) 00:48, 22 March 2012 (UTC)
Either try upgrading your MediaWiki release to a pre-release version like 1.20 alpha or try creating the row yourself (easy if you can use PHPMyAdmin). Jasper Deng (talk) 00:59, 22 March 2012 (UTC)
ok, thanks! Jeffw(talk) 01:13, 22 March 2012 (UTC)

extension for automated archiving

I am looking for a Mediawiki extension, that allows automated archiving. It is important that users be informed in advance (possibly by an icon) before the page will be taken to the archiv. After a period, where pages can be updated, the file is moved to the archive.

Is this possible? Or there is an extension for it? 192.129.1.101 (talk) 11:55, 21 March 2012 (UTC)

What would that archive do? Actually the history page of each page is an archive already. Subfader (talk) 12:27, 21 March 2012 (UTC)
The archive is to archive unused pages.
Users should be made aware of this and get the chance
to update them.
It is therefore uncontrolled growth of the wiki to avoid. 192.129.1.101 13:04, 21 March 2012 (UTC)
What would archiving actually do? Lock the page to prevent editing, delete it, something else? Reach Out to the Truth (talk) 18:55, 26 March 2012 (UTC)

Could someone find or show me how to find this article?

http://meta.wikimedia.org/wiki/MediaWiki_FAQ#Is_it_somehow_possible_to_use_a_.22file.22_URI-qualifier_for_local_intranets_e.g._.5Bfile:.2F.2Flocalhost.2FC:_C-Drive.5D.3F Schalice (talk) 19:21, 21 March 2012 (UTC)

Manual:FAQ Jasper Deng (talk) 04:18, 22 March 2012 (UTC)
Is there a way to search all the archives? I have no clue what date the article is from... Thanks Schalice (talk) 15:11, 23 March 2012 (UTC)
Looks like it's pretty old-school; you'd have to download an archive and then Ctrl-F it :(. Jasper Deng (talk) 19:29, 23 March 2012 (UTC)
Thanks Jasper for your help. I believe at one time this article was quite important. It took me 5 months to realize that I could add the file:// protocol to links. That is because this feature is poorly referenced (IMHO), many users indicating the lost article as the holy grail. I'll look to hire Harrison Ford to do my research... Schalice (talk) 22:46, 23 March 2012 (UTC)
Its still there: https://meta.wikimedia.org/w/index.php?title=MediaWiki_FAQ&oldid=3101037#Is_it_somehow_possible_to_use_a_.22file.22_URI-qualifier_for_local_intranets_e.g._.5Bfile:.2F.2Flocalhost.2FC:_C-Drive.5D.3F (But really I hope everything has been moved to the other FAQ) Bawolff (talk) 18:14, 25 March 2012 (UTC)
I believe it was moved initially, but the FAQ changes over time. It doesn't make the FAQ very useful if it includes a question for every configuration setting and potential value that is in existence.

How can I add that content box on so many pages?

How can I add that content box on so many pages with links that jump to anchors on the page 216.54.123.4 (talk) 19:28, 21 March 2012 (UTC)

Use the magic word __TOC__. This will make a table of contents. It's on by default for pages with more than 4 sections. Jasper Deng (talk) 04:17, 22 March 2012 (UTC)

doesn't work

in http://simpsonspedia.net/index.php?title=Vorlage:Episode we use __NOEDITSECTION__ = no editing links

but if i use this template in an article http://simpsonspedia.net/index.php?title=Milhouse_lebt_hier_nicht_mehr then can you see the editing links. if you click one of this links you can edit a part of the template.

what going wrong? 178.24.205.126 (talk) 05:06, 22 March 2012 (UTC)

I can't see it, probably because you've disabled anonymous editing. Jasper Deng (talk) 21:19, 22 March 2012 (UTC)

ConfirmEdit extension prevents editing pages.

Hello all. I have installed the ConfirmEdit extension (on a 1.13), and configured it to

$wgCaptchaClass = 'QuestyCaptcha'; $wgCaptchaQuestions[] = {Q&A removed} $wgCaptchaTriggers['edit'] = false; $wgCaptchaTriggers['create'] = false; $wgCaptchaTriggers['addurl'] = true; $wgCaptchaTriggers['createaccount'] = true; $wgCaptchaTriggers['badlogin'] = false;

On the create account page, it successfully adds a captcha and prevents or allows logging in as appropriate.

Whenever a user tries to edit or create a new page, however, I receive errors:

one error: Warning: Parameter 1 to ConfirmEditHooks::confirmEditMerged() expected to be a reference, value given in /path/wiki/includes/Hooks.php on line 117

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

Backtrace:

  1. 0 /path/wiki/includes/EditPage.php(841): wfRunHooks('EditFilterMerge...', Array)
  2. 1 /path/wiki/includes/EditPage.php(2282): EditPage->internalAttemptSave(false, false)
  3. 2 /path/wiki/includes/EditPage.php(464): EditPage->attemptSave()
  4. 3 /path/wiki/includes/EditPage.php(349): EditPage->edit()
  5. 4 /path/wiki/includes/Wiki.php(492): EditPage->submit()
  6. 5 /path/wiki/includes/Wiki.php(59): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
  7. 6 /path/wiki/index.php(93): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
  8. 7 {main}

Thoughts on what could be the issue, or how I could even code a bypass? I've looked at the ConfirmEdit code and have tried short-circuiting some functions but nothing I do seems to even have an effect. Smaug (talk) 08:41, 22 March 2012 (UTC)

The first question to ask is whether your extension version is the same as your MediaWiki version. Looks like the wrong function was called here. Jasper Deng (talk) 21:19, 22 March 2012 (UTC)
Yeah. I am using 1.13 version. There is one exception, and that is that I've taken QuestyCaptcha pages from the 1.17 version since they don't exist in 1.13. I'm sure this is causing the error (though the extension documentation led me to believe it might work). Is there any workaround I could investigate, or placce in the code I might go to patch it to make it work? Smaug (talk) 02:06, 23 March 2012 (UTC)
Disable the QuestyCaptcha extension and see if you have this problem. Yeah, these extensions really only work best on the latest versions of MediaWiki, try upgrading if nothing can work but you still want this extension. Jasper Deng (talk) 02:18, 23 March 2012 (UTC)
So, I've switched it to use Math Captcha instead of Questy. Now it uses all 1.13 files, but I am receiving a partially different error.
On user account creation pages, it shows a message
Failed to parse (Cannot write to or create math temp directory): 79 - 8 =
The number are different each time, but the message continuously appears. Entering the correct answer to the equation generates an "Login error: incorrect or missing confirmation code." message box error.
Furthermore, I am receiving the same error as before! So perhaps QuestyCaptcha is not at fault.
Detected bug in an extension! Hook ConfirmEditHooks::confirmEditMerged failed to return a value; should return true to continue hook processing or false to abort.
Backtrace:
  1. 0 /path/wiki/includes/EditPage.php(924): wfRunHooks('EditFilterMerge...', Array)
  2. 1 /path/wiki/includes/EditPage.php(2282): EditPage->internalAttemptSave(false, false)
  3. 2 /path/wiki/includes/EditPage.php(464): EditPage->attemptSave()
  4. 3 /path/wiki/includes/EditPage.php(349): EditPage->edit()
  5. 4 /path/wiki/includes/Wiki.php(492): EditPage->submit()
  6. 5 /path/wiki/includes/Wiki.php(59): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
  7. 6 /path/wiki/index.php(93): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
  8. 7 {main}
Thoughts? Smaug (talk) 02:23, 23 March 2012 (UTC)
Check your file permissions, for the first one. Did you try an earlier version of ConfirmEdit? (Trunk is a bad idea unless you have a trunk version of MW). Jasper Deng (talk) 02:32, 23 March 2012 (UTC)
What should my files permissions be, and for what file or folder? The current math directory file permission is rwxr-xr-x
Smaug (talk) 18:11, 23 March 2012 (UTC)
You have to allow the webserver to write to that directory; that's a tough sell if you're using a webhost :( . Jasper Deng (talk) 19:25, 23 March 2012 (UTC)
I actually have a VPS. :) What might the name of my webserver's user be? I am using apache2. Is it www-data? Smaug (talk) 00:29, 24 March 2012 (UTC)
The user that the webserver runs under Jasper Deng (talk) 00:35, 24 March 2012 (UTC)
Would that be the same user that set it up? In that case, it already is owned by that user and in the group. Smaug (talk) 02:11, 24 March 2012 (UTC)
No, the user the Apache server uses. Jasper Deng (talk) 02:18, 24 March 2012 (UTC)
Right, that's what I thought you meant. Do you know how I determine which user this is?
Thanks. Smaug (talk) 14:54, 24 March 2012 (UTC)
Do you have shell access? Jasper Deng (talk) 16:17, 24 March 2012 (UTC)
Yes, I do. Smaug (talk) 05:41, 25 March 2012 (UTC)
I don't know how it works in Linux, but in Windows you have to set file permissions of the installation folder so anyone can read/write it. Jasper Deng (talk) 05:44, 25 March 2012 (UTC)
I can try that out, but isn't making it world writable a security risk? Smaug (talk) 22:38, 25 March 2012 (UTC)
Yeah. The other way to do it is to make a user account and then make the Apache service run under it. Then you can set your file permissions to allow it full control over the web directory. Jasper Deng (talk) 22:43, 25 March 2012 (UTC)
Ahhh, I figured out which user was the webserver user, then I changed the owner and group of the math directory to be under that user, but it shows the same error as before! Smaug (talk) 03:34, 28 March 2012 (UTC)
Perhaps consider giving the user full control over the entire directory, since the error does not specify exactly where it's trying make the directory. Jasper Deng (talk) 03:37, 28 March 2012 (UTC)
Jasper,
I looked into it and giving the webserver write access to a directory like that is dangerous, its not a good practice. Is there any other way to make it work?
I appreciate all of your help! Smaug (talk) 04:14, 28 March 2012 (UTC)
There are many things for which MediaWiki needs write access to the directory.
If you'd like, make it temporary, and try to find the required directory. It may also help to review the ConfirmEdit source code for information. Jasper Deng (talk) 04:16, 28 March 2012 (UTC)

Installation Error

MediaWiki Version 1.18.1 URL http://www.weareearthborne.com/wiki

This is a new install. The Installation seemed to go ok, but I get the following errors:

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\wiki\includes\LocalisationCache.php on line 326

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\wiki\includes\LocalisationCache.php on line 377

Fatal error: Unsupported operand types in C:\xampp\htdocs\wiki\languages\Language.php on line 248

I already read to try to add these lines to LocalSettings.php, but to no avail:

$wgLocalisationCacheConf['store'] = 'file'; $wgCacheDirectory = '<some directory on local hard drive outside of web server root>'; 76.215.111.217 (talk) 10:43, 22 March 2012 (UTC)

I just tried editing your wiki and it works without giving errors. Could you solve this already?
If it's not solved, please tell us, what exactly you do to get these error messages. 88.130.99.201 13:15, 22 March 2012 (UTC)
I don't know what I did....  :(
It shows it's working for me now too.... I really am confuzzled. But as the old saying goes... if it ain't broke... don't fix it.
I added the two lines above to my LocalSettings.php. I guess it just took a while to work. Who knows. 76.215.111.217 14:40, 22 March 2012 (UTC)
Maybe you had old code in a cache somewhere, so that you still saw the error, although you had already fixed it. 88.130.99.201 16:46, 22 March 2012 (UTC)

Saving Pages takes Over 40 Seconds

My Versions: MediaWiki: 1.16.5, PHP: 5.2.17, MySQL: 5.1.61

Within the last couple of days whenever I edit a page in my MediaWiki site it takes up to 40 seconds to save the page. Previously it only took a few seconds. What is causing this problem? It's just saving pages that's slow, browsing my site by clicking on page links is fast.

I have over 2000 pages in my site but surely that's not causing the problem? I have a dedicated server with no visitors to my site. I know it's not my internet connection that's the problem because I also have another MediaWiki site on another host (shared hosting) and the pages only take a few seconds to save there. Holygamer (talk) 15:30, 22 March 2012 (UTC)

No, 2000 pages is no problem. The main difference between viewing and editing is I would say that when you edit something, you can be sure that data will be written to disc. Maybe you have a problem with writing something to disc? Or maybe you have an issue with your database? Activating the MySQL slow query log should help to check that. 88.130.99.201 16:53, 22 March 2012 (UTC)
OK thanks. How would I do that? I know HTML but I'm not familiar with code or how to perform queries, etc. What would I do with the results from the query? Holygamer (talk) 16:56, 22 March 2012 (UTC)
In the MySQL slow query log the MySQL server logs all queries, which took longer then a certain amount of time to complete (I think it's 1 or 2 seconds). This can help you see, if it is your database, which is slow (or probably something else).
To enable the MySQL slow query log, simply add the following line to the MySQL configuration file (my.cnf or my.ini), and then restart the MySQL server:
log-slow-queries
or
log-slow-queries = [path to the log file]
Replace [path to the log file] with the path to the slow query log file you want MySQL to write the log to.
Here is the MySQL manual. It has an overview of all available options.
Then edit a page, wait the time and check, if there is an entry in that log. Sidequestion: Are you responsible for the server yourself, or do you have someone, who normally does things like that for you? 88.130.99.201 22:01, 22 March 2012 (UTC)
I have a Dedicated Server which I have access to. If I need stuff done which I don't understand I will get my host to do it. Holygamer (talk) 22:05, 22 March 2012 (UTC)
Then ask your host to check the slow query log for you.
Or maybe better: If you didn't change anything, the issue obviously is not caused by you. Ask your host if he knows a possible reason; maybe he has changed something in the configuration or so. 88.130.99.201 22:35, 22 March 2012 (UTC)
My host says that the slow query log doesn't show anything. Is there anything else I can do? Holygamer (talk) 15:32, 24 March 2012 (UTC)
Yes: Ask your host if he knows a possible reason; maybe he has changed something in the configuration or so. 88.130.122.116 17:45, 24 March 2012 (UTC)
They say they haven't changed anything and they don't know of a reason Holygamer (talk) 19:11, 24 March 2012 (UTC)
And you accept this "We don't know and now shut up" as an answer? I mean: You didn't change anything and now it's broken. What do you pay him for? For this insufficient output? I guess not. If the host is responsible for the server, he is the one who should fix the problem. If he is not capable of doing so, maybe you should change to a host who is more reliable. 88.130.83.89 12:15, 25 March 2012 (UTC)
It could be other things then your hosts fault.
If you're using super complicated templates (like things copied from wikipedia.) they can be expensive to parse. A page save involves a parse, where a view might not. So you may want to try saving a page with just a single letter on it. If that is slow, its likely to be something with db, if it is not slow then its not the db's fault (in all probability)
You can also enable Profiling to be able to tell you exactly which part of MediaWiki is slow. That would be able to tell you if its the db taking forever, or something else.
Certain extensions may cause things to be slow as well. Bawolff (talk) 18:07, 25 March 2012 (UTC)
Is there a simpler guide anyware which explains how to enable profiling as I can't get it working. Holygamer (talk) 22:43, 27 March 2012 (UTC)
No. Profiling is as simple as it gets (Usually its only necessary on really big sites, so it doesn't get documented as much).
Other things you can try - see if ?action=purge takes same amount of time as an edit (If so probably the issue is parsing time, otherwise, the db theory looks more likely).
Also try disabling all extensions, and see if that makes a difference (Its possible for a poorly implemented extension to have an averse affect on how much time mediawiki takes) Bawolff (talk) 01:03, 28 March 2012 (UTC)
I have same problem.
My Versions
MediaWiki 1.19.0
PHP 5.3.12 (apache2handler)
SQLite 3.7.7.1
It seems that the cause is using images of wikipedia commons.
The problem page have some images such as Deletion icon.svg, Bulbgraph.svg and saving this page takes over 40 Seconds.
Removing images of wikipedia commons, it works well. Tree1891 (talk) 01:57, 11 May 2012 (UTC)
I know that InstantCommons-enabled wikis cache Commons content so that it is only downloaded once.
Where is the Commons content cache?
It seems that my wiki doesn't cache Commons content. Tree1891 (talk) 01:57, 11 May 2012 (UTC)
You might want to look at whether it's mediawiki's email notification feature that is slowing down the page save. If you have poorly configured settings for PHP to send emails, it will block the page for 20 seconds or more. Jdpipe (talk) 02:11, 2 November 2013 (UTC)

[RESOLVED] Unable to upload a file

When trying to upload a file to a wiki, I get an error message saying "The upload directory (public) is not writable by the webserver." I cannot find and repair the permissions of the public folder. Because I'm on OS X, can I use Disk utility to repair the permissions? HappyTreeFriends (my home page or talk 2 me) 17:43, 22 March 2012 (UTC)

No one's answering my question; please reply me now. HTFFanBrandon04 (talk) 18:28, 22 March 2012 (UTC)
Still not replying? I'm forcing you to. HTFFanBrandon04 (talk) 19:26, 22 March 2012 (UTC)
You are still not replying, I think I solved my problem, and no one will reply. I'm closing this discussion. HTFFanBrandon04 (talk) 20:40, 22 March 2012 (UTC)
(Note that this site does not have many people answering questions)
This means that you did not correctly set your file permissions; Disk Utility would not work. Jasper Deng (talk) 21:16, 22 March 2012 (UTC)
>You are still not replying, I think I solved my problem, and no one will reply. I'm closing this discussion.
Take a chill pill :P
----
Note that public is not the actual name of the directory, it refers to the directory where public images are stored. in the default install this is the images subdirectory of the mediawiki directory. Bawolff (talk) 18:26, 25 March 2012 (UTC)
(Note you probably won't recognize my new signature)
I fixed my issue by running a chmod in the /images directory in the MediaWiki root level to change its permissions to 777 (I can read and write, groups can read and write, everyone (including the web server of _www) can read and write, then changing the upload directory to $IP/images/ (optional). Thank you! HappyTreeFriends (my home page or talk 2 me) 10:19, 9 April 2012 (UTC)
thanks a lot for your help on changes permissons 91.85.120.19 10:36, 6 November 2013 (UTC)

Send watchlist page change notification even when not visiting Wiki

When a page on a watchlist is changed I receive a mail saying:

There will be no other notifications in case of further changes unless you visit this page.
You could also reset the notification flags for all your watched pages on your watchlist.

I would like to (using a checkbox) be able to enable new mails being sent even though I haven't visited the first page being changed. The reason is that we have a Wiki user connected to a email-distribution-list and we don't want to log in every time a page on that users watch list is changed.

Product     Version
MediaWiki   1.16.5
PHP         5.2.14 (apache2handler)
MySQL       5.0.95-log Wkenabr (talk) 09:05, 23 March 2012 (UTC)

Uploading Images The file you uploaded seems to be empty.

We had to restore our server after a hardware failure and I do have the Wiki up, but now when we try to upload an image, we get the following error..

The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.

We are running the Wiki on Windows Server 2008, IIS7 with the following versions.

Media Wiki 1.17 PHP 5.3.10 MySQL 5.5.17

My PHP Settings for file uploads is 8M and 2M and my LocalSettings.ini memory_limit is set to 128M

I am stuck on this as it was working great before the hardware failure and replacement.

Thanks Havoc64 (talk) 13:54, 23 March 2012 (UTC)

Double check that permissions on the temporary folders where images get uploaded are ok. Bawolff (talk) 18:23, 25 March 2012 (UTC)
That might explain my similar problem. Well, note to self: This isn't related to an HTTP proxy issue. Jasper Deng (talk) 18:25, 25 March 2012 (UTC)
I get the same error (sometimes). How would I find these temporary folders ? or their names ? Mlpearc (powwow) 01:47, 28 March 2012 (UTC)

Cannot access my wiki and it's really important :( :(

My wiki has stopped working and I have really important stuff in there. what should I do?? :( :(

sparkleisland.comuf.com/index.php/Main_Page 83.226.84.228 (talk) 14:47, 23 March 2012 (UTC)

Can you please give more details? Jasper Deng (talk) 00:13, 24 March 2012 (UTC)
When I view your wiki I get the error message "Database error: Database returned error 145: Table './a6156494_wiki/mw_text' is marked as crashed and should be repaired".
So you should repair this table. If you have a tool like phpMyAdmin available, there is an option to do that. Make sure you have a working backup! :-) 88.130.122.116 11:46, 24 March 2012 (UTC)
I don't have a backup.... So everything is lost? 83.226.84.228 14:45, 24 March 2012 (UTC)
You did not back up your database? It's not enough to just do so with your files. Jasper Deng (talk) 16:18, 24 March 2012 (UTC)
No, not everything is lost. In most cases the repair function can correct such errors. And if it does not, there still are some other ways to fix a broken table. However, you might want to try to create a dump of your database first. You can do this in phpMyAdmin using the "export" feature. If this works, you could at least return to the (damaged) state which you have now. (Otherwise things would become harder; you could try to copy the actual files, in which MySQL saves your database, if you have according access to the server.)
Then try the repair and see, if it solves your problem. 88.130.122.116 17:44, 24 March 2012 (UTC)

the form of the new files special page now redirects to home page

Hello,

I upgraded a MW 1.13 to 1.18 and now the search form of the new files galery redirects to the home page of the wiki without loggin any error in apache logs.

Produit Version MediaWiki 1.18.2 PHP 5.3.3-7+squeeze8 (apache2handler) MySQL 5.1.49-3

the generated form shows : <form action="http://s64vbibi845.dsit.sncf.fr/dsipedia118/index.php?title=Sp%C3%A9cial:Nouveaux_fichiers" method="get" class="visualClear"><fieldset> ...

but the MW log file shows : Start request

GET /dsipedia118/index.php?like=test&limit=&offset= HTTP HEADERS:


Any HELP ? Fraifrai (talk) 15:35, 23 March 2012 (UTC)

Are you using the official version of MediaWiki 1.18.2 (As downloaded from this website)? Bawolff (talk) 18:22, 25 March 2012 (UTC)
of course
I first upgrader from 1.13 to 1.18.1 and then from 1.18.1 to 1.18.2
The probelem appeared in both 1.18.x versions Fraifrai (talk) 19:17, 25 March 2012 (UTC)
I found a solution : If I convert the GET form in POST form with webdevelopper it works.
But I do not have this problém with another 1.18 MW, only with this one oO.
How can I fix this ? could an extension be implied in this issue ? Fraifrai (talk) 07:18, 26 March 2012 (UTC)
[this is old now]
Could be short url (or mediawiki's $wgArticlePath and related variables) being setup wrong somehow. [that's a guess though] Bawolff (talk) 19:19, 13 June 2012 (UTC)

prop=extracts is only returning the first extract?

I would like to use the API to return the extract from multiple wikipedia articles at once. I am trying, for example, the following:

http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248%7C11524059&prop=extracts

But it only contains the extract for the first pageid, and not the second. Other properties seem not to have this limitation. For example

http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248%7C11524059&prop=categories

Will return the categories for both pageids. Is this a bug, or am I missing something?

Thanks! Ian 129.97.136.204 (talk) 21:33, 23 March 2012 (UTC)

Mac OS X 10.7 Lion Server: Postgres Settings?

With Lion Server the basic system database switched to PostgreSQL. phpPgAdmin shows some basic database settings: - Name: - Template - Character encoding - Collation - Character Type

Which settings are correct? (german language...)

Thanks for Answers. Frank DrFrankieWb (talk) 11:39, 24 March 2012 (UTC)

Search via Special:SearchByProperty

I use in my extension the special page Special:SearchByProperty which shows a list of all pages that have property "property" with value "value".

Property and value are passed via URL in the form: http://.../index.php/Special:SearchByProperty/property/value

So far, there is no problem!

But now I have values ​​with a expression like "http://abc.de". Here, only the first part before the first slash is interpreted as value (http:).

If the value contains "-", it is interpreted as "%".

My question is: How can I mask these (special) characters? FrequentPatternTagCloud (talk) 21:25, 24 March 2012 (UTC)

I have now found a solution, because the special page can also be accessed as follows:
http://.../index.php/Special:SearchByProperty?property=a&value=b
However, this results in another problem.
On a wiki page, I have a link to Special:SearchByProperty via
Special:SearchByProperty?property=a&value=b|Link (with surrounding [ [ ] ])
When I call this link, the following page is called:
http://.../index.php/Special:SearchByProperty%3Fproperty%3Da%26value%3Db
and NOT
http://.../index.php/Special:SearchByProperty?property=a&value=b
How can I prevent, that '?', '&' and '=' are replaced?
Can anyone help? FrequentPatternTagCloud (talk) 22:26, 26 March 2012 (UTC)
Try this:
[http://{{SERVERNAME}}/{{SITENAME}}/content/index.php/Spezial:SearchByProperty?property=a&value=b]
195.88.117.150 13:00, 5 April 2012 (UTC)
{{SITENAME}} is probably not what you want there.
Try {{fullurl:Special:SearchByProperty|property=a&value=b%7CLink}}
(You have to replace the pipes with %7C in that syntax) Bawolff (talk) 14:26, 5 April 2012 (UTC)
No idea why to change Pipe to %7C here. Pipe is working fine in my case - %7C not at all.
This would be fine for me (Spaces in a and b):
 {{fullurl:Special:SearchByProperty|property={{urlencode: a|QUERY}}&value={{urlencode: b|QUERY}}}}
Unfortunately I cannot figure out how so set an alternative text for the link with fullurl. This is no problem with external-link syntax.
[http://{{SERVERNAME}}/{{SITENAME}}/content/index.php/Spezial:SearchByProperty?property={{urlencode: a|QUERY}}&value={{urlencode: b|QUERY}} blub and Variables]
195.88.117.150 15:49, 5 April 2012 (UTC)
Oh sorry, I thought you wanted the |link to be part of url.
try
[{{fullurl:Special:SearchByProperty|property=a&value=b}} link text]
Bawolff (talk) 20:12, 5 April 2012 (UTC)
Thank You! Is working fine. 195.88.117.150 07:33, 10 April 2012 (UTC)

Is there a Template:USERLANG function similar to en?

I have an external link that I want to post on my wiki that I know will be used internationally and I want to be able to have the link not default to en. This link (http://www.google.com/#hl=en&q=free+mmo+guild+hosting&pf=p&output=search) I wanted to make it read http://www.google.com/#hl={{USERLANG}}&q=free+mmo+guild+hosting&pf=p&output=search instead of assuming everyone comprehends "en". Can this be done? -- Technical 13 (talk) 00:20, 25 March 2012 (UTC)

Not easily.
There is a way though, doing {{int:lang}} will translcude mediawiki:lang/<User_lang_code_here>. So if you create mediawiki:lang/en, mediawiki:lang/fr, etc with the relavent codes, {{int:lang}} would work like userlanguage (Yes this is a horrible ugly hack. Its what is done on Wikimedia commons). Bawolff (talk) 18:04, 25 March 2012 (UTC)

Search doesn't display the most relevant results at the top

My Versions: MediaWiki: 1.16.5, PHP: 5.2.17, MySQL: 5.1.61. My website: http://game-soundtracks.com

When searching for a word the search results don't return the most relevant results instead the relevance is in order of the page creation date. Is this normal behaviour? Is there any way I can fix it?

Some examples:

Searching for "Puzzle Bobble" doesn't show "Puzzle Bobble" at the top. Searching for "Mission" doesn't show "Mission Impossible" at the top. Searching for "Last Battle" doesn't show "Last Battle" at the top. It only appears on the 2nd page of the search results. Holygamer (talk) 17:05, 25 March 2012 (UTC)

The default mediawiki search engine kind of sucks. Extension:MWSearch is much better, but kind of complicated to set up. (It is what Wikipedia uses) Bawolff (talk) 17:55, 25 March 2012 (UTC)
That's kind of what I thought. I saw that before but it needs Extension:Lucene-search which is far too complicated to install and it seems to assume people know advanced stuff such as how to run scripts, etc.
Is there a guide anywhere which explains the installation process better? Or is there antoher extension I could use which is easier to install? Holygamer (talk) 18:13, 25 March 2012 (UTC)
Extension:SphinxSearch is a bit easier, but still kind of complicated. Bawolff (talk) 00:59, 28 March 2012 (UTC)
<wikieditor-toolbar-tool-file-pre><wikieditor-toolbar-tool-file-pre>Example.jpg]]]] 109.127.93.33 12:20, 29 March 2012 (UTC)

Database error? Help Needed badly

So for the wiki I administrate at, I get a Database Error when I click the 4,974 articles written since January 2009. I have no idea what is causing this, nor do I have any idea how to fix it. Here is a screenshot of what happens when I click that link:

<wikieditor-toolbar-tool-file-pre>http://screensnapr.com/e/Whvmt1.png]]

Any help would be appreciated. The link to the wiki is http://www.vfkforums.com/wiki Gradyb (talk) 19:33, 25 March 2012 (UTC)

Something's missing from your database table. It seems you have a broken table; if you have command prompt access try running php maintenance.php inside your wiki directory. Jasper Deng (talk) 19:38, 25 March 2012 (UTC)
Worked! Thanks so much. Gradyb (talk) 19:46, 25 March 2012 (UTC)

The Basics: $wgEmailConfirmToEdit

Where can I find a BRIEF manual or primer on the basics of MediaWiki?

Have just set up a wiki at http://amibrokerwiki.info/, and want to figure out how/where to exert some control over the thing.

Example: How do you change $wgEmailConfirmToEdit to TRUE?


Thank you,


--Johnathan JohnathanStein (talk) 08:04, 26 March 2012 (UTC)

Sysadmin hub is a good start. For example, it leads to Manual:Configuration settings where you find a link to Manual:$wgEmailConfirmToEdit. Manual:Contents provides more help for different tasks. ThT (talk) 15:39, 26 March 2012 (UTC)

Another "Edit Toolbar is missing" issue

Hey, I hope you all are fine. I have a question about Edit Toolbar.

I'm using customized version of Vector as a skin. Only HTML part of the skin (vector.php) and its css have changed in customization. I can see Edit Toolbar when creating a new article but no toolbar when editing an old one. I see there is a problem with my customization, because toolbar can be viewed in Standard skin for both cases (in preview), but I couldn't find the magic.

Have you an idea about the issue?

Best.

URL: http://ybusm.info (a private wiki)

Product Version
MediaWiki 1.18.0
PHP 5.2.17 (cgi)
MySQL 5.0.91-log
Hkilter (talk) 08:11, 26 March 2012 (UTC)

Deadlock found when trying to get lock??

A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script

Query: DELETE FROM `l10n_cache` WHERE lc_lang = 'zh-hant'
Function: LCStore_DB::startWrite
Error: 1213 Deadlock found when trying to get lock; try restarting transaction (localhost)

I got database deadlock frequently these days. I tried run update.php through SSH many times, but this problem occurs frequently.

This problems only happened after I upgrade my site to 1.18

I am using hawkhost standard shared host. Less than 2000 people visit this site everyday. I believe it is not caused by excessive traffic. Deletedaccount4567435 (talk) 22:33, 26 March 2012 (UTC)

From the non-developer meaning of deadlock, it sounds like your webhost is doing something here that affects something MediaWiki 1.18 needs. Jasper Deng (talk) 22:34, 26 March 2012 (UTC)
I also cannot help you directly, but technically a DB deadlock has the following background: MySQL does not logically check, if a part of a transaction really is caught in a deadlock (as this often could be rather expensive to determine). Instead MySQL checks, if a running query makes some progress. If it does not for a certain amount of time, simply speaking, MySQL just assumes that it would be caught in a deadlock and rolls it back in order to allow other queries to complete. 88.130.80.237 23:23, 26 March 2012 (UTC)
...which could mean a performance issue? Perhaps, but I need a DB expert's comment here. Jasper Deng (talk) 23:28, 26 March 2012 (UTC)
I solved this problem by disable the Chinese simplified and traditional convert.
But it is inconvenient for traditional Chinese users. Zoglun (talk) 01:51, 27 March 2012 (UTC)
OK, that means that your database was not configured with collation supporting Chinese characters. Jasper Deng (talk) 02:04, 27 March 2012 (UTC)
How to set it to support Chinese character?
set to Binary? Zoglun (talk) 02:23, 27 March 2012 (UTC)
That's a tough sell if you're using a shared webhost and also because you already have an existing wiki; binary is what I use but I've never used Chinese. Jasper Deng (talk) 02:27, 27 March 2012 (UTC)
Any way, thank you all!! Zoglun (talk) 05:35, 27 March 2012 (UTC)
Using binary is an idea as there will be no charset conversion then when things are written into/read out of the database. Since MediaWiki internally always uses UTF-8, I think you should be able to switch from a UTF-8 collation to binary without changing any content in the DB. If you use a non-UTF-8 collation, you will have to convert your content to UTF-8 first. 88.130.89.230 11:42, 27 March 2012 (UTC)
Now the database is UTF-8
I am trying to switch it to binary.
Hoping it will solve this problem. Zoglun (talk) 18:35, 27 March 2012 (UTC)

<!DOCTYPE html> missed ?

I found that when mediawiki upgrade to 1.18

the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'

become

<!DOCTYPE html>

I tried to set $wgDocType = '-//W3C//DTD XHTML 1.0 Transitional//EN';

But it do not work at all.

My site still show <!DOCTYPE html> in-font of webpage source code. Deletedaccount4567435 (talk) 01:59, 27 March 2012 (UTC)

Turn off Manual:$wgHtml5 but is there a specific reason you want to use a older doctype compared to a HTML5 doctype? Peachey88 (talk) 05:21, 27 March 2012 (UTC)
http://i.imgur.com/nPZa6.png
We got a blank like the picture shows in http://wiki.moegirl.org/ , but not always. some people will see it some people not(in firefox and chrome)
We tried to solved it. It is not caused by <!DOCTYPE html> Zoglun (talk) 05:32, 27 March 2012 (UTC)
I see it fine using Firefox 10. Jasper Deng (talk) 05:43, 27 March 2012 (UTC)
The <!DOCTYPE html> is not a problem. Krinkle (talk) 14:49, 27 March 2012 (UTC)

[RESOLVED] Closing

tag is broken

You can make dialogs in MediaWiki sites by using the <div> tag with the style parameter, allowing you to use CSS to configure the styles. The problem is: the closing tag sometimes won't work. My code for MediaWiki:Noarticletext is:

<div style="border:solid 1px;">
<big>'''This page currently does not exist on App Appeal Wiki.'''</big><br>
'''Suggestions:'''
* If you typed the URL web address, must sure it's correct.
* Go to the [[Main_Page|Main Page]] or click the '''Back''' button to try another link
* If the page used to exist, it may have been deleted. Please check the <span class="plainlinks">[{{fullurl:{{#Special:Log/delete}}|page={{FULLPAGENAMEE}}}} deletion log].<br>
We are sorry of any inconvenience.
</div>

When previewing the page, MediaWiki refuses to close the tag, and instead displays the closing tag in the resulting document (the tag still will work without a closing tag). Help? HappyTreeFriends (my home page or talk 2 me) 07:38, 27 March 2012 (UTC)

You are not closing the span tag, which you have opened. This will make the following closing div tag illegal at that point. That could be part of the problem. 88.130.89.230 11:47, 27 March 2012 (UTC)
Indeed, that is the problem:
<div>
...
* ... <span class="plainlinks">[.. deletion log]</span>
...
</div> Krinkle (talk) 14:48, 27 March 2012 (UTC)
Thank you. My new code for MediaWiki:Noarticletext is:
<div style="border:solid 1px;">
<big>'''This page currently does not exist on App Appeal Wiki.'''</big><br>
'''Suggestions:'''
* If you typed the URL web address, must sure it's correct.
* Go to the [[Main_Page|Main Page]] or click the '''Back''' button to try another link
* If the page used to exist, it may have been deleted. Please check the <span class="plainlinks">[{{fullurl:{{#Special:Log/delete}}|page={{FULLPAGENAMEE}}}} deletion log].</span>
<br>
We are sorry of any inconvenience.
</div>
Thank you for fixing my problem. :) HTFFanBrandon04 (talk) 17:47, 27 March 2012 (UTC)
Thank you!!! This helped me with a problem I was having with class="mw-collapsable". Clifford.kasper (talk) 13:15, 12 March 2014 (UTC)

Edit pages display html code?

Why do all my pages appear in html instead of WIKI formatting when I click on "edit"? It didn't used to be that way and no changes have been made in the wiki backend. 24.120.26.66 (talk) 21:18, 27 March 2012 (UTC)

Can you post us the URL so that we can take a look? 88.130.89.230 10:03, 28 March 2012 (UTC)
It's behind a secure site, so I can't give you direct access. Sorry. Here's a snapshot of what I see when I click "edit" (strange thing, it could be important. Not all pages act this way. Some are fine)
http://www.davevmagic.com/forumpix/WIKIimage.jpg 24.120.26.66 20:09, 29 March 2012 (UTC)

I got a wrong sitemap index

<?xml version="1.0" encoding="UTF-8"?>

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>sitemap-moegirlo_wiki-NS_0-0.xml.gz</loc>
<lastmod>2012-03-28T00:11:01Z</lastmod>
</sitemap>

The right URL path should be http://wiki.moegirl.org/sitemap/sitemap-moegirlo_wiki-NS_0-0.xml.gz

How to solve this problem?

I ran corn job in cpanel like this:

/usr/local/bin/php /home/moegirlwiki/public_html/wiki/maintenance/generateSitemap.php \ --fspath public_html/wiki/sitemap \ --server http://wiki.moegirl.org \ --urlpath http://wiki.moegirl.org/sitemap Deletedaccount4567435 (talk) 00:38, 28 March 2012 (UTC)

E-mail notification

Hi I've just been asked to look after a mediawiki and of course now people want more from it. Is there an extension or some other method such that users can be notified by either RSS or e-mail of "quote" when someone adds a file or contributes to the discussions "end_quote"? We are using:

Product Version MediaWiki 1.18.2 PHP 5.3.10 (apache2handler) MySQL 5.5.21

TIA Paul Mcasspj (talk) 10:24, 28 March 2012 (UTC)

Blank page and WebStart.php error

Hello. I recently upgraded my mediawiki from version 1.15.4 to 1.18.2. The problem is that when I try to enter the wiki, which is mounted on the localhost, it just displays a blank page, no text, no error message. While checking the error log from apache, I can see the next text:

[error] [client 127.0.0.1] PHP Warning: require(/var/www/includes/WebStart.php): failed to open stream: No such file or directory in /var/www/index.php on line 53 [error] [client 127.0.0.1] PHP Fatal error: require(): Failed opening required '/var/www/includes/WebStart.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 53

I have already tried changing permisions to the folders and archives, and also updated all the extensions that were being used and it stills mark that error. If anyone could help me, thank you. 189.232.176.68 (talk) 19:04, 28 March 2012 (UTC)

It looks like you forgot WebStart.php in your directory. Check that it exists in the specified directory. Jasper Deng (talk) 19:53, 28 March 2012 (UTC)
I read in another post that it had to be deleted because it caused problems with version 1.18, so i erased it. I just restore it from the backup files I had and it gives me this message in the apache error log:
[error] [client 127.0.0.1] PHP Warning: require(/var/www/includes/WebStart.php): failed to open stream: Permission denied in /var/www/index.php on line 53
[error] [client 127.0.0.1] PHP Fatal error: require(): Failed opening required '/var/www/includes/WebStart.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 53
Also, the page continues blank when trying to access it. 189.232.176.68 21:05, 28 March 2012 (UTC)
Yeah, you need to set your file permissions. Jasper Deng (talk) 00:58, 29 March 2012 (UTC)
Ok, I just gave the file permissions with the "chmod 755". I thought that since I already applied that command to the folder and archives adding the recursive command, it would already have the permissions. I tried accessing the localhost again and the page is still blank, and now the error log displays:
[client 127.0.0.1] PHP Fatal error: Cannot redeclare wfProfileIn() (previously declared in /var/www/includes/ProfilerStub.php:18) in /var/www/includes/profiler/Profiler.php on line 19
Sorry for being so bad at this. 189.232.176.68 14:44, 29 March 2012 (UTC)
Now that probably means either an extension bug or you need to get the right version of thie extension. Jasper Deng (talk) 16:52, 29 March 2012 (UTC)

Fatal Error?

I finally saved my article, and when I did it gave me a fatal error. I removed nearly half of the pages on the article, and it still gave me the fatal error. I have no idea how to fix it, and here is the link: http://www.vfkforums.com/wiki/index.php?title=Autumn_Imports_-_Specials_-_Clothing

Any help would be appreciated. Gradyb (talk) 19:27, 28 March 2012 (UTC)

Your webserver is out of RAM, apparently. Jasper Deng (talk) 19:51, 28 March 2012 (UTC)

Page Screwed Up?

Sorry for all the questions, I am new to using this Wiki and I have only been using it for about a month. When I add articles to this page these certain articles screw up the page. I have no idea what is causing this, but here is the page. Just scroll down to see what I mean.

http://www.vfkforums.com/wiki/index.php?title=Autumn_Imports_-_Specials_-_Clothing

Any help would be appreciated, once again so sorry about the questions I am new to this and learning. Gradyb (talk) 21:25, 28 March 2012 (UTC)

It seems like table soup caused by your template not MediaWiki. The page is way too big anyway, maybe it's just the browser screwing it. Not user friendly in any way! Subfader (talk) 21:44, 28 March 2012 (UTC)

Search function?

Is there an extension or mod, which allows you to search for, say, the letter "T", which will return every page that begins with the letter "T"? Or something which allows you to view every page that exists in the wiki - a sort of wiki map?

We need something like this to find orphaned pages, and to detect spam.

http://ffhacktics.com/smf/index.php?topic=8648 ^Topic in question. 68.185.14.14 (talk) 22:26, 28 March 2012 (UTC)

Special:AllPages has "Display pages starting at". More such features on Special:SpecialPages. Subfader (talk) 09:05, 29 March 2012 (UTC)

unable to edit pages anymore

very strange: all of a sudden, sysadmins who always had rights to edit pages suddenly cannot. not all users but some. some can't even log in anymore. i don't understand why. when some of these users try to edit pages (and they definitely click save) the message pops up which says "Remember that this is only a preview. Your changes have not yet been saved!". I've double checked the permissions in LocalSettings.php and they seem all like they should be. I googled this issue and there seems to be some hits saying something about php saved sessions. If someone can enlighten me that would be sweet.

php version 5.3.3 mysql version 5.1.52 mediawiki version 1.17.0 173.79.173.201 (talk) 06:02, 29 March 2012 (UTC)

Changing user permissions with chmod went to 404 on all pages

Hello. After applying 'chmod 777 /var/www/html' (where /var/www/html is my Mediawiki folder) the uncached pages stopped opening. What have I done? Is it possible to fix it somehow? Beznogim (talk) 15:11, 29 March 2012 (UTC)

Problem with password recovery

Hi, I'm trying to recover my password, but when I put my username and click on button the page shows this message:

Erro a enviar o email: SMTP server response: 550 5.7.1 Unable to relay for luis.rigo@midialogic.com.br

Thanks. 187.107.115.203 (talk) 16:57, 29 March 2012 (UTC)

Fetching an RSS feed from a secure tomcat web server into Wiki

Trying to resolve a problem where I'm trying to request an RSS feed from my WIki server to a secure tomcat web server (under my control) but I'm getting this error:

Failed to load RSS feed from https://my.web.server.com/feed: Error fetching URL: Peer certificate cannot be authenticated with known CA certificates

I'm using the RSS extension by the way.

This may be a simple fix either by importing the ssl certificate from the server i wish to get the feed from or by maybe telling PHP to ignore the certificate ? Not sure since I don't really know if the Wiki PHP code is using cURL to do the request or something else. And I wouldn't be too sure on where to import it to if i need to do this.

I tried going into the /includes/HttpFunctions.php file and setting "protected $sslVerifyHost = false;" and "protected $sslVerifyCert = false;" but no go.

any help would be nice.

Chris 173.79.173.201 (talk) 17:26, 29 March 2012 (UTC)

I haven't tested it yet but after some thought, i think i need mod_ssl and the server cert to get the ssl feed ; all other traffic will be handled over the standard port 80 173.79.173.201 14:33, 30 March 2012 (UTC)

Baffled by formatting titles

At http://perfectenvirons.org/wiki/index.php?title=PERFECT_ENVIRONS_wiki:Community_portal , the software has titled the page

with: (the contents of $wgSitename) : Community portal. This causes the site name to appear redundantly on the left and right in the browser window title and again in the page title.

I would like one of 2 solutions:

Preferred solution A: like in Wikipedia:

Wikipedia's page titled: Wikipedia:Community portal shows the browser window <title> to be: Wikipedia:Community portal - Wikipedia, the free encyclopedia. How can I change the Sitename "PERFECT ENVIRONS wiki" that appears in the browser <title> after the "-" to be (only in browser frame) some other text instead like Wikipedia does?

Alternate solution B:

The page title could be: Community portal (or Portal:Community portal), so the browser <title> would be: Community portal (or Portal:Community portal) - PERFECT ENVIRONS wiki but I can't find how to get to (or back to) either with a still viable Sidebar link AND WITHOUT the unwanted redirect line displayed under the title that to an initial formatting is just meaningless clutter. PEwiki (talk) 17:44, 29 March 2012 (UTC)

First Time Using MediaWiki

I have a MAC OS X 10.6.8. I am trying to create a wiki using mediawiki. I download it but then nothing happens. It never installs. What am I doing wrong. 198.169.188.226 (talk) 17:54, 29 March 2012 (UTC)

When you say that you downloaded it, you mean the tar.gz file, right? The installation is that you extract the content of this file to the place where you want your wiki to be later. That is what you have to do next. You can get an overview of the steps you need to take on the page Installation. 88.130.109.28 22:27, 29 March 2012 (UTC)
You have to also make sure you have a web server and MySQL installed. Jasper Deng (talk) 22:30, 29 March 2012 (UTC)
@Jasper: Don't scare him away, one step after the other. :-) 88.130.109.28 22:43, 29 March 2012 (UTC)
@anon then he wouldn't solve his problem, try to help him in as few comments as possible to save him time. Jasper Deng (talk) 22:54, 29 March 2012 (UTC)
which is already on the page I linked to. 88.130.114.187 11:34, 30 March 2012 (UTC)
Some people don't like reading.  Hazard-SJ  ±  20:23, 31 March 2012 (UTC)

mediawiki over SSL

Hi,

I'm using mediawiki 1.18.2 and made it mandatory to login before reading or changing the wiki.

I also configured apache to use SSL for full site. The problem is that I had to create a virtualhost on apache to redirect everything from port 80 to 8099 (my SSL port, 443 was already in use), because after the login mediawiki is redirecting to 80 instead of 8099.

Did I miss something? That virtualhost redirect shouldn't be needed.

Regards, Sergio 177.40.57.3 (talk) 19:01, 29 March 2012 (UTC)

I think you need to configure $wgServer and/or $wgCanonoicalServer. Jasper Deng (talk) 23:01, 31 March 2012 (UTC)

Is http://de.wikipedia.org/?curid= supported as short url for article by page ID or unofficial?

Hi! Searching for the shortest urls for wikis using scripts other then Latin was a longtime nightmare. urls using the "wgArticleId" from "mw.config.set" as http://de.wikipedia.org/w/index.php?curid=2809853 have been an intermediate solution to avoid long properly url encoded links.
A few days ago I noticed that links as http://de.wikipedia.org/?curid=2809853 can also be used nowadays. The url does not use "w/index.php" any more.
Question: Can MadiaWiki assure that these shorter urls are legitimete, stable, well documented and used as testcases before any further release is submited to svn? Thank you very much for your future answers. gangleri לערי ריינהארט (talk) 19:10, 29 March 2012 (UTC)

The url links to an article about Ernst Lossa from the Wikipedia in German. Ernst was a child killed in the euthanasia program. Librarians are using VIAF:38128467 as authority control number to refer to his person. לערי ריינהארט (talk) 19:21, 29 March 2012 (UTC)
It took me some time to get what you mean, but I think I got it. :-) The value of "curid" does not have to do with a way to identify Ernst Lossa as a person.
The value only is an internal identifier in MediaWiki. All it does is to instruct MediaWiki to get the page data for the article, which was saved in the database with the unique id 2809853. The page which was saved directly after this version has the id 2809854. Some documentation is available in Manual:Parameters_to_index.php. 88.130.109.28 22:37, 29 March 2012 (UTC)
mw.config.set({,,,, wgPageName":"Ernst_Lossa","wgTitle":"Ernst Lossa", "wgCurRevisionId":99548829,"wgArticleId":2809853, ...} ...)
nr. 0 http://de.wikipedia.org/?curid=2809853
nr. 1 http://de.wikipedia.org/?oldid=99548829 today the "last"
nr. 2 http://de.wikipedia.org/?oldid=99548703 today the "previous"
The reason about short urls was addressed between others at bugzilla:0023427 - "Introduce magic word {{PAGEID}} to provide the page_id of the current page ". More features request on short url topic where raised by WikiMedia comunities in languages based on other scripts then Latin. I remember many raised by Wikipedia in Russian.
While url 0 renders (nearly) as de:Ernst Lossa (I say "nearly" because I have not compared the page source codes with advanced tools), url 1 seems to contain url 0 together with some links to diff functionality. url 1 is not stable I mean it is not linking to the most actual page as url 0 does. It will have the same "kismet'" as url 2.
To fully understand the question: Is url 0 "always" linking to the most actual version of this article? The question is not if the actual page title will always be redirected to a renamed page as "Ernst Lossa (foobar)" That is a maintenance issue of the wiki community. The question is not related to the question what happens if the article / page is deleted and if some revisions are restored again. (In some discussions I was listening to some opinions that a new "wgArticleId" would / might be assigned by the database. לערי ריינהארט (talk) 00:53, 30 March 2012 (UTC)
This is really not the right place to ask this sort of question. You should probably ask an ops person (I'd imagine), and I don't believe they generally look through this form.
>Question: Can MadiaWiki assure that these shorter urls are legitimete, stable, well documented and used as testcases before any further >release is submited to svn? Thank you very much for your future answers. gangleri לערי ריינהארט (talk) 19:10, 29 March 2012 (UTC)
This (the lack of needing /w/index.php) is related to how Wikimedia (not mediawiki) is configured (As in how the apaches are configured). This sort of behaviour would not necessarily happen on non-wikimedia mediawiki installs.
addendum: The above I was talking about if doing curid without /w/index.php is stable. For your second question (difference between curid and oldid) curid is the page's number. oldid is the revision number. oldid changes on every revision. curid only changes on edge cases (like being deleted and restored). Note that the proposed short url extension will use a different number that is neither curid or the oldid. Bawolff (talk) 22:48, 30 March 2012 (UTC)
Thanks for the answers Bawolff! I am aware of "oldid". It was mentioned only because "oldid" adds some "headers" also.
Questions:
a) Are there special keywords at http://www.mediawiki.org/wiki/Bugzilla for topics related to the stability of the setup of WikiMedia Foundation servers?
Could all required testcases be added to MediaWiki in order to assure that such urls would not be broken / invalid in the future?
b) Could all relevant parts of the apache configuration required to achieve similar results at other MediaWiki installation be documented?
Could you please address these two topics in the relevant forum?
Thanks for any support in advance! לערי ריינהארט (talk) 02:38, 2 April 2012 (UTC)
a) Are there special keywords at http://www.mediawiki.org/wiki/Bugzilla for topics related to the stability of the setup of WikiMedia Foundation servers?
Any bug about Wikimedia server set up would be in the Wikimedia product of bugzilla. (vs normal bugs in MediaWiki product). Some Wikimedia server config related bugs end up in RT, which is secret (Don't ask me why its secret, I've never really understood. Something about billing info goes in there too)
b) Could all relevant parts of the apache configuration required to achieve similar results at other MediaWiki installation be documented?
The actual config files are at http://noc.wikimedia.org . Any set up where url parameters on the root url gets forwarded to index.php should work in the fashion you are looking for.
Could all required testcases be added to MediaWiki in order to assure that such urls would not be broken / invalid in the future?
No, you cannot add test cases to MediaWiki for testing software that is not MediaWiki. One could add a test case to verify that urls of the form http://en.wikipedia.org/w/index.php?curid=1234 don't break, but that's as close as you can get.
It was mentioned only because "oldid" adds some "headers" also
curid will add noindex tags that stop google from indexing non-canonical versions of the url. (Not quite a header, but probably what you're thinking of). Bawolff (talk) 20:37, 2 April 2012 (UTC)

Force creating thumbnail

Hi, I would like like to ask if there is a way to force thumbnail creating also if image width is smaller than the created thumbnail? I have found the createThumb function but thumbnails are only created if the image width is larger than the thumbnail width. This shall be used for an extension. Thanks and best wishes Singlespeedfahrer (talk) 19:20, 29 March 2012 (UTC)

I don't think so. Simply because it makes no sense to create such blurry images. There might be special cases where you want to relate on their existance yep, but since WIkipedia doesn#t use it there is no setting for it in MediaWiki by default ;) Subfader (talk) 12:19, 31 March 2012 (UTC)
I agree with you. It sounds somewhat questionable. Background is that I wanted this feature for testing purposes creating an image popup extension (like SlimboxThumbs but no fullsize image view). By the way my question is now out of date. Extension works with getting the full images sizes. Currently I have issues getting gallery image dimensions. Thanks for your reply! If you are noisy you may have a look e.g. here (a bit buggy yet) ;). Singlespeedfahrer (talk) 16:10, 31 March 2012 (UTC)
sorry double posting Singlespeedfahrer (talk) 16:10, 31 March 2012 (UTC)

Page not updating?

So on my wiki I put a page on a page. By doing this

{{item head}}(no space) {{:item here}} {{itemfoot}}

Then when I add a picture to it later it doesn't update on the page I put it on. I tried deleting/re adding. It doesn't work. Any ideas? Friendofyourss (talk) 20:06, 29 March 2012 (UTC)

It shoule work, when you purge the cache of the page with action=purge, on which the included template does not display. 88.130.66.129 17:02, 8 June 2013 (UTC)

SRF_iCalendar problem

Hello, I'm new around mediawiki, and I have had a few problems upgrading the mediawiki of the company. Right now, I just installed MediaWiki 1.18.2, and loaded the databases. I also tranfered the data, images, and doc from the old wiki to the new one, and checked extensions the old wiki had, downloaded the new versions of those and copied them to the extensions folder. Now the wiki page apears blank, and when checking the error log i get this message:

PHP Fatal error: Class 'SMWResultPrinter' not found in /var/www/mediawiki/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php on line 17

I have already tried removing certain extensions but to no results yet. The extensions I downloaded were: FCKeditor, SemanticForms, SemanticInternalObjects, SemanticResultsFormats, SemanticMediaWiki, GoogleCalendar, PasswordReset, and Winter. Could you guys please give me a hand with this? Wingtower (talk) 21:23, 29 March 2012 (UTC)

Changing the position of the name in the function create('point') (jsxgraph)

Iam using create('point') to give some logic path a name.

In the following example I am drow a vertical path and one point at the top of the path and gave it the name 'A'.

SGH.LogicPath([3,-1],[3,-14],0.0);

SGH.b.create('point',[3,-1],{size:.2, withLabel:true, name:'A', color: 'none'});


The Problem is, that Name 'A' is shifted to right, I would like it excatly on top of the drawn point. Is there any way to change the position of the name? 89.14.196.149 (talk) 22:05, 29 March 2012 (UTC)

[RESOLVED] Can't get Cite template to work

Hello!
I just started a local private wiki on my macbook (using SQlite 3.7.7.1, PHP 5.3.8, MediaWiki 1.18.1) and I'm having trouble getting the cite templates to work properly. Refered to http://en.wikipedia.org/wiki/Wikipedia:RefToolbar_2.0#Porting_to_another_wiki to get the cite-button working, which was no problem, but...
I've been having problems getting it to use the swedish templates (from http://sv.wikipedia.org/wiki/MediaWiki:RefToolbarLocal.js ) that I have saved on my computer (under MediaWiki:RefToolbarLocal.js). I'm pretty much at loss about why I can't get this to work, the only thing I could think of was the fact that I'm running refToolbar as a gadget (and can turn it off/on on my settings) Does that matter? On the instructions I followed the get the cite button to show up, it says "To install RefToolbar as a gadget; ..." it kind of sounds like it could be run in some other way? Xyyx (talk) 00:05, 30 March 2012 (UTC)

Got this to work, so I'll post how:
Instead of loading RefToolbar as a gadget, I loaded it globally through MediaWiki:Common.js by adding:
importScript('MediaWiki:RefToolbar.js');
The lines that loaded the correct (in my case the swedish) version of MediaWiki:RefToolbarLocal.js
// Load local data - messages, cite templates, etc.
$j(document).ready( function() {
var RefToolbarLocal = importScript('MediaWiki:RefToolbarLocal.js');
});
So thats that. Xyyx (talk) 22:33, 31 March 2012 (UTC)
Thanks for sharing your solution. I can say it works! Aviationwikinet (talk) 21:28, 7 January 2015 (UTC)

Is there any updated documntation about the actual implementation of **utf-8 / Unicode normalization** in MediaWiki?

Imagine a time without no secrets. Imagine that site developers share their knowledge about deep technical issues.
Question: Is there an updated documentation about how MediaWiki has implemented "Unicode normalization"?
Does it include all required libraries, their latest versions, their the required setup, the known open issues / problems?
If the documentation is missing or outdated I kindly ask you to open a bugzilla request with keyword / topic documentation and post the bug report here. Any help is highly appreciated. לערי ריינהארט (talk) 01:37, 30 March 2012 (UTC)

You can always read the source code :P
There are a variety of ways unicode normalization can be done depending on your configuration. In general we will use php extensions written in C if available, since they're fast (this includes the icu extension, the intl extension.intl is included by default in newer php, so is almost always available). Otherwise we will use a fallback php implementation.
Some additional normalizations are done based on content language for Malayalam and Arabic. This is done per-content for performance reasons, but is kind of evil (in my opinion). The ml normalization caused some problems with external urls that used the non-normalized versions of characters, otherwise I'm not aware of any open issues, but I am not an expert on the subject by any means.
See manual:$wgAllUnicodeFixes, manual:$wgFixMalayalamUnicode, and manual:$wgFixArabicUnicode (Note, those are for additional normalizations. converting to normal form C is done regardless) Bawolff (talk) 21:20, 2 April 2012 (UTC)

Is there any updated documntation about the actual implementation of **utf-8 / Unicode truncation** in MediaWiki?

Imagine a time without no secrets. Imagine that site developers share their knowledge about deep technical issues.
Question: Is there an updated documentation about how MediaWiki has implemented "Unicode truncation"?
Does it include all required libraries, their latest versions, their the required setup, the known open issues / problems?
If the documentation is missing or outdated I kindly ask you to open a bugzilla request with keyword / topic documentation and post the bug report here. Any help is highly appreciated. לערי ריינהארט (talk) 01:37, 30 March 2012 (UTC)

I don't know what unicode truncation is....
If you mean just truncating strings that have multi-byte characters, and making sure you don't truncate in the middle of a character, see Language::truncate (I was going to link directly to the docs, but they seem to have totally dissapeared [2]). There's also a couple of other related functions in the Language class.
Note however, I'm not sure why there would be documentation about this beside standard dev documentation, as its a fairly straightforward thing, which users shouldn't have to care about. Bawolff (talk) 21:24, 2 April 2012 (UTC)

301 redirects?

Hi there. I'm trying to setup redirects from all variants of lanpartyguide.net to lanpartywiki.com. This is the .htaccess file I'm using in the root directory (http://pastebin.com/BxNuPFum), but that only redirects the straight "lanpartyguide.net" and "lanpartyguide.net/wiki/" URLs. What am I doing wrong? 70.36.136.9 (talk) 04:10, 30 March 2012 (UTC)

Well, I'd rather use a PHP redirect, as my index.php:
header("http://lanpartyguidewiki.com");
and perhaps redirect all 404 errors to that (though I haven't tried the very latter part). Jasper Deng (talk) 04:13, 30 March 2012 (UTC)
That doesn't seem like a very elegant solution... those aren't 301 redirects, and they don't redirect individual pages over to their equivalents.
Also, I'm hosting both domains on the same domain/server, which I guess complicates things. 70.36.136.9 04:19, 30 March 2012 (UTC)
Well, I guess you could use a conditional statement on what URL it is, but I need to look up how.
You may want to use a URL rewrite rule using regex. Jasper Deng (talk) 04:21, 30 March 2012 (UTC)

Caching problem

I made some change in the Includes/Linker.php to remove non-existent links to anonymous users of my wiki site. The code just shows the text and no link. It used to work fine in older version, but in the recent 1.18.2 version for a new project, the code is not working anymore.

Actually, it is working, but the problem is the output of the page seems to be getting cached. In the sense, if I login and check the page, I see red links and when I try the same page in a different browser (without logging in), I still see the red links.

In the same way, when I purge the cache without logging in, the links are not displayed, just the text. When I try the same page in a different browser while logged in, I still don't see the redlinks. 123.201.72.234 (talk) 13:51, 30 March 2012 (UTC)

Problem creating Vector based skin

I'm working on a new skin for http://en.sturmkrieg.com called '"Sturmkrieg" that is based on Vector. I've been following the directions at Manual:Skinning/Vector. The problem I have is that when I preview the skin, I get an error message about "includes/resourcesmodule.php," unless I capitalize the S in Sturmkrieg in the skin name of the URL. Lieutenant Aleksandr Reznov 16:24, 30 March 2012 (UTC)

The error message says that the class "SturmkriegTemplate" was not found. Check that you have given it the right name. 88.130.114.187 17:00, 30 March 2012 (UTC)
I try changing some of the mentions of Sturmkrieg to lowercase and see if that helps.
Where would SturmkriegTemplate be? Inquisitor Sasha Ehrenstein aus dem Sturmkrieg Sector (Talk) (Contributions) 18:54, 30 March 2012 (UTC)
Well, directly in Sturmkrieg.php. In the vector skin you have Vector.php and inside there is the class VectorTemplate. If you copy the vector skin and rename it to something else (e.g. to Sturmkrieg), you also have to rename the class VectorTemplate to SturmkriegTemplate. 88.130.114.187 20:17, 30 March 2012 (UTC)
Thanks.
Now I have a problem with OutputPage.php after changing VectorTemplate to SturmkriegTemplate Inquisitor Sasha Ehrenstein aus dem Sturmkrieg Sector (Talk) (Contributions) 02:52, 31 March 2012 (UTC)
Manual talk:Skinning/Vector Apperently someone else had the same problem, Inquisitor Sasha Ehrenstein aus dem Sturmkrieg Sector (Talk) (Contributions) 03:38, 31 March 2012 (UTC)
Bump Inquisitor Sasha Ehrenstein aus dem Sturmkrieg Sector (Talk) (Contributions) 21:39, 1 April 2012 (UTC)
"A problem with OutputPage.php" can be everything. Might e.g. be an incorrect skin registration or something with the ressource loader. Impossible to say if you don't tell us the exact wording of the error message you get. 88.130.68.132 01:54, 4 April 2012 (UTC)
It was the same error as what was mentioned by someone else on the talk page for Vector skinning, which was Call to a member function getGroup() on a non-object in /var/www/runa/includes/OutputPage.php on line 2707 Inquisitor Sasha Ehrenstein aus dem Sturmkrieg Sector (Talk) (Contributions) 03:47, 4 April 2012 (UTC)

Memcached or APC?

Is it correct that memcached shouldn't be used on a single server? I didn't see a big difference to APC. Subfader (talk) 11:57, 31 March 2012 (UTC)

Can't Embed MP3 Files

I have tried using all the music player extensions. The players show up in a page I made but when I click on play the file doesn't play and the time stays on zero. Is there something special I'm supposed to do before Mediawiki will play a file? Holygamer (talk) 12:57, 31 March 2012 (UTC)

Which extensions? Are they HTML5? Depends on browser maybe. Subfader (talk) 13:15, 31 March 2012 (UTC)
Extension:FlashMP3 and all the others on this page: http://www.mediawiki.org/wiki/Category:Audio_player_extensions
Its weird because I got FlashMP3 working on another installation of MediaWiki 1.16.5 but I can't get it working on my other site which uses the exact same code and uses the same file & filename to play. Holygamer (talk) 13:28, 31 March 2012 (UTC)