Project:Support desk

From MediaWiki.org
(Redirected from Support desk)
Jump to: navigation, search
vde   This page is for questions relating to the MediaWiki software.

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

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

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

Before you post

Post a new question

1. To help us answer your questions, please always indicate which versions you are using:

  • MediaWiki (reported by your wiki's Special:Version page)
  • PHP (likewise)
  • Database (likewise, e.g. MySQL 4.1)

2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.

3. To start a new thread, click "Start a new discussion".

Archiving topics

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

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

How to customize auto-numbering of TOCs

Edited by author.
Last edit: 03:57, 27 May 2012

I read the manual, but neither it nor any extension told me or does what I want to do. I want to customize the Table of Contents so that it uses a different numbering scheme. For instance, instead of decimal/decimal/decimal/decimal/decimal, something like upper-roman/upper-latin/decimal/lower-latin/lower-roman (one of Microsoft Word's default lists), etc. or any other combination of my choosing based on list-style-type, even if I wanted Hebrew or Hiragana.

PatPeter09:10, 15 April 2012

See customization example and modify the contents of style= parameter.

wargo (talk)12:42, 15 April 2012

No change.

PatPeter00:24, 22 April 2012
 

Due to the way the TOC is currently programmed, its kind of cumbersome to customize the numbering scheme of the ToC. The numbers are rather hardcoded in Linker::tocLine which is unfortunate.

What you can do is add some css like follows to your mediawiki:Common.css (haven't tested much, you may need to play with it a little bit)

html #toc ul, .toc ul {
list-style-image:none;
list-style-position:inside;
list-style-type:armenian /*replace this with the type you want*/;
}

span.tocnumber {
display:none;
} 
Bawolff (talk)03:10, 16 April 2012

Thanks for pointing me to the function's location. I just rewrote the function for my wiki:

        // http://www.go4expert.com/forums/showthread.php?t=4948
        private static function numberToRoman($num) {
                $n = intval($num);
                $result = '';

                $romans = array(
                        'M' => 1000, 
                        'CM' => 900, 
                        'D' => 500, 
                        'CD' => 400,
                        'C' => 100, 
                        'XC' => 90, 
                        'L' => 50, 
                        'XL' => 40,
                        'X' => 10, 
                        'IX' => 9, 
                        'V' => 5, 
                        'IV' => 4, 
                        'I' => 1
                );
                
                foreach ($romans as $roman => $latin) {
                        $matches = intval($n / $latin);
                        $result .= str_repeat($roman, $matches);
                        $n = $n % $latin;
                }
                
                return $result;
        }
        
        static function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
                $classes = "toclevel-$level";
                if ( $sectionIndex !== false ) {
                        $classes .= " tocsection-$sectionIndex";
                }
                $numbers = explode('.', $tocnumber);
                $tocnumbers = "";
                
                for ($i = 0; $i < count($numbers); $i++) {
                        switch ($i) {
                                case 0: # upper-roman
                                        $tocnumbers .= self::numberToRoman($numbers[$i]);
                                        break;
                                
                                case 1: # upper-latin
                                        $tocnumbers .= chr(64 + $numbers[$i]);
                                        break;
                                
                                case 2: # decimal
                                        $tocnumbers .= $numbers[$i];
                                        break;
                                
                                case 3: # lower-latin
                                        $tocnumbers .= strtolower(chr(64 + $numbers[$i]));
                                        break;
                                
                                case 4: # lower-roman
                                        $tocnumbers .= strtolower(self::numberToRoman($numbers[$i]));
                                        break;
                                
                                case 5: # lower-greek
                                        $tocnumbers .= "&#" . ($numbers[$i] + 944) . ";";
                                        break;
                                
                                default:
                                        $tocnumbers .= $numbers[$i];
                        }
                        $tocnumbers .= ". ";
                }
                
                return "\n<li class=\"$classes\"><a href=\"#" .
                        $anchor . '"><span class="tocnumber"> ' .
                        $tocnumbers . '</span> <span class="toctext">' .
                        $tocline . '</span></a>';
        }
PatPeter03:51, 27 May 2012
 

Does anyone know if it is possible to grab css in PHP? If I could grab MediaWiki:Common.css and check for list-style-type in toclevel or tocsection I could make this code dynamic instead of static.

PatPeter03:51, 27 May 2012
 
 

Trouble uploading after installation

After installing to the latest version of mediawiki, I am unable to upload text files, and get the following messege: Could not open lock file for "mwstore://local-backend/local-public/d/dc"

How can I fix this?

173.85.173.4201:20, 14 May 2012

I fixed it. chmod 777 images directory.

173.85.173.4202:23, 14 May 2012

Hi,

I've got the same problem but it is not fixed by chmod 777 images.

Ive just upgraded to 1.19 and

(1) I cannot upload image files - getting the message

Could not create directory "mwstore://local-backend/local-public/archive/d/d8".

I have made the mediawiki/images directory and all sub-directories writeable I had added $wgFileExtensions = {'gif', 'png'); to LocalSettings.php I have tried incuding $wgUploadPath = '/mediawiki/images'; to LocalSetting.php

(2) Current images files stored in the wiki (a) are displayed correctly using File:Pic.gif, (b) but not if resized e.g. 640px

Amy suggestions appreciated

Kirby

86.184.214.10120:22, 26 May 2012
 
 

update.php

When I try to run update.php I get the following error message: "Status: 500 Internal Server Error"

Is this a problem with my Wiki files or with the site? I have shell access and can log into the site without any issues, I just can't run the script.

Penny08:43, 26 May 2012

Check the apache error log. It will tell you, what's going on.

88.130.74.21121:38, 26 May 2012
 

How to backup MySQL db using phpMyAdmin

Hi

Could anyone explain why using the method below I am not able to backup fully? Mysql.5.1.36 = 1.75GB on my computer. Backup of mediawiki.sql = 482.830kb.

Siteground: MySQL Export: How to backup a MySQL database using phpMyAdmin

Cheers

Ron Barker (talk)09:19, 24 May 2012

If you say you are using phpMyAdmin I would think that the process just times out before the whole DB has been written. You can identify this case, when the SQL dunmp does not end with a line saying "-- dump finished on May 24th 2012, 17:45" or something like that.

88.130.70.20716:06, 24 May 2012

Thank you for that

I am sure that you are correct. I am not so sure where to find the line "dump finished...." etc. unless you mean the message you get after downloading. I get the message download complete.

However,I understand from researching the internet that using phpMyAdmin cannot handle large databases. That appears to the case.

Kind regards

Ron Barker (talk)07:50, 25 May 2012

This line should be in the dump file, which phpMyAdmin creates. Open it with a text editor and you will see that it is human-readable. It "only" contains the SQL commands, which are needed to create your tables and to put your content in them. Scroll to the very bottom of the file and check the last lines.

> However,I understand that using phpMyAdmin cannot handle large databases.

That is right. Reason are restrictions in the PHP settings on the server like the maximum execution time. You wrote that you have the database with 1,75GB "on your computer". Then you will be able to create the dump without phpMyAdmin: This works with the tool "mysqldump", which comes with MySQL. Use it like this: "mysqldump -u my-mysql-username -pmy-mysql-password -h my-mysql-host my-database > dump.sql".

88.130.113.18421:19, 25 May 2012

Thank you for taking the time to respond. I am afraid that your efforts go above my head. I have no idea where to find the 'dump file' you refer to, not that it matters really as I am sure you are correct. As to the tool, I have no idea what you mean. Thank you anyway.

Kind regards

Ron Barker (talk)06:58, 26 May 2012

The "dump file" = "SQL dump" is the file with the (database) dump in it. The one with the backup (= copy) of your database in it. In your first post you wrote that you called it "mediawiki.sql".

There is another possibility to backup your database (just coming to my mind): Use the tool mysqldumper. No, this has nothing to do with the tool "mysqldump", which I wrote about above; it is something completely different. It has a graphical user interface; once installed you use it with your webbrowser. And it automatically prevents timing out (e.g. because of the maximum execution time in PHP).

I think you should try this one. :-)

88.130.74.21121:36, 26 May 2012
 
 
 
 
 

"" is not a valid magic word for "wc_note_section_tag"

part of my error log when I try to import from Wikipedia. It worked ok for awhile. Now I can import nothing and this is my error message. I don't understand it or know where it is called from. Any help much appreciated.

69.92.9.7820:36, 26 May 2012

Getting mediwiki default skins from DVCS(Git)

Hello there,

Is there a git repository for MediaWiki default skins? I've been looking for it for hours now, and I can't find it. I have my own skin, and would like to have all default skins regularly updated from upstream. Given I wanna have a Git repository on github solely for skins, I can't make use of your mediwiki/core.git repo , except if I clone it somewhere else and manually copy/paste.

If the answer to that question is NO, how much more are you going to work on SVN as well, and is there a SVN repo that has the latest release code(so that I don't need to care about versions).

Thanks,

Milos.

109.92.97.22619:10, 26 May 2012

The connection was reset

I have WAMPSERVER with MYSQL 5.5.20, PHP 5.3.10. During installation process, after clicking "set up the wiki" link for MediaWiki 1.19.0 I receive the following error,

The connection was reset       
         The connection to the server was reset while the page was loading.
       ....

When I tracked the error source, I realized it started after executing the function,

$wgMemc = wfGetMainCache();

called in the "includes/WebStart.php"

Why is this error and how can I resolve it?

Almuhammedi (talk)12:07, 26 May 2012

How can I hide tabs for users not logged in?

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

I'm using the Vector skin. I would like to hide the following tabs to people who do not have the right to use them. Is there any way to do this?

Discussion, View History, Edit, Arrow

Holygamer (talk)15:38, 11 April 2012
Edited by another user.
Last edit: 16:04, 11 April 2012

The following is simple CSS but it should work:

$wgHooks['SkinTemplateSetupPageCss'][] = 'wfHideVariousTabsFromAnonymous';
 
function wfHideVariousTabsFromAnonymous( &$hidetabcss ) {
        global $wgUser;
 
        if ( !$wgUser->isLoggedIn() ) {
                $hidetabcss .= 'li#ca-history, li#ca-viewsource, li#ca-edit, li#ca-talk, .vectorMenu { display: none; }';
        }
 
        return true;
}
Tim (SVG)16:01, 11 April 2012

Thanks but that only hides the tabs. The tabs are still there in the code. Is there any way to make the tabs not show in the first place and where should I put the code in the Vector skin? Thanks

Holygamer (talk)16:20, 11 April 2012

I think there's an extension for this, but somehow I don't remember what it is.

Jasper Deng (talk)16:36, 11 April 2012
 

There is no extension but there might be hooks that could be used. I'll look for it tomorrow.

Tim (SVG)16:42, 11 April 2012

What gives me this idea is that Hurricane Electric's wiki (found somewhere on he.net) succeeds in hiding all the special pages and all the tabs.

Jasper Deng (talk)16:45, 11 April 2012

LQT hides various tabs so I'll take a look inside its files. It's maybe in /mediawiki/trunk/extensions/LiquidThreads/classes/Dispatch.php but I just took a short look.

Tim (SVG)16:52, 11 April 2012
 

The DynamicTabs extension only works on the Monobook skin.

Holygamer (talk)16:52, 11 April 2012
 
 
 
 

Here it is for Vector skin. And don't remove my name, it's a real extension. Just create HideVariousTabsFromUnauthorizedUsers.php, put this code into it, include it in LocalSettings.php and if anonymous users DON'T have edit permission, it'll work. Actions at the arrow shouldn't need to be removed because I can't see an action shown under the arrow that can be executed by anonymous users with default or restricted permissions.

<?php
/**
* HideVariousTabsFromUnauthorizedUsers
*
* @package MediaWiki
* @subpackage Extensions
*
* @author: Tim 'SVG' Weyer <t.weyer@ymail.com>
*
* @copyright Copyright (C) 2012 Tim Weyer
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*
*/
 
$wgExtensionCredits['other'][] = array(
        'path'           => __FILE__,
        'name'           => 'HideVariousTabsFromUnauthorizedUsers',
        'author'         => array( 'Tim Weyer' ),
        'url'            => 'https://www.mediawiki.org/wiki/User:SVG',
        'description'    => 'Disables various view and namespace tabs from users without <tt>edit</tt> permission for Vector skin',
        'version'        => '04-12-2012',
);
 
// Hooks
$wgHooks['SkinTemplateNavigation'][] = 'fnHVTFUUremoveTabsFromVector';
 
// Tabs of view to remove
$wgHVTFUUviewsToRemove = array( 'view' /* read */, 'edit', 'addsection' /* on talkpages */, 'history' );
 
/**
 * @param $sktemplate Title
 * @param $links
 * @return bool
 */
function fnHVTFUUremoveTabsFromVector( SkinTemplate &$sktemplate, array &$links ) {
        global $wgUser, $wgHVTFUUviewsToRemove;
 
        // Only remove tabs if user isn't allowed to edit pages
        if ( $wgUser->isAllowed( 'edit' ) ) {
                return false;
        }
 
        // Generate XML IDs from namespace names
        $subjectId = $sktemplate->mTitle->getNamespaceKey( '' );
 
        // Determine if this is a talk page
        $isTalk = $sktemplate->mTitle->isTalkPage();
 
        // Remove talkpage tab
        if ( $subjectId == 'main' ) {
                        $talkId = 'talk';
        } else {
                        $talkId = "{$subjectId}_talk";
        }
        if ( !$isTalk && $links['namespaces'][$talkId] )
                unset( $links['namespaces'][$talkId] );
 
        // Remove actions tabs
        foreach ( $wgHVTFUUviewsToRemove as $view ) {
                if ( $links['views'][$view] )
                        unset( $links['views'][$view] );
        }
 
        return true;
}
Tim (SVG)12:51, 12 April 2012

Works perfectly. Thanks. However the View Source tab still shows. Although you don't need permission to view that tab I would like to remove it as it's wasteful to Search Engine Optimization.

Holygamer (talk)13:10, 12 April 2012

Sorry, forgot this tab because I didn't remove the edit permission when I was coding it. Just add 'viewsource' to $wgHVTFUUviewsToRemove array and it should work.

Tim (SVG)13:33, 12 April 2012

A long extension name at that :)

Jasper Deng (talk)16:46, 12 April 2012

Yes, thought the same when I gave it its name. I just wanted to use a very meaningful name ^^

Tim (SVG)17:14, 12 April 2012
 
 
 
Edited by another user.
Last edit: 14:17, 27 April 2012

Which version of mediawiki is this for?

I think I've followed the instructions above, but get an internal server error on

        // Generate XML IDs from namespace names
        $subjectId = $sktemplate->mTitle->getNamespaceKey( '' );
        // Determine if this is a talk page
        $isTalk = $sktemplate->mTitle->isTalkPage();
Bjoern (talk)14:12, 27 April 2012

I've coded it in MediaWiki 1.17.0. Due to Holygamer's testimony, it does also work with MediaWiki 1.16.5 and I've checked both Vector.php. It might not work with MediaWiki 1.18, the code of Vector.php is quite different.

Tim (SVG)14:27, 27 April 2012
 
Edited by author.
Last edit: 01:22, 26 May 2012

For MediaWiki 1.19, try this:

function fnHVTFUUremoveTabsFromVector( SkinTemplate &$sktemplate, array &$links ) {
        global $wgUser, $wgHVTFUUviewsToRemove;
 
        // Only remove tabs if user isn't allowed to edit pages
        if ( $wgUser->isAllowed( 'edit' ) ) {
                return false;
        }
 
        // Remove talkpage tab
        if ( isset( $links['namespaces']['talk'] ))
                unset( $links['namespaces']['talk'] );
 
        // Remove actions tabs
        foreach ( $wgHVTFUUviewsToRemove as $view ) {
                if ( isset( $links['views'][$view] ))
                        unset( $links['views'][$view] );
        }
 
        return true;
}
Cheeyang (talk)06:30, 23 May 2012

HI I am using Midiawiki-1.18.3 version. i have followed the following suggestion to hide "view source" tab for anonymous user.

URL - http://www.mediawiki.org/wiki/Extension:ProtectSource#Configuration

But still i could see option. so please help me solve this.

Operation system: Windows-xp

Rgds, Mohan

125.21.230.13210:50, 25 May 2012

You just need to add 'viewsource' to $wgHVTFUUviewsToRemove array and it'll work. I don't get how is this related to ProtectSource extension. HideVariousTabsFromUnauthorizedUsers is NOT ProtectSource.

Tim (SVG)10:03, 26 May 2012
 
 
 
 

JS & CSS loaded with ResourceLoader only load in debug mode

Hi, I'm creating a custom skin from the following the documentation I can find on the subject. I've also created an extension to be installed with the skin to enable some custom functionality and to roll my javascript & css into the combined & minified files MediaWiki outputs through ResourceLoader. Files are loaded as expected and everything works fine until I turn off debug mode ($wgResourceLoaderDebug = false; in LocalSettings) and then ResourceLoader no longer loads the JS & CSS files specified. Am I missing something?

Here's my ResourceModule array from my extension:

$wgResourceModules['ext.practicalplants.css'] = array(
        'localBasePath' => dirname(dirname( __FILE__ )) . '/skins/',
        'remoteExtPath' => '../skins/PracticalPlants',
        'styles' => array('css/main.css'=>array('media'=>'screen'),'css/print.css'=>array('media'=>'print')),
        'position'=>'top'
 );
$wgResourceModules['ext.practicalplants'] = array(
        'localBasePath' => dirname( __FILE__ ) . '',
        'remoteExtPath' => 'PracticalPlants',
        'scripts' => array( 'js/modernizr-1.7.min.js','js/jquery.ui.autocomplete-html.js','js/practicalplants.js' ),
        'dependencies' => array( 'jquery.ui.autocomplete' )
);

in a BeforePageDisplay hook handler, I call OutputPage::addModules to add my resources to the page.

public static function beforePageDisplay( $out, $skin ) {
        if ( $skin instanceof SkinPracticalPlants ) {
                $out->addModules( 'ext.practicalplants.css' );
                $out->addModules( 'ext.practicalplants' );
        }
        return true;
}

As I said, this all works fine with $wgResourceLoaderDebug = true; my resources are all loaded independently. When it's set to false, my resources aren't rolled into the minified files or loaded separately.

Anyone know what I'm doing wrong?

MediaWiki 1.18.1 on PHP5, Apache2, Mysql5.

37.1.182.6914:50, 14 April 2012

Don't put your files in ./skins/PracticalPlants but put them in ./extensions/PracticalPlants/modules/ext.practicalplants. See also Manual:$wgResourceModules.

Does that fix the problem?

Krinkle (talk)14:57, 14 April 2012

Thanks for the reply and the documentation - I hadn't come across that one. Alas as far as I can see, everything is in line with what it instructs. I've also read over this documentation page: http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(developers) time and time again, and can't find what I'm doing which is not inline with the instructions.

Unfortunately after moving my CSS and JS files as you suggested to module/ext.practicalplants in my extension directory and updating the paths in my extension accordingly, the problem remains the same. Resources load as expected when debug mode is on, but once turned off none of the specified CSS & JS files are bundled up by the ResourceLoader. My code resourceLoader arrays now looks like this, and the problem persists:

$ppResourceTemplate = array(
        'localBasePath' => dirname( __FILE__ ),
        'remoteExtPath' => 'PracticalPlants',
        'group' => 'ext.practicalplants'
);
$wgResourceModules['ext.practicalplants.css'] = $ppResourceTemplate + array(
        'styles' => array('modules/ext.practicalplants/css/main.css'=>array('media'=>'screen'),'modules/ext.practicalplants/css/print.css'=>array('media'=>'print')),
        'position'=>'top'
 );
$wgResourceModules['ext.practicalplants'] = $ppResourceTemplate + array(
        'scripts' => array( 'modules/ext.practicalplants/js/modernizr-1.7.min.js','modules/ext.practicalplants/js/jquery.ui.autocomplete-html.js','modules/ext.practicalplants/js/practicalplants.js' ),
        'dependencies' => array( 'jquery.ui.autocomplete' )
 );

Since the above post I've upgraded to 1.9.

Any ideas?

5.8.185.10214:55, 25 May 2012
 

Strange. Here's a few things to check, maybe that will help:

  • What is the path to the file where you copied the above snippet from? It should be in /your-mw-dir/extensions/PracticalPlants/PracticalPlants.php
  • Included from LocalSettings.php with require_once( "{$IP}/extensions/PracticalPlants/PracticalPlants.php" );
  • Enable debug mode (Manual:How to debug)
  • Check PHP and/or Apache error log
  • Check browser javascript console for information
Krinkle (talk)04:30, 26 May 2012
 
 

Import page suddenly not working--php error log contents

Was doing fine, importing. Suddenly yesterday, I can no longer do it. It tries to connect, it says "waiting..." for my site to respond, then times out with "Problem loading page" . Using Firefox browser: MediaWiki 1.19.0 PHP 5.2.17 (cgi) MySQL 5.0.91mm-log

The site is otherwise accessible. I can move around in it ok. I am at a loss, just doing the same thing over and over again with the same result. Isn't that the definition of idiocy? Can anyone here point me to something?

The following is in my php error log: "[25-May-2012 23:04:26] "" is not a valid magic word for "wc_note_section_tag"

TopDog -- feeling rather down now though00:27, 26 May 2012

SiteminderAuthPlugin is not working in Mediawiki 1.18.2 upgrade

Edited by 0 users.
Last edit: 02:46, 18 May 2012

I have upgraded the MediaWiki 1.12.0 to MediaWiki 1.18.2 After the upgrade, Siteminder auto login is failing. After the initial investigation I found that the extension SiteminderAuthPlugin.php is unable to populate all mandatory fields to the user object. Hence the insert to database is failing.

Here are the Error details: A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: INSERT INTO `user` (user_id,user_name,user_password,user_newpassword,user_newpass_time,user_email,user_email_authenticated,user_real_name,user_options,user_token,user_registration,user_editcount) VALUES (NULL,'hdmauser',NULL,NULL,NULL,NULL,NULL,NULL,,,'20120518023849','0') from within function "User::addToDatabase". Database returned error "1048: Column 'user_password' cannot be null (localhost)

Please let me know if there is any solution to fix this error.

Havaldma (talk)02:46, 18 May 2012

I think I broke my thinker ...

Warning: I am smart, but not a geek.
  • MediaWiki 1.14.0
  • PHP 5.2.17 (cgi-fcgi)
  • MySQL 5.5.21-55

Okay. I've been fiddling with this for weeks now and I'm no closer to figuring it out than I was when I started, so here I am... Here's my situation (bear with me if this is a little long or disjointed - my brain's kinda like jello right now), along with some background:

I have a wiki at www.gunownersresource.com/gorole/ that's been up for years, working fine, almost no problems with it, ever. I wanted to mirror it (if that's the right term) on another domain, so I picked up www.gunsopedia.com and configured an addon domain in cpanel to point to the directory that the wiki was in and gave each wiki it's own LocalSettings[x].php file, like it says at Manual:Wiki family. So my LocalSettings.php now looks like:

<?php
        switch ($_SERVER["SERVER_NAME"])
        {
                case "www.gunownersresource.com":
                        require_once "LocalSettings_this.php";
                        break;
                case "gunownersresource.com":
                        require_once "LocalSettings_this.php";
                        break;
                case "www.gunsopedia.com":
                        require_once "LocalSettings_that.php";
                        break;
                case "gunsopedia.com":
                        require_once "LocalSettings_that.php";
                        break;
                default:
                        echo "This wiki is not available. Check configuration.";
                        exit(0);
        }

Okay, so far so jolly. Both sites come up with their own skins, site names, logos, etc.. Everything's cool. So, naturally, this is when things go ahead and take a turn for the discombobulatory (no, I don't give a damn if that's a word). There's some kind of problem with the paths on some pages, but not all of them, that is now officially driving me nuts. Here's an example (which is the best way I can explain it):

If you look at these two pages:

They are both the same page, from the same database, etc.. But, you can't see the images on Page2 and, if you mouse over them you will see that the path they point to the image is at gunsopedia.com/gorole/ instead of just gunsopedia.com. You get the same thing with every link on the page.

However..., if you were to edit the page (the edit link at the top works) and save it, this page would work fine BUT, over on Page1, all the paths would now show just gunownersresource.com instead of gunownersresource.com/gorole/.

So basically, either both pages have the /gorole/ in the paths of the links on them or neither of them do, depending on where the last change was made from. Page1 should have it and Page 2 shouldn't. --- /gorole/, no /gorole/, /gorole/, no /gorole/. Marco! Polo! AAAUUUGGGHHH!!!

In conclusion: I'm stumped, I'm pretty sure I broke my brain (and the damn thing's out of warranty now), my computer won't stop laughing at me, and I do believe I'm going to go get drunk now.

Any help much appreciated, thanks in advance...

More info:
Page gunownersresource.com/gorole/index.php?title=M24_Sniper_Weapon_System was created and the corresponding page showed at gunsopedia.com/index.php?title=M24_Sniper_Weapon_System. Second page works right, first one doesn't. Exactly backwards from what it's been doing before...
Grugnir (talk)00:19, 25 May 2012

I'm not sure such a configuration is supported at all, but you should start with separating caches for different wikis, e.g. (not tested, but you should get the idea) by creating two memcached instances on different ports and having each wiki use different instance:

$wgExtensionFunctions[] = 'wfSetupCaches';
 
function wfSetupCaches() {
        global $parserMemc;
        switch ($_SERVER["SERVER_NAME"])
        {
                case "www.gunownersresource.com":
                case "gunownersresource.com":
                        $parserMemc = ObjectCache::newMemcached( array( 'servers' => array( 'localhost:123' ) );
                        break;
                case "www.gunsopedia.com":
                case "gunsopedia.com":
                        $parserMemc = ObjectCache::newMemcached( array( 'servers' => array( 'localhost:456' ) );
                        break;
                default:
                        echo "This wiki is not available. Check configuration.";
                        exit(0);
        }
}
Max Semenik (talk)14:35, 25 May 2012

Actually, I don't get the idea, but I'll try and figure it out. So this would need to be added to the LocalSettings.php before or after the calls to the other settings files? Or would it make a difference?

Ok, got that tried, after adding 2 more )'s to the $parserMemc lines, now getting Fatal error: Class 'ObjectCache' not found in /.../LocalSettings.php. Looks like I have some more reading to do...
Grugnir (talk)15:15, 25 May 2012
 
 

How do I change my wikis main page interface text?

I know that i can change its link, but instead of its original interface text like Project page or Page, i want it, that a name that i have choose to be appear. On the project page [[1]] i have spent some time to read and try to understand it, but it make no sense, thats no solution for me. Can everyone it more precisely explaine it please, what i have to do, so it work please? Thanks in advance.

Abani79 (talk)22:47, 25 May 2012

System message for subpage back-links

Is there a system message that would let me change the default back-link on subpages from "< {{BASEPAGENAME}}" to something a bit more expository, like "This entry is a branch of {{BASEPAGENAME}}."?

Arctic.gnome (talk)03:59, 25 May 2012

No, as far as I know this part of the Skin does not have its own dedicated system message (yet). But it sounds like something that would be a nice feature to have.

It's not quite as simple though because the subpage indicator is currently very old code that needs to be reworked to be more re-usable. In that proces it could be prettified to have a dedicated system message as well.

I'd say, open a ticker for it at Bugzilla.

Krinkle (talk)22:07, 25 May 2012
 

"The requested URL /mediawiki-1.18.2/... was not found on this server." after updating to 1.18.3

Edited by another user.
Last edit: 21:24, 25 May 2012

Hello, I'm wondering if anyone would be able to help with a problem that's been occurring after installing a Mediawiki update for a private wiki that is hosted locally using MAMP. Following instructions on the Mediawiki site and other user advice, I replaced the the older version of MW (18.1.2) with MW (18.1.3) in the MAMP/htdocs directory while preserving the old localsettings.php file. After following instructions within the wiki program, the upgrade to MW 18.1.3 was complete and it provided a link to follow to use the wiki, just as it did when I first installed MW (18.1.2).

However, this time it comes up with following error message:

"The requested URL /mediawiki-1.18.2/index.php/Main_Page was not found on this server." 

It's clear that I missed a step when upgrading the wiki to make it available on MAMP in its new form. If I type in the usual "localhost8888" it shows an available link to Mediawiki 18.1.3, but once I've followed the link, the error message comes up. I've tried typing in localhost8888: mediawiki-1.18.3/index.php/Main_Page, but that doesn't work either. The PHP version is 5.3.6 and the Database is MySQL 5.5.9. I'm a newbie (probably obvious by the mistake) and it would very helpful to receive guidance. Thanks!

77.78.126.4620:29, 25 May 2012

Hi ho,

the part "mediawiki-1.18.x" in your URLs is no magic; it must point to a folder, which is there. Check in your filesystem to see, which folder you have got. (I think you should have at least one of the two. If then there is the index.php file in that folder, the URL should work.)

Next question: What exactly have you done to do the update: Have you really overwritten the files in the folder mediawiki-1.18.2? So you now have a folder mediawiki-1.18.2 with the content of mediawiki-1.18.3? Or have you instead created a new folder mediawiki-1.18.3? I am confused...

88.130.113.18421:35, 25 May 2012
 

Googlebot spam (cloaking?)

We are running MediaWiki 1.18.2 PHP 5.3.5 (cgi-fcgi) MySQL 5.1.53-log

Our site has been infected by some kind of malware such that pages retrieved by conventional browser user agents are perfectly normal, however pages retrieved by googlebot user agent contain spam. The result being that our Google search results have spurious spam titles and abstracts. Using Google webmaster tools I have seen the page 'as seen by Google' and it starts as follows:

HTTP/1.1 200 OK Date: Thu, 24 May 2012 23:53:55 GMT Server: Apache X-Content-Type-Options: nosniff Content-Encoding: gzip Vary: Accept-Encoding Content-length: 38024 Keep-Alive: timeout=2, max=100 Connection: Keep-Alive Content-Type: text/html <!DOCTYPE html> <html lang="en" dir="ltr" class="client-nojs"> <meta name="keywords" content="cheap,cialis,no,prescription,buy,cialis,online,pill,shop,safe,and,secure."> <meta name="description" content="Cheap cialis no prescription, buy cialis - Online pill store, great deals!! Check order status. 100% satisfaction guaranteed!"> <head> <title>Cheap Cialis No Prescription, Buy Cialis - Online Pill Shop, Safe And Secure.</title> <meta charset="UTF-8" /> <meta name="generator" content="MediaWiki 1.18.2" />

Where should I be looking to find the infection? I assume there is some code or configuration which allows user-agent-dependant meta tags or content to be generated.

Many thanks Rob

http://wiki.worldnakedbikeride.org/wiki/Southampton

109.224.138.14600:32, 25 May 2012

Reupload MediaWiki, making sure first that there are no unwanted additions to LocalSettings.php. Have fresh backups at hand next time.

Max Semenik (talk)14:21, 25 May 2012

No good idea. You should first find out, how the attacker infected your wiki. Just replacing the sourcecode is only curing the symptoms, but not the cause. That way you will likely get infected again: Maybe in two months, maybe in two weeks or maybe just tommorrow.

You should search all your files in your installation for one of these spam words like "cialis". This should give you a clue of which files in fact are the ones infected.

Maybe the change dates of the files also help: Everything, which was changed when the infected files were changed, is likely to be malicious as well.

HTH

88.130.113.18421:10, 25 May 2012
 
 

Download multiple files at once

Is there any way to package up multiple files for download with a single click? For example, say you had fifty sound files like this:

File:Sound1.ogg File:Sound2.ogg File:Sound3.ogg ...

If a user wanted to download all 50 sound, they would have to navigate to each file page and download it. Does anyone know of a function or plugin that would allow you to bundle multiple wiki files so they many be downloaded with a single click without resorting to the file's actual URL (since that can change with updated versions of the file)?

Thanks!

TheAlmightyGuru (talk)19:22, 25 May 2012

internal error 500 after upgrade from 1.16 to 1.19

I removed upgraded php 5.1, moved to 5.3 ... wiki worked.

I upgraded via the manual, and now I get a internal error 500. I would link it, but it's an internal wiki we use, so not public.

207.225.128.7418:22, 24 May 2012

See Manual:How to debug for details on vieweing PHP errors.

Max Semenik (talk)14:22, 25 May 2012
 

display of a page differs from edit window of this page

I have a closed wiki named: testwiki The main page consists of two lines:

line1
line2

Now I backup the database testwikidb through the command:

mysqldump testwikidb > testwikidb-dump.sql

After that I make changes to the main page of testwiki adding 2 more lines, so the new contents is:

line1
line2 
line3
line4

For any reason, I have to restore the testwiki. After creating the database via mysqladmin, I restore the tables:

mysqladmin create testwikidb
mysql testwikidb < testwikidb-dump.sql

When I log in to testwiki the main page displays all four lines as shown above after having added the 2 more lines. This is certainly not what I expected to see. The backup was executed, when the main page consisted of only 2 lines. So after restoring that backup, only 2 lines should be the contents of the main page.

But when opening the editor of that main page, the edit window only shows the first 2 lines. This time it's exactly what I expect to see after restoring the tables.

I am very confused about the fact, that the contents of the main page simply displayed by mediawiki differs from the contents of the editor window of that same page. How can that be?

Is that a bug in mediawiki? Or a bug in mysql? I really don't know where to search for remedy.

Is there anybody kicking me in the right direction to the solution? Please help. Thank you.

137.226.244.12814:06, 25 May 2012

Display problems on chrome and firefox!

Hello all, I need help, recently, when opening me wiki on firefox I just had the pages displaying like this: http://image.noelshack.com/fichiers/2012/21/1337855786-Chromeandfirefoxnotworking.jpg I tried going to google chrome, and it was working correctly, but only for one day. Today it was the same problem as in firefox. So I tried internet explorer (yup!) and... it was working correctly: http://image.noelshack.com/fichiers/2012/21/1337855793-IEworking.jpg

I'm using mediawiki 1.18.2 , with extensions like semantic mediawiki, but since the problem, I didn't do anything. Except writing pages. But I did not install some new things. Also, I did do CCleaner juste in case, but it did not solved the issue. Also, I tried on other PC and it's working correctly, so the problem is probably from my PC.

So if someone know why it display like this, what could cause something like that, help would be much appreciated. Thanks.

Franck1986 (talk)10:50, 24 May 2012

What you see in Firefox/Chrome seems to be like your stylesheets do no longer get loaded. So I would check the source code in the browser and see what happens, when you try to open one of the stylesheets.

As you describe the problem (first it worked in both browsers, then still in one and now in none), this might well be a caching issue. My guess is: Clear the cache in IE and it will be broken there as well.

88.130.70.20716:09, 24 May 2012

When i check the source code, I have... the source code of the page. The beggining is something like this:

<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<title></title>
<meta charset="UTF-8" />
<meta name="generator" content="MediaWiki 1.18.2" />
<link rel="alternate" type="application/x-wiki" title="Edit" href="/w  
/index.php?title=Main_Page& amp;action=edit" />
<link rel="edit" title="Edit" href="/w/index.php?title=Main_Page&action=edit" />
<link rel="apple-touch-icon" href="/w/apple-touch-icon.png" />
<link rel="shortcut icon" href="/w/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php"   
title="" />
<link rel="EditURI" type="application/rsd+xml" href="/w/api.php?action=rsd" />
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="/w 
/index.php?title=Special:RecentChanges&feed=atom" />
<link rel="stylesheet" href="/w/load.php?debug=false&lang=en& 
amp;modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles& 
amp;skin=vector&*" />
<meta name="ResourceLoaderDynamicStyles" content="" />
<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=site& 
amp;only=styles&skin=vector&*" /> 

This is only the beggining, it's like 500 lines long... It's visibly the same for the 2 wikis and for all browser. (as far as i have checked) But how do i try to open stylesheets? (And where?) Also, I have 2 wikis (one in english, one in french) and now... the french one is working correctly on all browsers ( I.E. , firefox and chrome), but the english one only in I.E. and not on firefox and chrome (by the way, I clear all cache from I.E., but it's like yesterday.).

Also, dunno if it's important, but the "favicon" of the english wiki... is gone. (at least does not appear on the url, cause it's in the mediawiki folder).

Well, anyway, the most important thing now is the display. So if you (or someone else) have any idea , i thank you from the bottom of my heart.

Franck1986 (talk)06:21, 25 May 2012
 
 
First page
First page
Previous page
Previous page
Last page
Last page
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox