Project:Support desk

About this board

vde   Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing 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 topic".
By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

What are the recommended file and directory permissions for MediaWiki?

1
Tommyheyser (talkcontribs)

New install of MediaWiki 1.28 on Ubuntu 16.04. Permissions for /var/www/html set to 755, owned by me user:www-data.

Did a Download from Git install, before and after doing composer install, the file and directory permissions are readable and writable but not executable for group. Should I set them to 755 manually?

Reply to "What are the recommended file and directory permissions for MediaWiki?"

Category Link not working anymore after updating to 1.27.1

5
RalliHH (talkcontribs)

Hey there, I am using MediaWiki on a Synology DiskStation for home usage. I updated my MediWiki two weeks ago and since then, the Category Link is not working anymore. If I specify a category on my page with the link to the page example works fine, but there is no reference back to my page, where I set this category. Any idea what is wrong?

I am using MediaWiki 1.27.1, PHP 5.6.28, Maria-DB 5.5.53 and ICU 56.1 Synology is not offering a newer version and myself do not know, how I can upgrade manually.

Thanks for any help.

Ralf from Hamburg/Germany

AhmadF.Cheema (talkcontribs)

See Topic:T8jd8uxlq4jqb0np.

RalliHH (talkcontribs)

Thanks Ahmad, I tried a lot now but did not succeed. Whenever I want to run the command runJobs.php I get an error. Looks like there is a problem with the database. I need to mention, I used MySQL at the beginning and due to the update changed to MariaDB. All other things working fine. The error says:

MWException from line 612 of ...Database.php: Database::factory no viable database extension found for 'mysql'

This does not say a lot to me (really beginner ...)

Any idea? THANKS!

Ralf

AhmadF.Cheema (talkcontribs)

Apparently, MediaWiki is trying (and failing) to find MySQL which is resulting in this error. See this. You can try Manual:How to debug, but someone more experienced will have to answer your query.

RalliHH (talkcontribs)

Thanks so much, Ahmad. Job for the next week :)

Reply to "Category Link not working anymore after updating to 1.27.1"

New install: Problem with subdomain settings

1
Karl.jonas (talkcontribs)

Dear all,

I have just installed MediaWiki on a Webspace (preconfigured app-installation on Apache). Basically things work fine, but I have trouble with the configuration of the subdomain.

  • I have a domain mydomain.de,
  • the wiki installation at mydomain.de/wiki,
  • and a subdomain wiki.mydomain.de that refers to mydomain.de/wiki

With the default config (only $wgGroupPermissions was modified), the following works:

  • mydomain.de/wiki is ok, leads to "login required".
  • clicking on LogIn shows an unformatted login-page for 100 ms, then the login-page in correct format
  • Login works, everything seems to be fine.
  • wiki.mydomain.de also leads to "login required", but the page is unformatted.
  • clicking on LogIn brings up an "Internal Server Error" (500), hinting at a misconfiguration error. "More information about this error may be available in the server error log". A serverlog is not accessbile to me (as far as I know).

I did some experiments according to Manual:Short URL/LocalSettings.php, with no success. Any help?

Regards, Karl

Reply to "New install: Problem with subdomain settings"
91.96.131.188 (talkcontribs)

Hey there guys, for some unkwon reasons the JS defined class mw-collapsible (mw-collapsed) is currently not working in our wiki. The "hide" and "show" wont show up. I tryed a few things, but it wont work either! And the special page "maintenence shell" is not working too! A message is always popping up saying "JavaScript must be activated" in order to use this special page. I am really confused right now. In other wiki, like this wiki, mw-collapsible (mw-collapsed) is working but not in my wiki.

I am not using any css/js rules in my wiki to define these two classes. I updated /resources and all the files to the latest version and still nothing happend.I even read the manuals and copy&pasted the css&js rules. Nothing happend. A few days ago I noticed that mw-collapsible (mw-collapsed) was not always working. Sometimes the toogle button was shown and sometimes not. But now it's entirely not working.

Currently using: MediaWiki: 1.26.2; https://php.net/ PHP 7.0.10 (cgi-fcgi); MySQL 5.5.50-0+deb7u2-log; ICU 4.8.1.1

I'd be really grateful and happy if someone could help me.

121.220.53.76 (talkcontribs)

Press F12, reload the page and see the errors which come up in the console; these are preventing JS from working. Probably caused by some custom script in MediaWiki:Common.js or MediaWiki:Vector.js.

91.96.131.188 (talkcontribs)

I made two screenshots, please take a look.

http://i1250.photobucket.com/albums/hh535/lodestar/fzwscreenshot01_zps4ezxjzsc.png

http://i1250.photobucket.com/albums/hh535/lodestar/fzwscreenshot02_zpsjnt9lffk.png

I also copied these codes (mypage.example/example/Benutzer:xxx:26 - take a look at the second screenshot)

<code><nowiki>

<link rel="stylesheet" href="data:text/css;charset=UTF-8;base64,I2Nzcy1leHRlbnNpb24tY2FuYXJ5LWM0NzFmMXtiYWNrZ3JvdW5kOiNjNDcxZjEgIWltcG9ydGFudH1kaXYuY2VudGVyIHsKICAgIHRleHQtYWxpZ246IGNlbnRlcjsKfQoKQG1lZGlhIHNjcmVlbiBhbmQgKG1heC13aWR0aDogMTAwMHB4KSB7Ci5kaXNhcHBlYXIgaW1nIHsKICAgIGRpc3BsYXk6IG5vbmU7Cn0KfQ==" /><script>jQuery( function( $ ) {

$( 'link[href^="data:text/css;charset=UTF-8;base64,I2Nzcy1leHRlbnNpb24tY2FuYXJ5LWM0NzFmMXti"]' )

.cssExtensionDataURIFallback( 'css-extension-canary-c471f1', 'c471f1' );

} );</script></nowiki></code>

<code><nowiki>

Exception encountered, of type &quot;Error&quot;<br />

[b283ccc6] /load.php?debug=false&amp;lang=de&amp;modules=startup&amp;only=scripts&amp;skin=timeless   Error from line 563 of /var/www/web130/html/mediawiki-1.23.4/mediawiki-1.23.4/includes/resourceloader/ResourceLoader.php: Class 'ResourceLoaderSiteStylesModule' not found<br />

Backtrace:<br />

#0 /var/www/web130/html/mediawiki-1.23.4/mediawiki-1.23.4/includes/resourceloader/ResourceLoader.php(132): ResourceLoader-&gt;getModule(string)<br />

#1 /var/www/web130/html/mediawiki-1.23.4/mediawiki-1.23.4/includes/resourceloader/ResourceLoaderStartUpModule.php(406): ResourceLoader-&gt;preloadModuleInfo(array, DerivativeResourceLoaderContext)<br />

#2 /var/www/web130/html/mediawiki-1.23.4/mediawiki-1.23.4/includes/resourceloader/ResourceLoaderStartUpModule.php(388): ResourceLoaderStartUpModule-&gt;getAllModuleHashes(DerivativeResourceLoaderContext)<br />

#3 /var/www/web130/html/mediawiki-1.23.4/mediawiki-1.23.4/includes/resourceloader/ResourceLoaderModule.php(624): ResourceLoaderStartUpModule-&gt;getDefinitionSummary(DerivativeResourceLoaderContext)<br />

#4 /var/www/web130/html/mediawiki-1.23.4/mediawiki-1.23.4/includes/resourceloader/ResourceLoader.php(643): ResourceLoaderModule-&gt;getVersionHash(DerivativeResourceLoaderContext)<br />

#5 [internal function]: ResourceLoader-&gt;{closure}(string)<br />

#6 /var/www/web130/html/mediawiki-1.23.4/mediawiki-1.23.4/includes/resourceloader/ResourceLoader.php(644): array_map(Closure, array)<br />

#7 /var/www/web130/html/mediawiki-1.23.4/mediawiki-1.23.4/includes/resourceloader/ResourceLoader.php(696): ResourceLoader-&gt;getCombinedVersion(ResourceLoaderContext, array)<br />

#8 /var/www/web130/h

</nowiki></code>

(when clicking on "Refused to execute script from 'http://fzerowiki.net/load.php?debug=false&lang=de&modules=startup&only=scripts&skin=timeless' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.")

I am assuming somethings wrong with the [[Skin:Timeless|Timeless]] skin.

85.16.33.149 (talkcontribs)

now what?

87.123.41.228 (talkcontribs)

The relevant part of the error is

Class 'ResourceLoaderSiteStylesModule' not found

You should check, where (= in which file) this class should be. And why it is not there.

87.123.41.228 (talkcontribs)

I think this is not a problem with that one skin. You are getting the same error message also, if you use that URL, but with "vector" or "monobook" instead of "timeless" in it.

Class ResourceLoaderSiteStylesModule should be defined in includes/resourceloader/ResourceLoaderSiteStylesModule.php and it is referenced in autoload.php.

Make sure that all files of the MediaWiki package got extracted and that no old files remained.

Afterwards, make sure to empty all caches, e.g. the PHP cache, a class loader cache, APC or whatever you might have running on the server!

85.16.38.51 (talkcontribs)

Done. JavaScript is now activated. Thanks.

87.123.2.94 (talkcontribs)

JavaScript had been activated all the time. How have you fixed the issue?

85.16.47.223 (talkcontribs)

I realized something was wrong with the Common.js page and the extension "CSS". I just updated MediaWiki to the current version. I also realized that the skins have nothing to do with the issue because the console menu is always reporting the same message even If I switch to vector or monobook. To be honest (and I realized that a few hours ago) the issue is not really fixed. I am sorry and I really don't understand how to handle with PHP and/or JS. I am just a CSS & HTML guy with a wiki on a shared host server. As you may realized I really can't do anything because I've some problems to understand where the problem is how to fix it. But I am really motivated and have interest to learn more about the current situation and how to fix it.

I am thinking about deleting the Common.js page since these codes are useless for us. I just wanted the "click on image to toogle" thingy and I need that in the future. So, let us restart so I can think about the whole problem.

When this visiting this page these message can be seen in the console menu of Firefox and/or Google Chrome:

(Google Chrome)

Uncaught ReferenceError: jQuery is not defined

load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=Lw3Ssrp0:178 Exception in module-execute in module site:

load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=Lw3Ssrp0:178 ReferenceError: addOnloadHook is not defined ReferenceError: addOnloadHook is not defined(…)log @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=Lw3Ssrp0:178

(Firefox)

Exception in module-execute in module site:load.php:178:411

ReferenceError: addOnloadHook is not defined ReferenceError: addOnloadHook is not defined [...]

What I get is that jQuery and addOnloadHook is not defined. I clicked on "Warnings" (in the console/debug menu of Firefox while reading the "Captain Falcon page") and got several warning messages like "Use of "$j" is deprecated. Use $ or jQuery instead." or "Use of "wgAction" is deprecated. Use mw.config instead."

Ciencia Al Poder (talkcontribs)

The "Uncaught ReferenceError: jQuery is not defined" is because Extension:CSS is injecting a script referencing jQuery at the head of the document, but jQuery is loaded asynchronously, so when the Extension:CSS script is loaded, jQuery still is not defined. I can say for sure that Extension:CSS is broken. I'd recommend uninstalling it. You can achieve similar effects by editing MediaWiki:Common.css and target your rules to the specific CSS class that every page has in the body element.

addOnloadHook was deprecated long ago and is now no longer supported. See ResourceLoader/Legacy JavaScript. You can fix that simply by replacing "addOnloadHook" with "jQuery". But knowing that your scripts are relying on that obsolete method, it may throw other errors for similar obsolete methods when this code executes.

Yässinzeldafan (talkcontribs)

I know it's been five months and our wiki is a ghost town (but thats not important anyway). Erm... okay... I'm a noobie, so dont expect I understand everything. What I know is that these <idontknowhowtocallthem> are deprecated, I got it. Now I need to replace them... with newer ones, right? And how am I supposed to do that? Which file(s) should I edit and where is it (/are they)?

Warning messages (if someones wants to take a look...)
load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:178 ReferenceError: addOnloadHook is not defined ReferenceError: addOnloadHook is not defined
    at eval (eval at <anonymous> (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:4), <anonymous>:6:91)
    at eval (<anonymous>)
    at load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:4
    at Function.globalEval (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:4)
    at Object.<anonymous> (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:163)
    at fire (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:45)
    at Object.add [as done] (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:45)
    at Object.always (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:46)
    at runScript (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:162)
    at checkCssHandles (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:163)

log @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:178 handler @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:155 fire @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:45 fireWith @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:46 fire @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:46 track @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:155 runScript @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:163 checkCssHandles @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:163 (anonymous) @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:163 fire @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:45 fireWith @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:46 fire @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:46 fireCallbacks @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:157 addEmbeddedCSS @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:158 (anonymous) @ load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=timeless&version=Lw3Ssrp0:157

Ciencia Al Poder (talkcontribs)

A link to the wiki would help. Instances of "addOnloadHook" may be on those pages: "MediaWiki:Common.js" and "MediaWiki:Timeless.js", your personal scripts, or even outdated extensions/skins

Yässinzeldafan (talkcontribs)

http://fzerowiki.net/index.php?title=Hauptseite

Ciencia Al Poder (talkcontribs)

As I said: http://fzerowiki.net/index.php?title=MediaWiki:Common.js lots of addOnloadHook there.

The site seems to have some broken configuration that breaks debug mode. All resource loader URLs are generated without the full path to the script, just the server and the version at the end of the URL example

Reply to "Javascript is not activated?!"
JSH-alive (talkcontribs)

I have read the Swedish design company 1910's blog post before trying this Userstyles script, and so far, I like it.

I think the legibility of Wikipedia (and other Wikimedia sites) actually depends on how a MediaWiki skin is designed. So, why don't you let the team at 1910 to design a MediaWiki skin (with some tweaks from their original suggestion), and let the users at all the Wikimedia sites to try it?

AhmadF.Cheema (talkcontribs)

There is nothing to "allow". Mediawiki is open source, anyone can design a MediaWiki skin.

Regarding the skin ending up being used by "all the Wikimedia sites", that is probably decided by a lengthy public voting process.

JSH-alive (talkcontribs)

Okay. I better convince them on my own.

Reply to "1910's idea on legibility"
LauraHale (talkcontribs)

I know how to use the Wikidata SPARQL Query well enough.  The issue is the install that comes with the Wikibase package is very much tied into Wikidata, and seems impossible to separate.  Is there a way to easily configure the Sparql query engine to allow for defaulting on the local wikibase install? Or are there easy to understand configuration directions to do a query using a wikibase install on a non-wikimedia wiki?

Where say a query like:

#Cats

SELECT ?item ?itemLabel

WHERE

{

?item wdt:P31 wd:Q146 .

SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }

}

could be run on "mediawikidevelopersareawesome.com"?

--~~~~

:: As a follow up,  problem with Sparql query engine on independent Wikibase install is that in trying to run eslewhere for not wikidata is it runs into problems converting to RDF. Wikidata query service/User Manual#Standalone service does does not address this particular issue of how to de-wikidata it. And can't use other sparql engines to try to do the Wikibase data handling aspect. --~~~~
Reply to "Wikibase install queries"
CSchrieb (talkcontribs)

I'm trying to upload some files to my wiki, and I get errors similar to:

Could not delete lock file for "mwstore://local-backend/local-public/0/...."

I'll get 2 or three of these with different directories listed. However, the file does indeed upload, and it seems to work fine.

BUT

I can't delete the files via the File List. In that case I get 4 entries that are similar to the upload messages:

Could not move file "mwstore://...." to "mwstore://..... sdfslkjsdf.jpg"

Could not delete lock file......local-public...

Could not delete lock file ..... local-deleted/p/f/j

Could not delete lock file for "mwstore:....sdfslkjsdf.jpg"

Any assistance would be greatly appreciated. This is the latest version of MediaWiki, PHP 5.4, and I believe it's running on Windows.

CSchrieb (talkcontribs)

It appears that adding "modify" to my app pool permissions (along with Write, which I had done previously) is what was necessary.

But, is that dangerous to leave turned on? I'm under the impression that could be a security problem.

Thanks!

Reply to "Could Not Delete Lock"
KMjolnir (talkcontribs)

Hello all!

So I recently installed a fresh installation of Mediawiki after my old site provider died, and I went from 1.27 to 1.28, imported all my old files... and ALL of the IF statements seem to be broken now, and aren't behaving in the way they used to. Coding that I did hasn't changed, unless something went weird in the export utility. I'd normally pester my mentor, but, she, unfortunately, is permanently unavailable (before anyone asks, no, there was no falling out & she didn't edit the code just to spite me).

I should also add in that a number of other various commands seem to no longer be working. These include the main page columns commands.

-Karl

83.135.228.180 (talkcontribs)

Hi Karl,

the if statements you are speaking about most likely are provided by the Extension:ParserFunctions. You can visit the wiki page Special:Version in your wiki to see, if this extension currently is installed. If it already ''was'' installed: What is it that is broken about the conditions?

KMjolnir (talkcontribs)

Doesn't appear to be on there. I guess I'll give it a shot and see if it fixes. Thanks!

Edit: It appears in the file lists when I went to install it, but not on the version page. Huh. Figured it out. It was installed, but not activated. Which is curious, because unless it installed with the mediawiki installation, a ghost did it.

So, good news... and bad news. The IF statements are fixed! Yay, that's good. That's a whole lot of progress. The columns, however, remain non-functional.

-Karl

Reply to "Broken Features?"

Warnings after Migrating from MySql to sqlite3

2
Cbo0485 (talkcontribs)

Due to reasons out of my control I had to move my instance of mediawiki from mysql to sqlite3.

New Version Info:

MW 1.25.1

php 5.6.9 (apache2handler)

SQLite 3.8.8.3 with full-text search support

In doing so it went pretty smooth, I followed the basic directions found at:

http://www.linuxintro.org/wiki/Migrating_mediawiki_from_mysql_to_sqlite

As far as I can tell all the functionality is working. I can browse from page to page, viewing images works, creating new pages works, modifying existing pages works. But on every page I have the following at the top of the page:

Notice: unserialize(): Error at offset 65 of 6279 bytes in /opt/apps/asa/apache/asaSite/htdocs/wiki/includes/cache/LocalisationCache.php on line 1161

Warning: Invalid argument supplied for foreach() in /opt/apps/asa/apache/asaSite/htdocs/wiki/includes/cache/LocalisationCache.php on line 411

This also shows up when trying to add an image to a page when using the WYSIWYG editor. Images do still work though, b/c if I switch over to the Source portion in WYSIWYG, and type in the mediawiki syntax to add an image, the image shows up on the page.

83.135.228.180 (talkcontribs)

Since the localization cache only is a cache, I would try emptying it. I guess you can delete the cache files in folder htdocs/wiki/cache/ and also, as far as there are contents in the database table Manual:L10n cache table, you should be able to clean this table as well.

The maintenance script Manual:RebuildLocalisationCache.php can be used to rebuild the cache.

Manual:LocalisationCache might provide a somewhat deeper insight.

Reply to "Warnings after Migrating from MySql to sqlite3"

I have just downloaded mediawiki - but no commons file in skins?

6
MiloDenn (talkcontribs)

I have just downloaded mediawiki - but no commons file in skins? I was wondering if I had done something wrong, or if I was meant to create it myself. At the moment the skins file has only the four basic skins in it. Thanks very much, Milo

MiloDenn (talkcontribs)

Also, how can I make myself an administrator

MiloDenn (talkcontribs)

I have since discovered I am a bureacrat. However for some reason I cannot access Special:UserRights

Reception123 (talkcontribs)

For userrights try Manual:CreateAndPromote.php .

DSquirrelGM (talkcontribs)

Common.css will not normally have style rules included, since the skins' css files are entirely separate. You use the Common files for anything you wish to be shared between all of the skins, but there are no entries by default.

83.135.228.180 (talkcontribs)

See Manual:Interface/Stylesheets!

Reply to "I have just downloaded mediawiki - but no commons file in skins?"