Project:Support desk

Jump to navigation Jump to search

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(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 versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. 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.
  3. To start a new thread, click "Start a new topic".
Bseutin (talkcontribs)

Hello


A bunch of pages with random content have been created on my wiki website.

I run MediaWiki 1.35.0. I suppose it is an unstable an unsecured version ? I should upgrade to 1.37 ?

And how to delete these pages ? Go into database through phpmyadmin ?


Thanks a lot

Bawolff (talkcontribs)

Manual:Spam


This is not hacking if you configured your website to allow anyone on the internet to edit, and then some people did.

Bseutin (talkcontribs)

No, only registered people can edit. And the content is random.

Malyacko (talkcontribs)

(Yes, 1.35.0 is ancient and outdated. Please keep software updated.)

Bseutin (talkcontribs)

Any idea to purge quickly unwanted content ? There is almost 1000 pages.

AhmadF.Cheema (talkcontribs)

Have your tried the Extension:Nuke mentioned in the above provided link?

Ciencia Al Poder (talkcontribs)

Note that sometimes hacking happens because people leave the old installation path still accessible from the Internet, when upgrading mediawiki (for example, at /wiki_old/ and somehow spambots and hackers know about that URL, which probably contains the real vulnerabilities and not the 1.35 version (which is still supported if you use 1.35.5)

Reply to "Site hacked"
Misshiller (talkcontribs)

Hi all!

Can someone please provide an EASY way to import .docx? I have approx. 500 pages exported from Nuclino.com, and I'm looking for a way to import it to MediaWiki without copy/paste and without tech knowledge. Any help will be greatly appreciated.

AhmadF.Cheema (talkcontribs)

See Topic:Tvu92lq4019vvuck. This is probably the best we have at the moment; unfortunately, there doesn't appear to be the convenient solution that you're looking for. It would've been somewhat easier if the pages could be exported as HTML form nuclino.com.

Misshiller (talkcontribs)

Thank you.

How to show a little file thumbnail image, for a download?

8
RedKnight7 (talkcontribs)

I want to post an Excel and a PDF for folks to download from my tiny wiki. I can make hotlinked text for users to click on and download the Excel or the PDF, using a Media: link. But I would like to do this with a generic little Excel thumbnail image or a generic little PDF thumbnail image for the user to click on, instead of text saying "here's the Excel", etc.

I imagine this is pretty easy but I don't know what keyword to search on, to find out how to do it.

Also, would I have to make or supply my own little Excel and PDF images, to use for this?

Ciencia Al Poder (talkcontribs)

The easy way is to upload a thumbnail of the Excel/PDF to your wiki, and then make the thumbnail link to the download.

Example:

[[File:ExcelThumbnail.png|80px|link=Media:My excel file.xlsx|Download]]

You can even put that code inside a template, making the link= value a parameter, for easy usage.

RedKnight7 (talkcontribs)

Thanks very much! It all works okay except if I put something like:

[[File:Excel_icon.gif|80px|link=Media:Spreadsheet_data.xlsx|right| Excel of electricity by month]]

It does everything else right (showing a linked icon on right side of page), but there are two problems:

1) If you click on the image , it doesn't go directly to the "download xls to where?" popup, instead it goes to the actual File: page for that file on my wiki. And then the person has to go through a few more clicks to actually download it.

2) It does not show the caption text "Excel of electricity by month" at all.

Thanks so much if you can help. Coding is such a hassle, laugh.

I have MediaWiki 1.35.1

Ciencia Al Poder (talkcontribs)

Oh, well, looks like we've hit bug phab:T18409.

You may try to change the link Media:Spreadsheet_data.xlsx to Special:FilePath/Spreadsheet_data.xlsx

If you want to display a caption, add |thumb|

Jonathan3 (talkcontribs)

I was just working this out yesterday (using images as links) and came across the same problem - it links to the File: page instead of the actual uploaded file.

Anyway, you want something like this in your template, where {{{Download|}}} is the filename and {{{Caption|}}} is the caption text:

[[File:{{{Download}}} | thumb | link={{SERVER}}/media/{{urlencode:{{{Download}}}|WIKI}} | {{{Caption|}}} ]]

If your URL structure has /images/ (I think I changed mine a few years ago but can't remember) then just change that part of the line above. {{SERVER}} should turn into (e.g.) https://www.example.com, or alternatively you can just put the URL into the template if it's never going to change. {{urlencode:...|WIKI}} changes spaces to underscores (so that the link will work) etc.

With the caption problem, some methods of displaying images just don't show the caption. It's all here: Help:Images. If you use |frame or |thumb (as Ciencia said) the caption will show up.

RedKnight7 (talkcontribs)

Thank you everyone, It was hard for me to read the {{{}}} stuff. So if it helps any, this is what worked for me:

[[File:Excel_icon.gif|150px|left|link=http://YourWebsiteName.com/wiki/images/1/15/Your_Great_Spreadsheet.xlsx|thumb|Spreadsheet of electricity usage by month]] 

Problem solved. Love you folks. Ciencia, you've been helping for years!

Bawolff (talkcontribs)
RedKnight7 (talkcontribs)

UPDATE: Problem solved! I just needed to put a colon in front of File: (like :File:) in order to have a link to the file's page, not the file itself. More info at Help:Linking_to_files.

Hi everyone, thanks for your help 8 months ago... a new wrinkle on this, please?

I want to show, e.g., an Excel icon for a spreadsheet download, and have it directly start the download. Okay, this was handled just fine, above.

But now I also want to have, in the description of the thumbnail, a link to the wiki page for that file - so someone can back up and get a previous version if they want. Or if they have any trouble with the direct download link associated with the Excel icon.

The thumbnail description my example above is

Spreadsheet of electricity usage by month

I want to change this to say

Spreadsheet of electricity usage by month. Click on the icon to download the Excel, or click here to go to its file page.

(or something like that).

For the underlined part, if I try putting:

[[File:Your_Great_Spreadsheet.xlsx | click here to go to its file page]]

it only shows File:Your_Great_Spreadsheet.xlsx, and not the text.

If I use Media: instead of File:, it shows the text, but it just directly downloads the Excel - it doesn't take you to the Excel file's wiki page.

Edit: I also tried not having either File: or Media:, but then it just thinks Your_Great_Spreadsheet.xlsx is a new (blank) page (it shows the thumbnail text using the red URL coloring).

How can I get this to work right?

Keep in mind that it' all being wrapped in the outer [[ ... ]] for the image and thumbnail, too.

Error with ImagePreview after update

7
Mattes1002 (talkcontribs)

I upgraded my Mediawiki Installation from 1.24 to 1.31.

After the update I see the message: "Fehler beim Erstellen des Vorschaubildes: Datei mit Abmessungen größer als 12,5 MP"

It means: the is an error at generating a preview image. The size of the image is larger than 12,5 MP

When I google around... the message is present in a lot of mediawiki installation around :)

An Example http://wiki.oevsv.at/index.php?title=Datei:Oe5eep_2.jpg

Could someone help me out?

Mattes1002 (talkcontribs)

I solved it!

I installed imagemagick on my Ubuntu 18 with

sudo apt install  imagemagick-6-common

and set imagemagick in the LocalSettings.php to

$wgUseImageMagick = true;

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

X-Savitar (talkcontribs)

Glad to know that your issue was resolved! :)

Alfredo1066 (talkcontribs)

3,456 * 5,184 = 17,915,904

If on windows, use Irfanview (ctrl-R) to downsize your image.

87.78.22.207 (talkcontribs)

The Error occured in my installation with ImageMagick activated like described in LocalSettings.php.


MediaWiki 1.29.1 and imagemagick 6.9.7.4 in Debian 9.12

147.87.243.156 (talkcontribs)

Same here. I still get: "Fehler beim Erstellen des Vorschaubildes: Datei mit Abmessungen größer als 12,5 MP"


my configuration is a follows:

MediaWiki 1.35, Linux CentOS 7 (checked with hostnamectl), ImageMagick 6.9.11-29 (checked with /usr/bin/convert --version)


$wgEnableUploads = true;

$wgUseImageMagick = true;

$wgMediaViewerOnClick = true;

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

Simpsonspedia.net (talkcontribs)
Buster2223 (talkcontribs)

Do you have any advice about the Log4j security issues?

Bawolff (talkcontribs)

Mediawiki does not use java so is not vulnerable.

However some extensions may use java components. You should make sure they and everything they use is up to date. In particular if using the CirrusSearch extension, make sure elasticsearch is up to date.

Buster2223 (talkcontribs)

Thank you. I did not know that about CirrusSearch. Do we have a list somewhere of extensions that use Java?

Bawolff (talkcontribs)

The only other thing that comes to mind is if you're using wikibase and setting up blazegraph for querying.

Some of the other less popular search extensions also use java.


Java is pretty unpopular in mediawiki extensions because most are php. I'm not aware of any list.

213.60.68.92 (talkcontribs)

I cannot access the wiki and I am getting this message. No clue what I should do or where to look. Can anyone help?

MediaWiki internal error.

Original exception: [a09cc71b0df637d8fef9c0cc] /mediawiki/index.php/P%C3%A1gina_principal Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'root'@'localhost' (using password: NO) (localhost) (localhost)

Backtrace:

from C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1513)

#0 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(991): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(963): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1128): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)

#3 C:\xampp\htdocs\mediawiki\includes\GlobalFunctions.php(2229): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)

#4 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LCStoreDB.php(57): wfGetDB(integer)

#5 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(448): LCStoreDB->get(string, string)

#6 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(494): LocalisationCache->isExpired(string)

#7 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(370): LocalisationCache->initLanguage(string)

#8 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(311): LocalisationCache->loadItem(string, string)

#9 C:\xampp\htdocs\mediawiki\includes\language\LanguageFallback.php(106): LocalisationCache->getItem(string, string)

#10 C:\xampp\htdocs\mediawiki\includes\language\LanguageFactory.php(158): MediaWiki\Languages\LanguageFallback->getAll(string)

#11 C:\xampp\htdocs\mediawiki\includes\language\LanguageFactory.php(116): MediaWiki\Languages\LanguageFactory->newFromCode(string)

#12 C:\xampp\htdocs\mediawiki\includes\ServiceWiring.php(380): MediaWiki\Languages\LanguageFactory->getLanguage(string)

#13 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#14 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#15 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(279): Wikimedia\Services\ServiceContainer->getService(string)

#16 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(801): MediaWiki\MediaWikiServices->getService(string)

#17 C:\xampp\htdocs\mediawiki\includes\ServiceWiring.php(1712): MediaWiki\MediaWikiServices->getContentLanguage()

#18 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#19 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#20 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(279): Wikimedia\Services\ServiceContainer->getService(string)

#21 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(1688): MediaWiki\MediaWikiServices->getService(string)

#22 C:\xampp\htdocs\mediawiki\includes\session\SessionManager.php(229): MediaWiki\MediaWikiServices->getUserNameUtils()

#23 C:\xampp\htdocs\mediawiki\includes\session\SessionManager.php(135): MediaWiki\Session\SessionManager->__construct()

#24 C:\xampp\htdocs\mediawiki\includes\Setup.php(762): MediaWiki\Session\SessionManager::singleton()

#25 C:\xampp\htdocs\mediawiki\includes\WebStart.php(90): require_once(string)

#26 C:\xampp\htdocs\mediawiki\index.php(44): require(string)

#27 {main}

Exception caught inside exception handler: [a09cc71b0df637d8fef9c0cc] /mediawiki/index.php/P%C3%A1gina_principal Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'root'@'localhost' (using password: NO) (localhost) (localhost)

Backtrace:

from C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1513)

#0 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(991): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(963): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1128): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)

#3 C:\xampp\htdocs\mediawiki\includes\GlobalFunctions.php(2229): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)

#4 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LCStoreDB.php(57): wfGetDB(integer)

#5 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(393): LCStoreDB->get(string, string)

#6 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(311): LocalisationCache->loadItem(string, string)

#7 C:\xampp\htdocs\mediawiki\includes\language\LanguageFallback.php(106): LocalisationCache->getItem(string, string)

#8 C:\xampp\htdocs\mediawiki\includes\language\LanguageFactory.php(158): MediaWiki\Languages\LanguageFallback->getAll(string)

#9 C:\xampp\htdocs\mediawiki\includes\language\LanguageFactory.php(116): MediaWiki\Languages\LanguageFactory->newFromCode(string)

#10 C:\xampp\htdocs\mediawiki\includes\ServiceWiring.php(380): MediaWiki\Languages\LanguageFactory->getLanguage(string)

#11 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#12 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#13 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(279): Wikimedia\Services\ServiceContainer->getService(string)

#14 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(801): MediaWiki\MediaWikiServices->getService(string)

#15 C:\xampp\htdocs\mediawiki\includes\ServiceWiring.php(922): MediaWiki\MediaWikiServices->getContentLanguage()

#16 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#17 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#18 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(279): Wikimedia\Services\ServiceContainer->getService(string)

#19 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(1180): MediaWiki\MediaWikiServices->getService(string)

#20 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionRenderer.php(377): MediaWiki\MediaWikiServices->getMessageCache()

#21 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionRenderer.php(75): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)

#22 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionHandler.php(107): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)

#23 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionHandler.php(202): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)

#24 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionHandler.php(170): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError, string)

#25 [internal function]: MWExceptionHandler::handleUncaughtException(Wikimedia\Rdbms\DBConnectionError)

#26 {main}

Malyacko (talkcontribs)

Can you please elaborate what is unclear about "Cannot access the database: Access denied for user 'root'@'localhost' (using password: NO) (localhost) (localhost)"? Your database settings are incorrect.

213.60.68.92 (talkcontribs)

Sorry. Complete newbie here. Already sorted out.

What is the most early hook called in all pages?

2
Summary by 2003:E7:572B:AB00:A8D8:79CF:48B6:71DA

Helpful hint to Snippets found. Thnx.

2003:E7:572B:AB00:91FB:8B32:DFDD:1E7E (talkcontribs)

I need to inject some css and js (1) very early in the page and (2) in every page in order to patch on the appearance.


All the hooks I tried thus far either are too far down in the page (and I get a flickering of the page on reload) or they appear only on article pages but are missing on special pages, user preference pages, contribution pages or similar. Also, common.css and common.js do not work.

Ciencia Al Poder (talkcontribs)
Summary by Ciencia Al Poder
Thatnewman (talkcontribs)

Hello How can i design my wiki to function like wiki common.... Where they upload picture and can use the picture on my second wiki (knowledge wiki) ......

Malyacko (talkcontribs)

What is "wiki common"? Please be way more specific.

Thatnewman (talkcontribs)

My opening screen shows 5 lines. How do Increase the lines to 30?

1
74.15.2.251 (talkcontribs)

My opening screen shows 5 lines.  How do Increase the lines to 30?

Reply to "My opening screen shows 5 lines. How do Increase the lines to 30?"

Prevent editing pages when vpn is enabled

2
Sokote zaman (talkcontribs)

I get the following error. I see this error when editing a test on one of the MediaWiki pages, and the same is true of other Wikipedia Foundation wikis.

How can I prevent edits that are enabled on my wiki and via vpn?


You do not have permission to edit this page, for the following reason:

Your IP address is in a range that has been blocked on all Wikimedia Foundation wikis.

The block was made by Martin Urbanec (meta.wikimedia.org). The reason given is No open proxies: please read the FAQ should you be affected.

  • Start of block: 01:13, 16 August 2020
  • Expiry of block: 01:13, 16 August 2023

Your current IP address is 37.120.217.114 and the blocked range is 37.120.217.0/24. Please include all above details in any queries you make.

If you believe you were blocked by mistake, you can find additional information and instructions in the No open proxies global policy. Otherwise, to discuss the block please post a request for review on Meta-Wiki or send an email to the stewards OTRS queue at stewards@wikimedia.org including all above details.

Bawolff (talkcontribs)
Reply to "Prevent editing pages when vpn is enabled"