Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  4. To start a new thread, click the box with the text "Start a new topic".

How to disable caching for files for good?

5
Kghbln (talkcontribs)

On a wiki, I have the problem that uploaded new versions of existing files are not directly updated on pages linking them. If I click on a link, I get the previously uploaded version of the file. These are mainly PDF files, so no thumbnailing is involved if this matters.

LocalSettings.php
$wgMainCacheType = CACHE_MEMCACHED;
$wgParserCacheType = CACHE_NONE;
$wgSessionCacheType = CACHE_DB;
$wgMessageCacheType = CACHE_MEMCACHED;
$wgMemCachedServers = [
      '127.0.0.1:11211'
];

$wgCachePages = false;
$wgUseLocalMessageCache = true;
$wgEnableParserCache = false;

$wgGenerateThumbnailOnParse = false;
VitualHost
<IfModule mod_headers.c>
	<filesMatch ".(pdf|odt|ott|doc|docx|dot|ods|ots|xls|xlsm|xlsx|xlt|odp|otp|ppt|pptx|pot|svg|jpg|jpeg|png|gif)$">
		Header set Cache-Control "no-cache, no-store, must-revalidate"
		Header set Pragma "no-cache"
		Header set Expires 0
	</filesMatch>
	...
</IfModule>

The issue persists. I suspect that I also need to set the main cache to $wgMainCacheType = CACHE_NONE; and forget about the message cache.

Perhaps there is something else I am missing?

TheDJ (talkcontribs)

There is no cache for this that is part of your localsettings.

Your webserver configuration is only disabling the cache for files which are served from disk. If they still need to be generated (by a 404 handler, or if they are always provided by thumb.php, then your filesMatch won't do anything, as they are not files. They are files streamed though a php script in that case.

Kghbln (talkcontribs)

To rephrase your reply since I am not sure if I understand correctly:

I need to set up a working 404 handler to prevent file caching? From what I posted, you cannot see if it is set up properly.

In this case, I can provide specific information:

LocalSettings.php

$wgGenerateThumbnailOnParse = false;
$wgThumbnailScriptPath = "$wgScriptPath/thumb.php";

Virtual Host

<Directory /path/to/wiki/>
    AuthType Basic
    AuthName "Access to my wiki"
    AuthUserFile "/var/htfiles/.htpasswd"
    <RequireAny>
        Require valid-user
        Require ip 127.0.0.1
        Require ip 82.202.93.130
        Require ip 86.34.125.129
    </RequireAny>
</Directory>

<Directory /path/to/wiki/images/>
    AllowOverride None
    AddType text/plain .html .htm .phtml .shtml .lua .php .pl .py .rb .sh
    php_flag engine off
</Directory>

# Exclude thumb.php from authentication
<Files "thumb.php">
    Satisfy Any
    Allow from all
</Files>

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^/?p(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
    RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L]

    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
    RewriteRule ^/?w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2 [L,QSA,B]

    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
    RewriteRule ^/?w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
</IfModule>

My second interpretation is to remove the existing thumb handling by setting wgGenerateThumbnailOnParse = true;

Ultimately, I want to provide the most recent version of an uploaded file no matter what.

TheDJ (talkcontribs)

> I need to set up a working 404 handler to prevent file caching?

No, I wasn't sure what setup you are running and indicating that what you have configured SO FAR

OK, so you are using thumb.php. In that case, you should see in your browser that all requests for images are of the form https://commons.wikimedia.org/w/thumb.php?f=Example.png&w=600&p=206

You'll want to modify the <Files "thumb.php"> block to add headers that disable the cache.

Bawolff (talkcontribs)

I would also suggest checking your browsers network tab to verify that all the headers are being set, and what caching behaviour is actually taking place (e.g. verify there isnt incorrect 304 responses or something)

Reply to "How to disable caching for files for good?"

How to request a page deletion

1
185.63.15.34 (talkcontribs)

I created this page (Manual:Tlb) by mistake (thought I was local on my mediawiki installation). Please delete it permanently.

Reply to "How to request a page deletion"

Synology & Visual Editor

10
Roycruse (talkcontribs)

Hi,

Ive installed the Mediawiki Package from synology on my Synology NAS.

Its Version 1.35.5-1050

The Visual Editor extension is included in this version and after reading this page Extension:VisualEditor#Installation it would appear that for basic operation there should be no further config required.

However i see no VisualEditor when i try to edit a page. Can anyone help me with diagnosing the problem - i contacted Synology Support and they just sent me here.

TheDJ (talkcontribs)

We do not provide support for Synology. We are unfamiliar with their packaging and setup, they choose to include it, they are a commercial company, they provide the service.

Philipteyssier (talkcontribs)

I had the same problem. When you set up Mediawiki, as part of its installation, on your Synology, make sure you click the options that engage VisualEditor. Then if the VE returns an error when you try to save the edited page, it means that there is another option which as to be set. For this go to: MainMenu (the four little boxes in the left corner of the Synology screen) / Web Station / on the left screen, click </> Script Language Settings / click MediaWiki and click Edit / click Extensions then at the very bottom of the list, click the zlib box.

219.104.86.69 (talkcontribs)

Works like a charm! Thanks a lot for the hint!


DSM 7.2

MediaWiki 1.39

Alex.barbaron (talkcontribs)
TheDJ (talkcontribs)
95.208.248.249 (talkcontribs)

Hey @Philipteyssier thank your for your reply!

I have the same issue as Roycruse.

I followed your instructions to enable the zlib extension for wikimedia in the web station. Unfortunately I still get the following error when trying to edit a page with the visual editor:

Error contacting the Parsoid/RESTBase server: (curl error: 6) Error

I restarted the web station and wikimedia, but the error remains.

Do you habe any other suggestions to fix the issue? Thanks!

Apple2207

87.158.65.44 (talkcontribs)

Hey @Philipteyssier,


thank you for your answer which solved my problem. now I can save my articles just as expected.

Decu

TheDJ (talkcontribs)
178.25.172.77 (talkcontribs)

This solved my Problem too. Thanks a lot.

Reply to "Synology & Visual Editor"

Why I can not regist to https://vi.wikipedia.org/

2
DellosCao (talkcontribs)

I need support to know that is it Create an account on https://vi.wikipedia.org/ system still working ?

After successfully registering with the user name pass and email it redirects to the notification page which notices that I can not edit other pages yet until some date point. it is fine but how about login to the created account? There is no email verification or something else. I tried to log in using the saved Username and password but failed.

Bawolff (talkcontribs)

You logged in here, and we use the same account system as vi.wikipedia.org

Reply to "Why I can not regist to https://vi.wikipedia.org/"
RrabadanPEI (talkcontribs)

Hello whomever is out there i signed into my free phone account and ended up here what am i suppose to learn out here

Wladek92 (talkcontribs)

nothing common here with telephone fees! which links have you followed ?

Bawolff (talkcontribs)

No idea, but it sounds like you are in the wrong place.

Reply to "Why am i here?"

MediaWiki:GlobalBlock Extension

2
Nexovia (talkcontribs)

Hello, I have followed all instruction as tolded in Extension:GlobalBlocking but when after I added the wfLoadExtension and entered my wiki it says the following error whats the solution of this

Database error

A database query error has occurred. This may indicate a bug in the software.

[ZpeOYZ36VsF47Yx6zkYYuwAAAAs] 2024-07-17 09:26:58: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

Bawolff (talkcontribs)

As a first step, set $wgShowExceptionDetails = true; in LocalSettings.php

Did you create all the appropriate database tables in the appropriate databases?

Reply to "MediaWiki:GlobalBlock Extension"

Edit preview not working

3
Seaniekaye (talkcontribs)

jfwiki.org

I upgraded to 1.42 yesterday and the page preview after editing is not working with the error:

Exception caught: Call to undefined method MediaWiki\Parser\ParserOutput::getCategories()

I am using PageInCat 3.0.0

The error log has many of these:

[Wed Jul 17 07:37:42.163289 2024] [fcgid:warn] [pid 1846434:tid 120972091238144] [remote 47.128.55.96:14690] mod_fcgid: stderr: PHP Deprecated:  Use of MediaWiki\\Parser\\Parser::$pageInCat_cache was deprecated in MediaWiki 1.42. [Called from PageInCat::onClearState in /home/jfwiki/wiki142/extensions/PageInCat/src/PageInCat.php at line 174] in /home/jfwiki/wiki142/includes/debug/MWDebug.php on line 379

[Wed Jul 17 07:37:42.163349 2024] [fcgid:warn] [pid 1846434:tid 120972091238144] [remote 47.128.55.96:14690] mod_fcgid: stderr: PHP Deprecated:  Use of MediaWiki\\Parser\\Parser::$pageInCat_onlyCache was deprecated in MediaWiki 1.42. [Called from PageInCat::onClearState in /home/jfwiki/wiki142/extensions/PageInCat/src/PageInCat.php at line 175] in /home/jfwiki/wiki142/includes/debug/MWDebug.php on line 379

[Wed Jul 17 07:37:42.490267 2024] [fcgid:warn] [pid 1846434:tid 120972091238144] [remote 47.128.55.96:14690] mod_fcgid: stderr: PHP Deprecated:  Use of wfGetDB was deprecated in MediaWiki 1.39. [Called from PageInCat::inCatCheckDb in /home/jfwiki/wiki142/extensions/PageInCat/src/PageInCat.php at line 143] in /home/jfwiki/wiki142/includes/debug/MWDebug.php on line 379

_________


Thank you

Sean

TheDJ (talkcontribs)

PageInCat is not up to date for 1.42 yet it seems. You should either fix the extension and update it, or you can suppress deprecation warnings for php (should always be disabled for production) in your php.ini.

Bawolff (talkcontribs)

Oh, that is my extension. Guess i should fix it.

Reply to "Edit preview not working"

Account creation & renaming errors

4
Seaniekaye (talkcontribs)

Version 1.39.3

https://jfwiki.org

I am not able to create new accounts, I get the error:

"An account creation for this username is already in progress. Please wait."

Changing the username makes no difference.

Using createAndPromote from the command line returns the same error.

I attempted to rename a user w/ Special:RenameUser resulting in this error:

Internal error

[ZpVjTbzkAommjGxmWP@BlwAAQJE] /index.php?title=Special:RenameUser Error: Call to undefined method User::isCreatableName()

Backtrace:

from /home/jfwiki/wiki139/extensions/Renameuser/includes/SpecialRenameuser.php(251)#0 /home/jfwiki/wiki139/includes/specialpage/SpecialPage.php(701): SpecialRenameuser->execute(NULL)#1 /home/jfwiki/wiki139/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(NULL)#2 /home/jfwiki/wiki139/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)#3 /home/jfwiki/wiki139/includes/MediaWiki.php(904): MediaWiki->performRequest()#4 /home/jfwiki/wiki139/includes/MediaWiki.php(562): MediaWiki->main()#5 /home/jfwiki/wiki139/index.php(50): MediaWiki->run()#6 /home/jfwiki/wiki139/index.php(46): wfIndexMain()#7 {main}

___________________________________________

What's up with isCreatableName?

I updated from WM 1.35 to 1.39.3 a year ago and I haven't tried to create a user since, so this likely happened during the update.

Error reporting is showing this, I'm not sure that it's relevant:

Deprecated

: Use of $wgUser was deprecated in MediaWiki 1.35. [Called from VectorHooks::makeGlobalVariablesScript in /home/jfwiki/wiki139/extensions/Vector/Vector.hooks.php at line 186] in

/home/jfwiki/wiki139/includes/debug/MWDebug.php

on line

381

Deprecated

: Use of User::getOption was deprecated in MediaWiki 1.35. [Called from StubObject::_call in /home/jfwiki/wiki139/includes/StubObject.php at line 120] in

/home/jfwiki/wiki139/includes/debug/MWDebug.php

on line

381

Deprecated

: $wgUser reassignment detected [Called from VectorHooks::makeGlobalVariablesScript in /home/jfwiki/wiki139/extensions/Vector/Vector.hooks.php at line 186] in

/home/jfwiki/wiki139/includes/debug/MWDebug.php

on line

381

_____________________________________________________

I have enabled Create Account in case you'd like to see it:

https://jfwiki.org/index.php?title=Special:CreateAccount&returnto=Main+Page

Thank you for any help

Sean

Bawolff (talkcontribs)

It sounds like you are trying to use MW 1.35 extensions with MediaWiki 1.39. Try and ensure that all extensions have also been upgraded to the appropriate version.

Of special note - RenameUser extension functionality is now in MediaWiki core. The extension cannot be used with newer versions of MediaWiki and must be removed on mediawiki 1.39.

Seaniekaye (talkcontribs)

Brian, you have saved me so many hours over the years. This worked. Thank you so much for your help.

Bawolff (talkcontribs)

You're welcome. Glad it worked.

Reply to "Account creation & renaming errors"

1.42 breaks remote authentication

2
Cfschulte 314 (talkcontribs)

I have been using the PluggableAuth and Shibboleth extensions for account creation and logins for a while. Shibboleth has not been updated for a while so I switched to the Auth_remoteuser extension, which has been working very well.

Authentication with those broke when I tried to upgrade to MediaWiki 1.42.0. As an experiment on a development platform, I created two stripped down wikis called fix142 using MW 1.42 and check141 using MW 1.41. The 1.41 MW works perfectly. It creates accounts and logs users in. Access is controlled by SAML.

MW 1.42 gives me this:

MediaWiki is unable to load the extension Auth_remoteuser. Please check that the extension's name is correct and all of its files are properly installed.

Details:

Error reading /var/www/html/fix142/extensions/Auth_remoteuser/extension.json. filemtime(): stat failed for /var/www/html/fix142/extensions/Auth_remoteuser/extension.json.

#0 /var/www/html/fix142/includes/GlobalFunctions.php(53): ExtensionRegistry->queue()
#1 /var/www/html/fix142/LocalSettings.php(151): wfLoadExtension()
#2 /var/www/html/fix142/includes/Setup.php(215): require_once('...')
#3 /var/www/html/fix142/includes/WebStart.php(85): require_once('...')
#4 /var/www/html/fix142/index.php(50): require('...')
#5 {main}

Any ideas?

Thanks,

Chris

TheDJ (talkcontribs)

> filemtime(): stat failed

that generally means the file is not at that location, or not readable from that location (permissions or owner issue).

Reply to "1.42 breaks remote authentication"

wrong indentation after a : {{intl|

2
Wladek92 (talkcontribs)

how to reestablish correct indentation on translated page at Step 7 in -> https://www.mediawiki.org/wiki/Help:Growth/Tools/Add_a_link/fr#Comment_ajouter_des_liens after the message -> https://translatewiki.net/wiki/MediaWiki:Growthexperiments-addlink-onboarding-content-linking-guidelines-body/fr has been transcluded ?

':' seems to be disturbed by the 'li' but on other side indentation is correct on the EN page -> https://www.mediawiki.org/wiki/Help:Growth/Tools/Add_a_link#How_to_add_links,

so what is wrong ? Thanks. -- Christian 🇫🇷 FR ⛹🏽 Paris 2024🗼 (talk) 07:49, 17 July 2024 (UTC)

Wladek92 (talkcontribs)
Reply to "wrong indentation after a : {{intl|"