Project:Support desk

From MediaWiki.org
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

Contents

Thread titleRepliesLast modified
Linking to external Link123:12, 7 July 2015
Utilizing MAGICWORD PATH416:04, 7 July 2015
Generic Template for a dynamic list013:46, 7 July 2015
How do I request a name change?109:57, 7 July 2015
Error creating thumbnail :File missing103:15, 7 July 2015
Logo not showing on main page219:15, 6 July 2015
Why VisualEditor couldn't load009:22, 6 July 2015
Featured Articles like on wikipedia118:07, 5 July 2015
Include files of de:wikipedia1219:38, 4 July 2015
Mediawiki Main Page218:12, 4 July 2015
Change of username117:40, 4 July 2015
Way to flag pages as inactive via page creator's inactivity?022:49, 3 July 2015
Download query results to PC014:13, 3 July 2015
Gadget on kk:wikipedia110:40, 3 July 2015
img_auth.php and additional images repo009:47, 3 July 2015
Backup: Extract database?409:34, 3 July 2015
Enhancing LaTex support on Wikiversity109:26, 3 July 2015
Moving to MSSQL221:37, 2 July 2015
Multiple fields in one drop down input019:07, 2 July 2015
Landing page after saving information via form019:03, 2 July 2015
First page
First page
Previous page
Previous page
Last page
Last page

Linking to external Link

I have my mediawiki on a virtual machine that is bridged. One thing i noticed was when i added an external link file:///Z:/test/test/index.html or file://///Z:/test/test/index.html. I tried clicking it in my internet explorer 11 but it does not work. It shows the proper link in the status bar: file:///Z:/test/test/index.html But when I clicked on it, it just did nothing. This goes the same for firefox, chrome or IE. But for Google Chrome they can be enabled using the LocalLinks extension.

On the other hand, when i created a html webpage, <a href="file:///Z:/test/test/index.html" target=_blank>Test</a>, the link works in all browser. Any idea why is this happening?

AT

AmazingTrans (talk)16:21, 7 July 2015

Are you browsing from the same machine that mediawiki is installed on?

Xanuri (talk)23:12, 7 July 2015
 

Utilizing MAGICWORD PATH

I have a external path as such: [file://\\network\shared folder\application file\] i would like to use string but only to insert the empty space with %20, and not replacing \ i tried [file://%5C%5Cnetwork%5Cshared%20folder%5Capplication%20file%5C] it converts all the \\ and spaces. What can i do to just convert spaces to %20?

71.67.124.17403:39, 30 June 2015

What magic word are you using and why?

Ciencia Al Poder (talk)15:55, 30 June 2015
Edited by another user.
Last edit: 14:43, 1 July 2015

I have enable the following: https://www.mediawiki.org/wiki/Manual:$wgUrlProtocols When i link an external link through Visual Editor: [file://\\network\shared folder\application file\] , this will not work because it will get concatenated at the space because it can't recognize space but %20 instead: file://\\network\shared.

I tried using {{urlencode:string|PATH}}, but it replaces my \\ with %5C as well. I would only like the code to replace spaces with %20. Doing this [file://{{urlencode:\\network\shared folder\application file\|PATH}}]; result in : file://%5C%5Cnetwork%5Cshared%20folder%5Capplication%20file%5C And the browser does not recognize %5C

206.51.148.213:50, 1 July 2015

Apparently, urlencode with PATH won't work, because it encodes "/" characters, which from my understanding it shouldn't.

You should use forward slashes in URLs, and it should end with 5 forward slashes at the start: file://///network/shared%20folder/application%20file.

Try to not use spaces in URLs, or use URLENCODE on every segment of the URL, not on the whole URL.

Ciencia Al Poder (talk)14:54, 1 July 2015

Thank you for your comment Ciencia. Unfortunately, a lot of our folders has spaces and i cant change all the folders naming convention because other people has links to them as well, and i know if we work on website design, we utilize <a href>, it works on web browsers. Just wondering if i have to insert %20 myself or maybe there is some extension that covers something like this. Thanks

AmazingTrans (talk)16:04, 7 July 2015
 
 
 
 

Generic Template for a dynamic list

Hello,

I wanted to create a table that has a standard header.

then pass a parameter that adds a link to a document where the link text is standard wiki formatted link such as [webaddress <shortname>]

the number of links in the table should be variable based on the number of link parameters passed, each parameter passed adds a row to the table.

could anyone help me with this?


Here is my base Template:

<div> <table style="clear: both; float: right; margin-left: 5px; border-color: silver; border: 1px; border-style: solid; padding: 0px; font-size: 80%; width: 400px; background-color: rgba(48, 78, 128, 0.15);"> <tr> <td width=auto align=center bgcolor=#304e80><FONT color="white" size="2"><STRONG>Related Documentation</STRONG></FONT> </td> </tr> {{DocRefItem|{{{1}}}| }} </table> </div>

Xanuri (talk)21:31, 6 July 2015

How do I request a name change?

How do I request a name change?

174.48.253.7405:25, 7 July 2015

Error creating thumbnail :File missing

But the FTP and the original file is normal. How can this problem be solved?

my mediawiki version is 1.25.1.

Nuriwiki (talk)11:31, 6 July 2015

did you upload your file to your mediawiki site?

check under the images folder too to ensure your picture exists

203.127.197.2303:15, 7 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
Edited by another user.
Last edit: 19:15, 6 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
 

Why VisualEditor couldn't load

Hi

I install Parsoid in server and Extension:VisualEditor. logs in /var/log/parsoid/parsoid.log.

[info][master][1526] initializing 4 workers
[info][worker][1528] loading ...
[info][worker][1529] loading ...
[info][worker][1531] loading ...
[info][worker][1530] loading ...
[info][worker][1531] ready on :8142
[info][worker][1528] ready on :8142
[info][worker][1529] ready on :8142
[info][worker][1530] ready on :8142
Killed
Cannot load local settings from /etc/mediawiki/parsoid/settings.js. Please see: /usr/lib/parsoid/src/api/localsettings.js.example
[info][master][8552] initializing 4 workers
[info][worker][8554] loading ...
[info][worker][8555] loading ...
[info][worker][8557] loading ...
[info][worker][8556] loading ...
[info][worker][8554] ready on :8142
[info][worker][8557] ready on :8142
[info][worker][8555] ready on :8142
[info][worker][8556] ready on :8142
[info][mediawiki/مدیاویکی?oldid=10] started parsing
[warning/api/expandtemplates][mediawiki/مدیاویکی?oldid=10] Template Expansion Unrecognized values for parameter 'prop': modules, jsconfigvars
[info][mediawiki/مدیاویکی?oldid=10] completed parsing in 1873 ms
[info][mediawiki/بارگیری?oldid=3] started parsing
[info][mediawiki/بارگیری?oldid=3] completed parsing in 1393 ms
[info][mediawiki/مدیاویکی?oldid=10] started parsing
[warning/api/expandtemplates][mediawiki/مدیاویکی?oldid=10] Template Expansion Unrecognized values for parameter 'prop': modules, jsconfigvars
[info][mediawiki/مدیاویکی?oldid=10] completed parsing in 5645 ms
[info][mediawiki/مدیاویکی?oldid=10] started parsing
[warning/api/expandtemplates][mediawiki/مدیاویکی?oldid=10] Template Expansion Unrecognized values for parameter 'prop': modules, jsconfigvars
[info][mediawiki/مدیاویکی?oldid=10] completed parsing in 1215 ms
[info][mediawiki/Parsoid/نصب?oldid=169] started parsing
[warning/api/expandtemplates][mediawiki/Parsoid/نصب?oldid=169] Template Expansion Unrecognized values for parameter 'prop': modules, jsconfigvars
[info][mediawiki/Parsoid/نصب?oldid=169] completed parsing in 1523 ms
[info][mediawiki/مدیاویکی?oldid=10] started parsing
[warning/api/expandtemplates][mediawiki/مدیاویکی?oldid=10] Template Expansion Unrecognized values for parameter 'prop': modules, jsconfigvars
[info][mediawiki/مدیاویکی?oldid=10] completed parsing in 9273 ms
Killed
[info][master][1749] initializing 4 workers

So me setup /etc/mediawiki/parsoid/settings.js as following

parsoidConfig.setInterwiki( 'mediawiki', 'http://mysite.com/mediawiki/api.php' );

in end Add the following lines to your wiki's LocalSettings.php after you have downloaded the extension

require_once "$IP/extensions/VisualEditor/VisualEditor.php";
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
// URL to the Parsoid instance
// MUST NOT end in a slash due to Parsoid bug
// Use port 8142 if you use the Debian package
$wgVisualEditorParsoidURL = 'http://localhost:8142';
// Interwiki prefix to pass to the Parsoid instance
// Parsoid will be called as $url/$prefix/$pagename
$wgVisualEditorParsoidPrefix = 'mediawiki';
// Forward users' Cookie: headers to Parsoid. Required for private wikis (login required to read).
// If the wiki is not private (i.e. $wgGroupPermissions['*']['read'] is true) this configuration
// variable will be ignored.
//
// This feature requires a non-locking session store. The default session store will not work and
// will cause deadlocks (connection timeouts from Parsoid) when trying to use this feature.
$wgSessionsInObjectCache = true;
//
// WARNING: ONLY enable this on private wikis and ONLY IF you understand the SECURITY IMPLICATIONS
// of sending Cookie headers to Parsoid over HTTP. For security reasons, it is strongly recommended
// that $wgVisualEditorParsoidURL be pointed to localhost if this setting is enabled.
$wgVisualEditorParsoidForwardCookies = true;

According to this configuration, visual editor not loading.

What should I do?

WikiMech (NOT WMF) (talk)09:22, 6 July 2015

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

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
First page
First page
Previous page
Previous page
Last page
Last page