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

Other places to ask for help:

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".

error executing the php maintenance script maintenance/update.php in mediawiki 1.35.1 on ubuntu 20.04.1 LTS

1
41.202.90.181 (talkcontribs)

hello j

1) I have installed MediaWiki 1.35.1 on Ubuntu 20.04.1 system.

2-I also installed bitnami lamp stack 7.4.13 as a local server

3) I was able to configure the wiki and get the localsetting.php file.

4) I normally have access to the wiki database stored in phpmyadmin.

5)also install semantic bundle via dial however when I execute the command

php maintenace/update.php in the mediawiki directory I'm facing the following problem

I really need help

thanks to you


(base) jean@jean-HP-Pavilion-x360-Convertible-14m-cd0xxx:~/lampstack/apache2/htdocs/mediawiki$ php maintenance/update.php

Your composer.lock file is up to date with current dependencies!

InvalidArgumentException from line 509 of /home/jean/lampstack/apache2/htdocs/mediawiki/includes/libs/rdbms/database/Database.php: Wikimedia\Rdbms\Database::getClass no viable database extension found for type 'mysql'

#0 /home/jean/lampstack/apache2/htdocs/mediawiki/includes/libs/rdbms/database/Database.php(458): Wikimedia\Rdbms\Database::getClass()

#1 /home/jean/lampstack/apache2/htdocs/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1242): Wikimedia\Rdbms\Database::attributesFromType()

#2 /home/jean/lampstack/apache2/htdocs/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1284): Wikimedia\Rdbms\LoadBalancer->getServerAttributes()

#3 /home/jean/lampstack/apache2/htdocs/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1096): Wikimedia\Rdbms\LoadBalancer->reallyOpenConnection()

#4 /home/jean/lampstack/apache2/htdocs/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(929): Wikimedia\Rdbms\LoadBalancer->getLocalConnection()

#5 /home/jean/lampstack/apache2/htdocs/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(901): Wikimedia\Rdbms\LoadBalancer->getServerConnection()

#6 /home/jean/lampstack/apache2/htdocs/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1046): Wikimedia\Rdbms\LoadBalancer->getConnection()

#7 /home/jean/lampstack/apache2/htdocs/mediawiki/maintenance/includes/Maintenance.php(1371): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef()

#8 /home/jean/lampstack/apache2/htdocs/mediawiki/maintenance/update.php(141): Maintenance->getDB()

#9 /home/jean/lampstack/apache2/htdocs/mediawiki/maintenance/doMaintenance.php(107): UpdateMediaWiki->execute()

#10 /home/jean/lampstack/apache2/htdocs/mediawiki/maintenance/update.php(253): require_once('/home/jean/lamp...')

#11 {main}

Reply to "error executing the php maintenance script maintenance/update.php in mediawiki 1.35.1 on ubuntu 20.04.1 LTS"

Problems after upgrading to 1.35

3
TexasR87 (talkcontribs)

Today I updated my Wiki to 1.35.

Now I have trouble with my tweeki-Skin, which is - at least I hope so - related to the tweeki-software.


Anyway - since the update somehow my Navboxes (in german Navigationsleisten) (i.e. http://www.huskywiki.de/HuskyWiki//index.php?title=Brad_Burym) stopped collapsing. I didn't change anything to the Commons.css or .js.


Does anyone have a clue...?

Malyacko (talkcontribs)

@TexasR87 Open any web browser, open that web browser's developer tools and go to "console", then open your patch and see the errors. :)

TexasR87 (talkcontribs)

Thanks for your reply.

I'm not a real professional concerning my developing skills.

Can you point me into a certain direction - bc I have absolutely no idea...

Reply to "Problems after upgrading to 1.35"
194.199.240.129 (talkcontribs)

Hello, I am looking for a way to include the code for substitution in a template. That is to say that I would to create a template A and when I write {{A}} and publish my edit, {{A}} would be replaced by its code, without using {{suubst:A}} ? Is there a way to do that ? Thank you in advance.
~~~~

Bawolff (talkcontribs)

no.

Some people add code to the template to output a warning if it was not subst: but was supposed to be


Some people use pywikibot for this purpose to go over edits and subst things.

194.199.240.129 (talkcontribs)

OK. Thank you for your answer.

Reply to "Substitution"

Problems after upgrading to 1.34

4
Satyaps2251 (talkcontribs)

Hallo all

I have upgraded my wiki from Ver 1.30 to Ver:1.34.2

- after upgrade got a error /Rdbms/SQL ..etc

then have run the file --> /srv/www/mediawiki/maintaince/update.php

but my wiki have no data and please let me know how can reset my data..


Thanks in advance

Malyacko (talkcontribs)

@Satyaps2251 Hi, please be more specific, provide clearer steps to reproduce, and explain what makes you think that you "have no data". Please see the sidebar here. Also, why you are upgrading to outdated ancient insecure version 1.34.2 instead of a supported software version?

Satyaps2251 (talkcontribs)

Hi Malyacko,

Thank you for your kind reply.

actually im upgrading for the "extensions/Lockdown" (for restict the users for the particular pages) option.

please can you suggest me any other Version which is supports the "extensions/Lockdown" option


Thank you

Malyacko (talkcontribs)
Reply to "Problems after upgrading to 1.34"

Proton PDF Installation on Mediawiki 1.35.1

2
143.97.2.35 (talkcontribs)

Hello Team,

Can I get Proper steps to install proton in my RHEL-7 with PHP 7.4.

I have seen it in Wikimedia page and same I want to install in my application.


Thanks

Akki S.

Malyacko (talkcontribs)
Reply to "Proton PDF Installation on Mediawiki 1.35.1"

Minus sign not visible in chrome on following page

8
Summary by Malyacko

Google Chrome is broken - please report this to Google Chrome

2A02:810D:95BF:E340:D17B:2F06:31D7:FE6B (talkcontribs)
Malyacko (talkcontribs)

Google Chrome is broken, as you can see when looking at the page source. Please report this to Google Chrome so Google can fix Chrome. Thanks.

Jonathan3 (talkcontribs)
Malyacko (talkcontribs)

They display both correct in en and de here, and certain Chrome zoom levels are broken in Chrome.

Jonathan3 (talkcontribs)

How odd. You're right about the zoom levels. The minus sign just appears and disappears. I guess whoever deals with the <math> tag might be in a better position to report this to Chrome than 2A02:810D:95BF:E340:D17B:2F06:31D7:FE6B :-)

2A02:8070:2195:F300:9D51:3F8D:3E84:E418 (talkcontribs)

I found a work around (don't know if it will work for anyone).

Try to view the site with 110%

Jonathan3 (talkcontribs)

It's a strange one. It might break at 120% and work again at 130% (or whatever). You wouldn't necessarily know it was wrong at any particular zoom.

Lady G2016 (talkcontribs)

I confirm the bug in my wiki with Windows 10 and Chrome Version 87.0.4280.141.

The bug appears in a high resolution monitor (2560 px x 1440 px) when I zoom to levels <= 67%. Going larger (> 100%) does not reproduce the problem.

The bug does not reproduce in Linux nor Android 10 (mobile and desktop views). Both Linux and Android Versions are 87.0.4280.141.

I have requested assistance in the Math Extension Talk page: Google Chrome bug causes incorrect formula display

Reply to "Minus sign not visible in chrome on following page"

Problems loading the wiki on Windows

10
Cible30 (talkcontribs)

Hello, i moved my wiki from Debian to Windows. I use XAMPP (php 7.4) and i had the folder (named wiki) containing the file system of the wiki on xampp/htdocs. I also removed the folder of 2 extension (and their localsetting line) that gived a warning.

When i write localhost/wiki it gives the following error:

MediaWiki internal error.

Original exception: [cedf8c6d6bc85e98eb987394] /wiki/ Wikimedia\Rdbms\DBConnectionError from line 1380 of C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php: Cannot access the database: Unknown error (127.0.0.1) Backtrace:

  1. 0 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(931): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
  2. 1 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(898): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)
  3. 2 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)
  4. 3 C:\xampp1\htdocs\wiki\includes\GlobalFunctions.php(2576): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)
  5. 4 C:\xampp1\htdocs\wiki\includes\cache\localisation\LCStoreDB.php(56): wfGetDB(integer)
  6. 5 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(441): LCStoreDB->get(string, string)
  7. 6 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(487): LocalisationCache->isExpired(string)
  8. 7 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(363): LocalisationCache->initLanguage(string)
  9. 8 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(304): LocalisationCache->loadItem(string, string)
  10. 9 C:\xampp1\htdocs\wiki\languages\Language.php(4413): LocalisationCache->getItem(string, string)
  11. 10 C:\xampp1\htdocs\wiki\languages\Language.php(265): Language::getFallbacksFor(string)
  12. 11 C:\xampp1\htdocs\wiki\languages\Language.php(225): Language::newFromCode(string)
  13. 12 C:\xampp1\htdocs\wiki\includes\ServiceWiring.php(163): Language::factory(string)
  14. 13 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
  15. 14 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
  16. 15 C:\xampp1\htdocs\wiki\includes\MediaWikiServices.php(540): Wikimedia\Services\ServiceContainer->getService(string)
  17. 16 C:\xampp1\htdocs\wiki\includes\Setup.php(801): MediaWiki\MediaWikiServices->getContentLanguage()
  18. 17 C:\xampp1\htdocs\wiki\includes\WebStart.php(81): require_once(string)
  19. 18 C:\xampp1\htdocs\wiki\index.php(41): require(string)
  20. 19 {main}

Exception caught inside exception handler: [cedf8c6d6bc85e98eb987394] /wiki/ Wikimedia\Rdbms\DBConnectionError from line 1380 of C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php: Cannot access the database: Unknown error (127.0.0.1) Backtrace:

  1. 0 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(931): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
  2. 1 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(898): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)
  3. 2 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)
  4. 3 C:\xampp1\htdocs\wiki\includes\GlobalFunctions.php(2576): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)
  5. 4 C:\xampp1\htdocs\wiki\includes\cache\localisation\LCStoreDB.php(56): wfGetDB(integer)
  6. 5 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(386): LCStoreDB->get(string, string)
  7. 6 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(304): LocalisationCache->loadItem(string, string)
  8. 7 C:\xampp1\htdocs\wiki\languages\Language.php(4413): LocalisationCache->getItem(string, string)
  9. 8 C:\xampp1\htdocs\wiki\languages\Language.php(265): Language::getFallbacksFor(string)
  10. 9 C:\xampp1\htdocs\wiki\languages\Language.php(225): Language::newFromCode(string)
  11. 10 C:\xampp1\htdocs\wiki\includes\ServiceWiring.php(163): Language::factory(string)
  12. 11 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
  13. 12 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
  14. 13 C:\xampp1\htdocs\wiki\includes\MediaWikiServices.php(540): Wikimedia\Services\ServiceContainer->getService(string)
  15. 14 C:\xampp1\htdocs\wiki\includes\ServiceWiring.php(440): MediaWiki\MediaWikiServices->getContentLanguage()
  16. 15 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
  17. 16 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
  18. 17 C:\xampp1\htdocs\wiki\includes\MediaWikiServices.php(738): Wikimedia\Services\ServiceContainer->getService(string)
  19. 18 C:\xampp1\htdocs\wiki\includes\cache\MessageCache.php(115): MediaWiki\MediaWikiServices->getMessageCache()
  20. 19 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionRenderer.php(310): MessageCache::singleton()
  21. 20 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionRenderer.php(51): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)
  22. 21 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionHandler.php(121): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)
  23. 22 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionHandler.php(195): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)
  24. 23 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionHandler.php(167): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError)
  25. 24 [internal function]: MWExceptionHandler::handleUncaughtException(Wikimedia\Rdbms\DBConnectionError)
  26. 25 {main}
Ciencia Al Poder (talkcontribs)

This is the error: Cannot access the database: Unknown error (127.0.0.1)

Review the database connection settings, check if they are correct. Try to connect to mysql using the database credentials stored in LocalSettings.php through phpmyadmin or a local mysql client

Cible30 (talkcontribs)

Yes thank you, it was easier than i expected.

Now the wiki work but this message stay on top of every page:

"Warning: array_key_exists() expects parameter 2 to be array, null given inC:\xampp1\htdocs\wiki\extensions\Iframe\Iframe_body.phpon line136"


And this that stay on top of the homepage:

"Notice: Trying to access array offset on value of type bool inC:\xampp1\htdocs\wiki\extensions\SemanticMediaWiki\includes\dataitems\SMW_DI_Property.phpon line508"

Cible30 (talkcontribs)

And also when i search a page named "Camponotus vagus" it gives to me this error

"[7cd620d1cfe1c7b70b38f41f] /wiki/index.php/Camponotus_vagus Wikimedia\Rdbms\DBReadOnlyError from line 975 of C:\xampp1\htdocs\wiki\includes\libs\rdbms\database\Database.php: Database is read-only: Dumping Database, Access will be restored shortly"


The DBuser have all privileges on the database

Ciencia Al Poder (talkcontribs)
Cible30 (talkcontribs)

But where i must add that php code?

Ciencia Al Poder (talkcontribs)

If you use the function error_reporting(0); put that in LocalSettings.php

You can edit php.ini and set display_errors = Off to turn off any error reporting (it's recommended to set it to log file instead)

Cible30 (talkcontribs)

Thank you very much for the help!

Ciencia Al Poder (talkcontribs)

The "Database is read-only: Dumping Database, Access will be restored shortly" seems pretty self explanatory.

You probably set the database to readonly, or even set the site to readonly in LocalSettings.php

Cible30 (talkcontribs)

I didn't expect that, i don't remember that line on LocalSetting.php :/

Reply to "Problems loading the wiki on Windows"
176.122.109.86 (talkcontribs)

when editing Project:Sandbox (in the wikitext editor), a warning appears at the top of the edit window, which says: "WARNING: This page is 79 bytes long; consider shortening it to better serve readers."

Ammarpad (talkcontribs)
Reply to "warning when editing Project:Sandbox"

Help understanding fetching resources

2
Manan jethwani (talkcontribs)

hey everyone , I am working on scrapping wikipedia pages I am easily able to fetch html content and fetch all resource mentioned in script tag in this html but when I try to view those page I am getting error undefined function me.hook I have scrapped startup script which consist of most of the things related to mw object but mw.hook is not present there I found out mw.hook is defined in wikimedia.base.js but I can't seem to understand how it is being fetched like have a look at this article -> https://ru.wikipedia.org/wiki/%D0%A2%D0%B0%D1%80%D0%B0%D0%BD%D1%82%D0%B8%D0%BD%D0%BE,_%D0%9A%D0%B2%D0%B5%D0%BD%D1%82%D0%B8%D0%BD#%D0%A0%D0%B5%D0%B6%D0%B8%D1%81%D1%81%D1%91%D1%80%D1%81%D0%BA%D0%B8%D0%B9_%D0%BF%D0%BE%D1%87%D0%B5%D1%80%D0%BA

looking at the sources I could find only 2 scripts(I successfuly loaded those 2) and startup script has mention of baseModule wikimedia.base.js but how is it fetching it exactly and one more thing are these base modules (wikimedia.base.js and jquery) required in all mediawiki pages and should I scrape them always If I am trying to scrape any mediawiki file?

P.S. -> sorry if wrong place ,new here

Bawolff (talkcontribs)

ResourceLoader has some background info.

Modules are loaded dynamically, sometimes from LocalStorage based cache.

Reply to "Help understanding fetching resources"

oojs-ui not created after mediawiki update

4
Wuestenarchitekten (talkcontribs)

After a mediawiki update to 1.35.1, running the update script as well as the composer update, it seems oojs-ui is not being created - any hints to what might be the reason for that?

 2021-01-11 21:42:08 ip- wiki: Generating module package failed: [Exception MWException( /var/www/html/includes/resourceloader/ResourceLoaderImage.php:243) File '/var/www/html/resources/lib/oojs-ui/themes/wikimediaui/images/icons/logo-CC.svg' does not exist]
 #0 /var/www/html/includes/resourceloader/ResourceLoaderImage.php(213): ResourceLoaderImage->getImageData(ResourceLoaderContext, NULL, string)
 #1 /var/www/html/includes/resourceloader/ResourceLoaderImageModule.php(362): ResourceLoaderImage->getDataUri(ResourceLoaderContext, NULL, string)
 #2 /var/www/html/includes/resourceloader/ResourceLoaderImageModule.php(320): ResourceLoaderImageModule->getStyleDeclarations(ResourceLoaderContext, ResourceLoaderImage, string)
 #3 /var/www/html/includes/resourceloader/ResourceLoaderModule.php(729): ResourceLoaderImageModule->getStyles(ResourceLoaderContext)
 #4 /var/www/html/includes/resourceloader/ResourceLoaderModule.php(674): ResourceLoaderModule->buildContent(ResourceLoaderContext)
 #5 /var/www/html/includes/resourceloader/ResourceLoader.php(1078): ResourceLoaderModule->getModuleContent(ResourceLoaderContext)
 #6 /var/www/html/includes/resourceloader/ResourceLoader.php(782): ResourceLoader->makeModuleResponse(ResourceLoaderContext, array, array)
 #7 /var/www/html/load.php(51): ResourceLoader->respond(ResourceLoaderContext)
 #8 {main}
Bawolff (talkcontribs)

how did you update mediawiki?

Wuestenarchitekten (talkcontribs)

Thanks! THese are the steps I had noted from the last time:

  • replaced all files from my wiki with the extracted files from the mediawiki tar.gz.
  • added in all extensions
  • run composer update --no-dev
  • run php maintenance/update.php
Bawolff (talkcontribs)

mediawiki tar.gz file should contain oojs and anything else needed by mediawiki (composer update only needed if an extension needs it or you obtained mw via git).

I would check to see if the file was in the tarball you used

Reply to "oojs-ui not created after mediawiki update"