Project:Support desk

From MediaWiki.org
(Redirected from Support Desk)
Jump to: navigation, search
vde   Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to ask: IRC, mailing lists, Q&A etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  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".
Start a new discussion
First page
First page
Previous page
Previous page
Last page
Last page

Featured Articles like on wikipedia

Hello, I updated my Mediawiki to the newest Version to get the Topicon Function. Now I want to know how to get a Featured Article Function like on Wikipedia.

I did one Topicon as Template but that can be set by anyone I want this Template to be only usable by SysOPs. How to do this?

I am from germany and do not know english very good and also I am very new to mediawiki.

Regards

95.90.54.118:00, 30 June 2015

The english Wikipedia topicons can also set by anyone.

TheDJ (Not WMF) (talkcontribs)18:07, 5 July 2015
 

Include files of de:wikipedia

My version is 1.23.6 Till today morning I used nearby of commons-files files from de-wikipedia. But since few hours only "Es ist keine Datei dieses Namens vorhanden." No file with this name exists appears and not a connection to the wikipedian file exist. As sample http://regiowiki.at/wiki/Datei:Logo_Polizei_AT.svg works okay. In our Localsettings.php nothing of changes were made. So perhaps some changes from Wikipedia-de. Perhaps somebody knows more thx in advance

Karl Gruber (talk)12:58, 16 June 2015

Sounds to me like you have the same issue as this user here: Thread:Project:Support_desk/InstantCommons_suddenly_is_not_working

For him the "solution" was to wait and the issue fixed itself. Somehow...

88.130.116.3014:38, 16 June 2015
 

See https://phabricator.wikimedia.org/T102566

AKlapper (WMF) (talk)17:02, 16 June 2015

I have tried it with 'https://de.wikipedia.org/w/api.php', - but the problem is not solved. Commons works okay. --

Karl Gruber (talk)20:35, 16 June 2015

In the meantime the commons doesn't work too :-(( - but with a little difference. With commons the link to the image appears and with clicks I can reach the file. Other in wikipedia - not a link appears. You can see it at mainpage of http://regiowiki.at --

Karl Gruber (talk)04:52, 18 June 2015

Also see Manual:$wgForeignFileRepos. It is important to use HTTPS and not HTTP in the links pointing to the Wikipedia commons. The Wikimedia guys have changed their setup, redirecting people from HTTP to HTTPS and this change basically caused the issue we got reported here. This change has been reverted for now (so that it's again working also with HTTP), but it is still planned to switch to HTTPS in the future (see task T102566).

The solution is to use HTTPS in the URLs pointing to the commons repository! $wgForeignFileRepos has to be adjusted accordingly! See Manual:$wgForeignFileRepos!

88.130.116.21412:55, 20 June 2015

I set this in the localsettings: $wgForeignFileRepos[] = array(

  'class'                   => 'ForeignAPIRepo',
  'name'                    => 'commonswiki', // Must be a distinct name
  'apibase'                 => 'https://commons.wikimedia.org/w/api.php',
  'hashLevels'              => 2,
  'fetchDescription'        => true, // Optional
  'descriptionCacheExpiry'  => 43200, // 12 hours, optional (values are seconds)
  'apiThumbCacheExpiry'     => 86400, // 24 hours, optional, but required for local thumb caching
  );

then I try with

$wgUseInstantCommons = yes and no have the same effect - a link will be created but not a thumb will be created
//$wgUseInstantCommons = ; -> not a link is created
Karl Gruber (talk)14:56, 20 June 2015
 
 
 
 
 

Mediawiki Main Page

Hi folks,

Currently, I have a like icon which display on every page. But right now I would like it to display on all other pages except the main page

My code to display the like icon is here (https://dpaste.de/ENfm)

On line 470 is where I check if it is a main page, but I am having issue. It is giving me the error (PHP Fatal error: Using $this when not in object context)

On line 32 is where the method is being declared.

How should I check if it is a main page. Using parser? Using outputToHTML?

Please advise. Greatly appreciated! Thanks all!

Newbie16:44, 1 July 2015

It might be easier to hide the icon using CSS.

FriedhelmW (talk)15:50, 4 July 2015

Hello,

Appreciate your response.

May I know what is the CSS for MainPage? Is it common.css?? :/

Thanks !!!

 
 

Change of username

Hello, I would like to know the procedure to change my username, without loosing the photos I have uploaded. Many thanks.

Montanaro 1 (talk)13:01, 4 July 2015

Logo not showing on main page

Hi,

I need to upload a logo on my newly created mediawiki page. I tried images in sizes of 150x150, 135x135 and also 130x130. All do not show when I try. Steps I did do upload the image :

1) Open LocalSettings.php (located in /path/to/document/root/mediawiki)

2) Checked the path where the images are uploaded (/path/to/document/root/mediawiki/resources/assets). This path is represented by the variable $wgLogo.

3) I rename the current image name which is wiki.png to wikibak.png.

4) Then I upload the new image in this directory (abc.png), and change the path of the variable $wgLogo to the new image

  (/path/to/document/root/mediawiki/resources/assets/abc.png).

5) However, even after doing this, I do not see the logo on the mediawiki page. The logo section just appears blank.

    • Not to forget I did change the $wgEnableUploads variable to "true".

How can I resolve this issue and see the logo I want?

Gini2014 (talk)08:32, 4 July 2015

Hi!

The correct size is 135x135 pixels. Manual:$wgLogo has all the information you need.

You should not overwrite or rename the original image. Instead, upload your own logo to a new file, e.g. inside the images/ folder, maybe as images/logo.png.

Then in LocalSettings.php, at the very bottom, add this line:

$wgLogo = {$wgScriptPath}/images/logo.png;

Save the LocalSettings.php file, empty your browser cache and view your wiki again!

Should you after doing these steps not see the logo, I guess it's most probably a caching issue. In that case it would help if you gave us the wiki URL, so that we can have a look!

31.150.205.7209:55, 4 July 2015

There in fact have to be quotes around the value; the line has to look like so:

$wgLogo = "{$wgScriptPath}/images/logo.png";

But since I canno edit my own post, I cannot fix that currently.

31.150.205.7209:57, 4 July 2015
 
 

Way to flag pages as inactive via page creator's inactivity?

Is there a way to check if the creator of a page has been inactive for a period of time, and if they are, mark all pages that they were the first creator of as inactive? Not deleting it, but just assigning it a tag to filter it.

166.171.57.2622:49, 3 July 2015

Download query results to PC

Hi,


Several extensions I installed produce lists (PageViews, recent changes, etc...). They all do so by presenting the results in some table on screen. What I am looking for is a tool to download/export whatever list displayed on screen in these special pages into some file (CSV, whatever format ...) that then can be handled in Excel or any other application...

Till now, in the vast list of extensions I never found such a tool. Does such a thing exist ? Could you point out to me where to find it or how to do this ....

thanks,

Philip Verstraeten (talk)14:13, 3 July 2015

Gadget on kk:wikipedia

Why this gadget doesn't work on KazWiki?

Arystanbek (talk)21:10, 2 July 2015

Done!

Arystanbek (talk)10:40, 3 July 2015
 

img_auth.php and additional images repo

Hi,

Our image folder has automatic hashing configured. Additionally we have a separate folder "images/staffimages" used by our own implemented extension. Now we'd like to hide direct links to the images with img_auth.php. The settings work fine so far for everything hashed in the MW repo. However images in our "staffimages" repo become not accessible anymore. Is there a way e.g. via apache2/Aliases or a LocalSettings.php directive to also cover our separate repo "staffimages" by the img_auth.php?

When I open a page having staffimages, first a rectangle of the correct size of the image opens, then disappears. In the log I see (sry, can't connect from this machine, so no copy of the orig text available): wfForbidden Hdr: access denied .../staffimages/abc_123123.jpg does not exist.

images/.htaccess:
Deny from All

LocalSettings.php:
$wgHashedUploadDirectory = true;
$wgUploadDirectory = "images";
$wgUploadPath = "/img_auth.php";

sry, the wiki is only internally used, so no link. :/
MediaWiki: 1.25.1
Server: Ubuntu 14.04.2 LTS
mysql-server: 5.5.43-0ubuntu0.14.04.1
php5: 5.5.9+dfsg-1ubuntu4.9

Thanks in advance

176.10.108.509:47, 3 July 2015

Backup: Extract database?

I have the following situation:

Server HDD crash with just a backup of the mysql data base. The former admin is not available anymore and we have no knowledge of MySQL or PHP, Media wiki is some older version from ~2010.

I can see all the wiki pages in mysql\data\wiki\text.MYD. However it is one huge file with 1.3 million lines and it contains every version of every page.

Is it possible to extract the wiki pages in some useful form?

84.143.94.12313:39, 25 June 2015

In order to set up the wiki again, you need two things: The wiki files (the MediaWiki source code, best would be exactly that version, which you had before, and custom things in your install like uploaded images and the LocalSettings.php file) and secondly the database.

If you have the complete mysql/data/ folder, you might be very lucky. I guess that with all files from there, you should be able to restore the whole database.

Reading up here http://stackoverflow.com/questions/879176/how-to-recover-mysql-db-from-myd-myi-frm-files makes it sound like it is simple to restore the tables, if they were of the MyISAM type (= you have .myd, .myi and .frm files).

If you have InnoDB types, you have to do some additional magic, see http://stackoverflow.com/questions/10934745/restore-the-mysql-database-from-frm-files.

88.130.101.15514:40, 25 June 2015
Edited by 2 users.
Last edit: 05:42, 27 June 2015

Thank you!

I was able to set up xampp on a local pc, copy the old mysql database to mysql\data\ and run mysql with --skip-grant-tables to disable the password check.

Then I could open this database in the current version of mediawiki without problem and save all pages I needed.

84.143.94.17506:53, 26 June 2015
 

Okay, turns out there is one problem left:

Every wiki page that contains a special character like ü, ä, ö is now missing. For example the page "Technik" is now accessible but "Übersetzen" is now red and missing.

Is there some kind of text encoding option that I have to change?

84.146.102.8305:29, 3 July 2015

Maybe you need to set $wgDBTableOptions to specify the correct charset. But that may be hard to know beforehand. If it was an old installation, it may be latin1, or utf8, or who knows...

Ciencia Al Poder (talk)09:34, 3 July 2015
 
 
 

Enhancing LaTex support on Wikiversity

I would like to enhance the MediaWiki support on Wikiversity so that the following works: \begin{equation} \label{squ} \D := \vcenter{\xymatrix @=3pc {S \ar @<1ex> [r] ^{s^1} \ar @<-1ex> [r] _{t^1} \ar @<1ex> [d]^{\, t_2} \ar @<-1ex> [d]_{s_2} & H \ar[l] \ar @<1ex> [d]^{\,t} \ar @<-1ex> [d]_s \\ V \ar [u] \ar @<1ex> [r] ^s \ar @<-1ex> [r] _t & M \ar [l] \ar[u]}}, \end{equation}

The expression is put between <:math></math>.

Any help, suggestions, comments, or criticisms are welcome.

Marshallsumter (talk)01:08, 2 July 2015

If there's something that needs to be changed on Math extension, you have to request it on Phabricator. See BUGREPORT.

Ciencia Al Poder (talk)09:26, 3 July 2015
 

Moving to MSSQL

Hi all,

I'm running MW1.17 on IIS7 and MySQL server for now. I need to move the database to our company Microsoft SQL Server 2008.

I tried the MS Migration Assistant, but it failed.

In the SQL Management Studio I tried to import the table definitions form maintenance/mssql/tables.sql, but it failed with error Msg 156, Level 15, State 1, Line 33 Incorrect syntax near the keyword 'user'.

Can somebody help me?

94.113.242.6614:20, 7 November 2011

Hi, you have to modify the file Database.php, function: fieldNameWithAlias, line 2566, you have to put the brackets in the alias.

return $name . ' AS ' . $alias;

for this

return $name . ' AS [' . $alias.']';

a bit late, lol

89.167.129.5014:10, 2 July 2015

Honestly, I would say: You have to install MySQL. While MediaWiki should theoretically support MSSQL, this support compared to MySQL is way less mature. You should expect a variety of things to be not working or having bad performance, just because not so many people use MediaWiki with MSSQL and because it's optimized for MySQL, likely with InnoDB tables in mind.

So, if you want to solve this issue properly, use MySQL. This is the real fix.

31.150.179.23021:37, 2 July 2015
 
 

Multiple fields in one drop down input

Is there a way to include more than one category/property as values to input in a combobox? For example: I want to be able to find a name of a person in this combobox by typing in other fields such as their ID along with typing in their name?

159.53.78.14319:07, 2 July 2015

Landing page after saving information via form

Hi,

I have a page that includes a form to manually add and save data to the page. Once I click on the link to the form, fill it out, and save it, it goes back to a different landing page than the base page (with the link to the form). I want it to go back to the original page that i accessed the form link from. Any help would be greatly appreciated.

159.53.78.14319:03, 2 July 2015

Pages and users

Hello. I installed new Mediawiki but I forgot to protect registration process so many boots users have registered and created many pages.

How to delete pages and users permanently?

TraaBBIT (talk)06:15, 2 July 2015

upgrade problem

Hi all, I am trying to upgrade to the latest version. Using Putty I run the update.php script : ngw.nl@one.com/www/heraldrywiki$ php maintenance/update.php I then get : Set $wgShowExceptionDetails = true; in LocalSettings.php to show detailed debugging information. I did that, but nothing happens, I keep getting the same message. What is this and how to continue ?

145.53.133.13606:07, 2 July 2015

adding CSS at onBeforePageDisplay hook

Hello,

In an extension Im working on, I add additional modules containing CSS at the onBeforePageDisplay hook. The problem is that when the page loads, first the normal mediawiki CSS is displayed for a milisecond, and only after this my CSS is loaded.. which doesn't look too nice. How can I resolve this? Thanks :]

146.175.202.3014:02, 25 June 2015

That's not the 'proper' way to add CSS: ResourceLoader/Developing_with_ResourceLoader.

But are you adding a style block, or an external stylesheet ? Can you give links perhaps ?

TheDJ (Not WMF) (talkcontribs)20:25, 28 June 2015
Edited by another user.
Last edit: 15:52, 30 June 2015

Thanks for the reply :] Im adding an external stylesheet. The idea of what I want is simple: I have a custom SpecialPage on which I have added HTML buttons and I want to change the way these buttons look like. So I want to load a custom .css file only when the user lands on my SpecialPage. Unfortunately I have not uploaded my code to the web yet, so I can't give you a link, but my basic code for the hook looks like this:

  public function onBeforePageDisplay(OutputPage &$out, Skin &$ski ){

    $page_title = $out->getPageTitle();

    if($page_title === 'My SpecialPage Title Name'){
      $out->addModules("ext.myModule");    
    }

    return true; 
  }

ext.myModule then retrieves a small .css file with the changes I want for my buttons:

#button{
  width: 30em;  
  height: 1.5em;
  cursor: pointer;
}

#letter_button{
  cursor: pointer;
}
62.205.118.23716:53, 29 June 2015

Could it have something to do with that mw.loader.load(); is called at the bottom of the HTML page? When I just add my css using normal <style> </style> blocks, and $out->addHTML the CSS loads immediately

146.175.202.3014:53, 1 July 2015
 

You are using JavaScript to load your styles, so they aren't loaded immediately. Use addModuleStyles.

121.219.253.3609:43, 2 July 2015
 
 
 

[RESOLVED] Some strange thing on pages

Hello.

I created a new MediaWiki using my old database.

But after that I have displaying pages in wrong way.

like here: http://wiki.westeros.pl/index.php?title=Wojna_Pi%C4%99ciu_Kr%C3%B3l%C3%B3w

Could anybody help me?

TraaBBIT (talk)10:31, 24 June 2015

This is usually caused by an unclosed HTML element (div, table, etc), or even a closing element that has no matching start element (effectively closing too early a previous element of the page. Check the HTML codes of the page or templates.

Ciencia Al Poder (talk)11:42, 24 June 2015

Not sure. In my old database that page was OK.


I check all and all looks OK.

Look on that page too http://wiki.westeros.pl/index.php?title=Szablon:Navbox_generic/doc

TraaBBIT (talk)12:16, 24 June 2015

If you inspect the generated HTML (better if you download the page as raw, since browser may auto-correct mismatched tags and change the original HTML) you'll see that it outputs several encoded HTML because it's not generating it properly [1] (search for &lt;)

I think those and

tags shoud be using wiki tables instead.
Ciencia Al Poder (talk)17:31, 24 June 2015

Yeah. So what should I do?

Install some extension?

Looks like that bug: https://phabricator.wikimedia.org/T38059


I copy that page http://wiki.westeros.pl/index.php?title=Wojna_Pi%C4%99ciu_Kr%C3%B3l%C3%B3w from that site (Mediawiki 1.24.1) http://awoiaf.westeros.org/index.php/War_of_the_Five_Kings

And there evrything is OK.

TraaBBIT (talk)19:07, 24 June 2015

I've exported the page of wiki.westeros.pl on my test 1.23 wiki and it rendered broken as well

Ciencia Al Poder (talk)15:17, 26 June 2015
 
 
 
 
 

Mantle returns error upgrading extension from 1.24 to 1.25 branch in Mediawiki 1.25.1

In mobile view on my wiki: wiki.gamepaduniverse.com the mobile view isn't display correctly. The search box doesn't look right, the site notification is now displayed at top, and there is no edit bar anymore. How to correct?


My Mobile Frontend extension and Mantle extension are up-to-date at version 1.25.

I am using Mediawiki 1.25.1 and Windows Server 2012 R2

GamepadUniverse (talk)17:27, 13 June 2015

It seems you edited the code of MobileFrontend? Just for completeness: If you use a new download of MobileFrontend (without editing files in it), does it work?

Florianschmidtwelzow (talk)10:04, 16 June 2015

No, I get the same result. I don't believe I have ever modified anything in that extension's directory.

GamepadUniverse (talk)20:22, 20 June 2015

Resolved

GamepadUniverse (talk)01:01, 2 July 2015

How? Why?

88.130.76.19202:06, 2 July 2015
 
 
 
 

Moving Files to /w Directory and Rewrite Rules

MediaWiki 1.24.1 PHP 5.3.29 (apache2handler) MySQL 5.1.56-log

URL: http://www.progresspedia.org/

When we initially set up our MediaWiki installation, we did so without having initially created a /w directory, thus having MediaWiki in the root directory. Now, after the fact, we've decided that we would like to move the file structure into a /w directory. We've done so, but are having issues with page redirects.

We've gotten pages formatted this way to properly redirect:

http://www.progresspedia.org/index.php/

We cannot figure out how to get these to properly redirect, however:

www.progresspedia.org/index.php?title=

Any assistance would be greatly appreciated.

Thanks!

Jordan Barden (talk) 19:12, 1 July 2015 (UTC)

Jordan Barden (talk)19:12, 1 July 2015
First page
First page
Previous page
Previous page
Last page
Last page