Jump to content

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 fix Internal Error?

5
78.209.246.193 (talkcontribs)

When I try to open Wikimedia this message appars:

[9a7a530ffee42ede2f9cab4b] 2024-08-16 18:19:59: Fatal exception of type Wikimedia\Rdbms\DBQueryError

What should I do?

Please keep in mind I'm a newbie who's extremely unfamiliar with this kind of programs

Pppery (talkcontribs)

Wait for the problem to resolve itself in a few minutes. These sporadic outages have been a feature lately and there's nothing anyone can do.

151.46.26.180 (talkcontribs)

It's been two days now and no resolve.

If there's nothing I can do, can I export the MediaWiki data into another XAMPP setting on another computer?

Bawolff (talkcontribs)

Hi, i think people got confused because you said wikimedia not mediawiki.


If this is your own wiki, please set $wgShowExceptionDetails = true; in LocalSettings.php. This will make the error more detailed, which will help us tell you what to do.

151.18.88.219 (talkcontribs)

Hi Bawolff, sorry for the typo.

In my LocalSettings.php there's no $wgShowExceptionDetails, can I just add it at the bottom or do I need to install some plugin before?

Sorry but my knowledge on this program is nowhere close to yours =_=

Reply to "How to fix Internal Error?"

Error creating thumbnail: Unable to save thumbnail to destination

15
193.219.83.135 (talkcontribs)

Hello, I'm running Mediawiki 1.19.0 on IIS7 (win server 2008, php 5.4.3 and mysql 5.5.24) and it doesn't generate any thumbnail. I tried ImageMagick 6.6.7 and also GD version ($wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";) but I'm still getting this error. Full image works, but not thumbnail. There is granted all permissions to "images" folder (as uploading files works). Thank you.

Woozle (talkcontribs)

I'm having the same problem with MW 1.19.0 on Apache/MySQL/Ubuntu -- I just upgraded from 1.18.x. What's more annoying is that sometimes the thumbnails are actually there until I refresh the File page...

Woozle (talkcontribs)

[2024-08-16, MW 1.42.1]

Neither my solution below nor the $wgTmpDirectory solution someone else offered seem to work anymore.

Changing $wgTmpDirectory results in

RuntimeException: Could not open '<$wgTempDirectory contents>/mw-GlobalIdGenerator33-UUID-128'.

(...where by "<$wgTmpDirectory contents>" I mean the actual value of $wgTmpDirectory, not that literal string.)

...despite the fact that the directory given is writeable by the wiki's user.

I'm currently investigating, but I keep ending up in more jungle...

new info: Apache is running as the wrong user (www-data instead of the user assigned by the domain's .conf file).

Since this is a problem with the Apache configuration and not MediaWiki, I'd consider this issue re-resolved. (It would be nice if the maintenance folder included some kind of diagnostic tool for image issues; figuring out that wrong-user was the issue came only after hours of exploring other options.)

[2012-06-07, MW 1.19.0]

I dove into the code and figured it out. The exact problem may be different from server to server, but in my case the problem was occurring at this line in /includes/filerepo/backend/TempFSFile.php:

$newFileHandle = fopen( $path, 'x' );

The value of $path is partly based on the global wfTempDir() function, defined in /includes/GlobalFunctions.php. This function does several checks to find a good temp folder for creating images; on my system, it failed to find anything in the environment and was falling back to sys_get_temp_dir(), which told it to use "/tmp".

This should have been valid, because that folder is world-writable and there are in fact temp files there... but when I told fopen() to use a different path, it started working.

What I did was to explicly set, in LocalSettings.php, one of the environment variables to point to a temp directory I had created in my account space:

putenv('TMPDIR=/path/to/my/temp/folder');

After that, everything was happy again.

213.125.5.74 (talkcontribs)

/includes/filerepo/backend/TempFSFile.php seems to have moved, there is no /backend folder in /filerepo

C.C. Principalis (talkcontribs)

Looks like it's moved to /includes/filebackend/TempFSFile.php.

Also, Woozle's solution appears to have worked for me, as well.

Woozle (talkcontribs)

It would be nice if MW would report an error when it can't write to the folder it is using for temporary files. Should I file this as a bug report?

195.7.78.165 (talkcontribs)

I had a similar problem. Turned out that C:\Windows\Temp was not in open_basedir (set in php.ini). Found the problem by checking php-errors.log

62.198.242.174 (talkcontribs)

Put the absolute path to your tmp folder. Works like a charm

$wgTmpDirectory = "/home/username/mysitename.com/wiki/images/temp";

69.55.64.37 (talkcontribs)

I just ran across this problem as well while upgrading to 1.20.5. But I had this set in LocalSettings.php:

$wgTmpDirectory = "{$wgUploadDirectory}/tmp";

I solved it by commenting this line out completely. I assume I was trying to get around some prior bug. But now mediawiki finds the tmp directory without a problem. So my solution was to remove this (old) setting.

194.254.225.35 (talkcontribs)

Thanks !

223.205.216.166 (talkcontribs)

For me this settings in LocalSettings.php worked:

$wgEnableUploads = true;

$wgUseImageMagick = false;

$wgImageMagickConvertCommand = "/usr/bin/convert";

$wgTmpDirectory = "$IP/images/temp";

and create "temp" folder in /images

Seb35 (talkcontribs)

I also encountered this issue and removed the old setting. Thanks!

92.31.153.47 (talkcontribs)

No matter what I tried in LocalSettings.php, the temp directory which was being used was "$IP/images/tmp" (even when $wgTempDirectory was set to something else). I solved the problem by creating this directory and making it writable.

Razool (talkcontribs)

My issue was a little different.

After switching hosting services, I could see the images thumbnails uploaded from old server but not those uploaded on the new one

On those not displayed was getting the error Unable to save thumbnail to destination

After I tried everything I could find on google

  • Setting in LocalSettings.php:
    • $wgTmpDirectory = "$IP/images/temp";
    • putenv('TMPDIR=/var/www/www.example.com/image');
    • $wgShellLocale = "en_US.UTF-8";
    • $wgUseImageMagick = false;
  • Issue with GD on CentOS: yum install gd gd-devel php-gd
  • Permissions chmod 777 on image folder

I fixed the issue by editing the affected pages wihtout doing any changes and saving

Even if it seems dumb... I think the permissions had something to do with this also

Reply to "Error creating thumbnail: Unable to save thumbnail to destination"

Upgrade error regarding OAUth database

2
TolimMcLugen (talkcontribs)

Hi,

I am upgrading mediawiki from 1.33.1 to 1.42.1. I used a 1.35 version to upgrade DB without error. But now I get an error logging in

[eb40b7f6f59133a091c0fa4a] /index.php/Speciale:Entra Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see <nowiki>https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading</nowiki> and <nowiki>https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug</nowiki> for more information.

Error 1146: Table 'my_wiki.oathauth_devices' doesn't exist

Function: MediaWiki\Extension\OATHAuth\OATHUserRepository::loadKeysFromDatabase

Query: SELECT oad_id,oad_data,oat_name FROM `oathauth_devices` JOIN `oathauth_types` ON ((oat_id = oad_type)) WHERE oad_user = 1

So i tried the web-version of the upgrader. and I get this error.

Running /var/www/html/mediawiki/extensions/OATHAuth/maintenance/UpdateForMultipleDevicesSupport.php...

An error occurred:

Error 1049: Unknown database 'virtual'

Function: Wikimedia\Rdbms\DatabaseMySQL::doSelectDomain

Query: USE `virtual`

Any clue? I think that the upgrading script it's getting stucked in that part. Oauth is not something I need I think

Bawolff (talkcontribs)

Multiple people have reported this, however we are having trouble seeing the error ourselves and haven't been able to figure out the cause. If there is anything special about your install please let us know.

Yes, a work around is to disable the oathAuth extension if you dont need 2fa.

Reply to "Upgrade error regarding OAUth database"
Cieptak (talkcontribs)

Hi, I don't see any images that were previously uploaded to the server. Previously added images work on mediawiki pages, I can also add new images, but they don't appear in the list of images. What could be wrong?

Your recent uploads

No results found.

What i can see on my screen:https://i.ibb.co/SxLxVPn/image.png

Bawolff (talkcontribs)

Are they listed on the page named Special:newfiles ?

Cieptak (talkcontribs)
Cieptak (talkcontribs)

+1

Reply to "Insert Imeges"

MediaWiki 'Call to undefined method MediaWiki\Status\Status::getMessages()' Error

1
ACR user (talkcontribs)

Hello,

I encountered the following error when trying to perform a search in MediaWiki: Call to undefined method MediaWiki\Status\Status::getMessages().

To address this issue, I downgraded my Elasticsearch version from 8.15 to 7.10 due to compatibility problems, but the error persists. The other plugins and versions I’m using are up to date. I would appreciate any guidance on what steps I should take to resolve this issue.

  • MediaWiki: 1.42.1
  • PHP: 8.3.10 (apache2handler)
  • MySQL: 8.0.39-0ubuntu0.20.04.1
  • Elasticsearch: 7.10.2
  • CirrusSearch: (9fb5319) as of 21:05, 12 August 2024 (GPL-2.0-or-later)
  • Elastica: 6.2.0 (16d61af) as of 07:45, 11 August 2024 (GPL-2.0-or-later)
Reply to "MediaWiki 'Call to undefined method MediaWiki\Status\Status::getMessages()' Error"

Make a div into a clickable link

5
202.36.179.105 (talkcontribs)

Hi, I'm new to html, so maybe this is obvious, but how do I turn a div element, created by editing the main page, into a clickable link in its entirety. I have various pictures with text set in div boxes, I want the picture and the text (the whole div box) to link to a specific page on my wiki. a href doesn't work, onClick also appears to not work. Any ideas appreciated.

Bawolff (talkcontribs)

Generally you cannot make divs clickable elements in base mediawiki. The best you can do in default mediawiki is make all the text a link, and also make the image be linked to the page in question (See help:Images). Anything more than that would require custom javascript.

112.213.46.198 (talkcontribs)

Ok, cheers for the reply. But just to be clear (that I'm not doing it wrong) is also disabled in base mediawiki? Or do I need to define a function for the above in common.js?

TheDJ (talkcontribs)

Indeed, you cannot do that. You can only add a javascript function in common.js, which after page load, looks up an element and attaches a click handler. Anything else would be a huge security problem.

202.36.179.105 (talkcontribs)

Cheers, enough to go on!

Reply to "Make a div into a clickable link"

problem of div float box horizontal alignment

3
Summary by Wladek92

corrected, thanks.

Wladek92 (talkcontribs)
Bawolff (talkcontribs)
Wladek92 (talkcontribs)

bingo! yes it is ok now.

self-signed certificate in certificate chain

4
Waterlooglass (talkcontribs)

When trying to spin up my instance of mediawiki, I'm suddenly getting this error. can anyone assist?

ERROR 2026 (HY000): TLS/SSL error: self-signed certificate in certificate chain


We recently upgraded our RDS db, is this related?

Bawolff (talkcontribs)

You might have to adjust the config of your db server to use a known certificate, or adjust config on MW end to set the list of CAs allowed (sslCertPath, sslCAPath, etc).

You could also try setting $wgDBssl = false if you don't care about SSL.

Waterlooglass (talkcontribs)

Thanks! When you say adjust config on MW end, is that within the LocalSettings.php? Is there documentation example that exists for that?

Bawolff (talkcontribs)

This is basically undocumented, but yes in LocalSettings.php

But essentially - there are some extra ssl parameters mentioned at https://doc.wikimedia.org/mediawiki-core/master/php/classWikimedia_1_1Rdbms_1_1DatabaseMySQL.html#a83ae8bbdfd124d7805f1e91f12067f79 including sslKeyPath, sslCertPath, sslCAFile, sslCAPath, sslCiphers that can customize how SSL is used. These can be specified when doing an advanced configuration of the databases via $wgDBservers (or potentially $wgLBFactoryConf if using that)

Reply to "self-signed certificate in certificate chain"

UPDATING THE IMAGE POSITION RANDOMLY

3
Bmanir00801 (talkcontribs)

Hi Everyone, I am a beginner in using of MediWiki page, I have a problem in creating a collage images, where I am thinking to insert the pictures in certain manner, as show in the image, But I could only place the images either Totally horizontal or Vertical , but not like where ever i wanted to. If i want to do something like that, can you help me how can i do this ?

your support would be really helpful for me !

Malyacko (talkcontribs)
Bawolff (talkcontribs)
Reply to "UPDATING THE IMAGE POSITION RANDOMLY"

{{REVISIONUSER}} updates after saving without changes

3
DonnyPro (talkcontribs)

I am working on a basic template that displays the latest editor of a page at the top of the article. Something like "This page was last edited by ...". I have noticed that when you open the edit window and then save without making any changes, REVISIONSUSER updates, even though there is no log in the revision history. I find this very confusing and stops the template from working as intended. Is there a way to make REVISIONSUSER only accept actual edits?

Thanks in advance for any help.

DonnyPro (talkcontribs)

I just found out that purging the page's cache (using &action=purge in the URL) fixes it. This is still not ideal in my opinion.

Bawolff (talkcontribs)

Hmm, interesting. We generally call that type of edit a "null" edit. I wasn't able to reproduce this on my local setup. Does it still happen on latest mediawiki with no extensions?

There is a complex code path to preemptively guess the correct value for revision variables and then retry if the guess is wrong, so its entirely plausible there is a bug somewhere in there. There was a previous somewhat similar bug back in 2016: phab:T135261 but it has since been fixed.

Reply to "{{REVISIONUSER}} updates after saving without changes"