Project:Support desk/Flow/2023/01

This page is an archive.
Please ask questions on the current support desk.
Category:Support desk archives#Flow%20Archive%20Support%20desk/Flow/2023/01

"$wgUser was deprecated in MediaWiki 1.35", and "BadMethodCallException: Sessions are disabled for load entry point"

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi, I recently installed 1.39.1 from tarball on Linux, I see the a couple errors in logs. I googled and found they happened to various extensions years ago, but I configured no extension at all in LocalSettings.php (no "wfLoadExtension" line). What could I be wrong?

I see this error "$wgUser was deprecated in MediaWiki 1.35" in mediawiki backtrace.

[error] [4405d562876a9bcd88252117] /load.php?lang=zh-hans&modules=startup&only=scripts&raw=1&skin=vector PHP Deprecated: Use of $wgUser was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook]

#0 [internal function]: MWExceptionHandler::handleError()

#1 /mediawiki/includes/debug/MWDebug.php(381): trigger_error()

#2 /mediawiki/includes/debug/MWDebug.php(352): MWDebug::sendRawDeprecated()

#3 /mediawiki/includes/debug/MWDebug.php(233): MWDebug::deprecatedMsg()

#4 /mediawiki/includes/GlobalFunctions.php(769): MWDebug::deprecated()

#5 /mediawiki/includes/StubGlobalUser.php(69): wfDeprecated()

#6 /mediawiki/includes/StubGlobalUser.php(139): StubGlobalUser->_newObject()

#7 /mediawiki/includes/StubObject.php(119): StubGlobalUser->_unstub()

#8 /mediawiki/includes/StubObject.php(149): StubObject->_call()

#9 /usr/local/etc/nginx/LocalSettings.php(775): StubObject->__call()

#10 /mediawiki/includes/HookContainer/HookContainer.php(338): disableSomeSpecialPages()

#11 /mediawiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()

#12 /mediawiki/includes/HookContainer/HookRunner.php(3693): MediaWiki\HookContainer\HookContainer->run()

#13 /mediawiki/includes/specialpage/SpecialPageFactory.php(1165): MediaWiki\HookContainer\HookRunner->onSpecialPage_initList()

#14 /mediawiki/includes/specialpage/SpecialPageFactory.php(1180): MediaWiki\SpecialPage\SpecialPageFactory->getPageList()

#15 /mediawiki/includes/specialpage/SpecialPageFactory.php(1519): MediaWiki\SpecialPage\SpecialPageFactory->getAliasList()

#16 /mediawiki/includes/specialpage/SpecialPage.php(149): MediaWiki\SpecialPage\SpecialPageFactory->getLocalNameFor()

#17 /mediawiki/includes/specialpage/SpecialPage.php(134): SpecialPage::getTitleValueFor()

#18 /mediawiki/includes/specialpage/ChangesListSpecialPage.php(857): SpecialPage::getTitleFor()

#19 /mediawiki/includes/ResourceLoader/FileModule.php(1251): ChangesListSpecialPage::getRcFiltersConfigSummary()

#20 /mediawiki/includes/ResourceLoader/FileModule.php(608): MediaWiki\ResourceLoader\FileModule->expandPackageFiles()

#21 /mediawiki/includes/ResourceLoader/Module.php(928): MediaWiki\ResourceLoader\FileModule->getDefinitionSummary()

#22 /mediawiki/includes/ResourceLoader/StartUpModule.php(224): MediaWiki\ResourceLoader\Module->getVersionHash()

#23 /mediawiki/includes/ResourceLoader/StartUpModule.php(425): MediaWiki\ResourceLoader\StartUpModule->getModuleRegistrations()

#24 /mediawiki/includes/ResourceLoader/Module.php(817): MediaWiki\ResourceLoader\StartUpModule->getScript()

#25 /mediawiki/includes/ResourceLoader/Module.php(786): MediaWiki\ResourceLoader\Module->buildContent()

#26 /mediawiki/includes/ResourceLoader/Module.php(925): MediaWiki\ResourceLoader\Module->getModuleContent()

#27 /mediawiki/includes/ResourceLoader/ResourceLoader.php(701): MediaWiki\ResourceLoader\Module->getVersionHash()

#28 [internal function]: MediaWiki\ResourceLoader\ResourceLoader->MediaWiki\ResourceLoader\{closure}()

#29 /mediawiki/includes/ResourceLoader/ResourceLoader.php(699): array_map()

#30 /mediawiki/includes/ResourceLoader/ResourceLoader.php(798): MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion()

#31 /mediawiki/load.php(53): MediaWiki\ResourceLoader\ResourceLoader->respond()

#32 /mediawiki/load.php(39): wfLoadMain()

#33 {main}


2. I can debug using Visual Studio Code, and when visiting the wiki's homepage, Visual Studio Code popups saying

"Exception has occurred.BadMethodCallException: Sessions are disabled for load entry point"

it stops at the line:

"throw new \BadMethodCallException( "Sessions are disabled for $ep entry point" );"

in function "getSessionFromInfo" in "SessionManager.php".

In Visual Studio Code the stack is:

MediaWiki\Session\SessionManager->getEmptySessionInternal (/mediawiki/includes/session/SessionManager.php:363)

MediaWiki\Session\SessionManager->getEmptySession (/mediawiki/includes/session/SessionManager.php:296)

MediaWiki\Session\SessionManager->getInitialSession (/mediawiki/includes/session/SessionManager.php:376)

MediaWiki\Session\SessionManager->getSessionForRequest (/mediawiki/includes/session/SessionManager.php:246)

WebRequest->getSession (/mediawiki/includes/WebRequest.php:843)

User->loadFromSession (/mediawiki/includes/user/User.php:1115)

User->load (/mediawiki/includes/user/User.php:438)

User->getId (/mediawiki/includes/user/User.php:1658)

User->isRegistered (/mediawiki/includes/user/User.php:2310)

MediaWiki\Permissions\PermissionManager->getRightsCacheKey (/mediawiki/includes/Permissions/PermissionManager.php:1549)

MediaWiki\Permissions\PermissionManager->getUserPermissions (/mediawiki/includes/Permissions/PermissionManager.php:1477)

MediaWiki\Permissions\PermissionManager->userHasRight (/mediawiki/includes/Permissions/PermissionManager.php:1432)

MediaWiki\Permissions\UserAuthority->isAllowed (/mediawiki/includes/Permissions/UserAuthority.php:93)

User->isAllowed (/mediawiki/includes/user/User.php:2365)

StubObject->_call (/mediawiki/includes/StubObject.php:120)

StubObject->__call (/mediawiki/includes/StubObject.php:149)

StubObject->isAllowed (/usr/local/etc/nginx/LocalSettings.php:775)

disableSomeSpecialPages (/usr/local/etc/nginx/LocalSettings.php:775)

MediaWiki\HookContainer\HookContainer->callLegacyHook (/mediawiki/includes/HookContainer/HookContainer.php:338)

MediaWiki\HookContainer\HookContainer->run (/mediawiki/includes/HookContainer/HookContainer.php:137)

MediaWiki\HookContainer\HookRunner->onSpecialPage_initList (/mediawiki/includes/HookContainer/HookRunner.php:3693)

MediaWiki\SpecialPage\SpecialPageFactory->getPageList (/mediawiki/includes/specialpage/SpecialPageFactory.php:1165)

MediaWiki\SpecialPage\SpecialPageFactory->getAliasList (/mediawiki/includes/specialpage/SpecialPageFactory.php:1180)

MediaWiki\SpecialPage\SpecialPageFactory->getLocalNameFor (/mediawiki/includes/specialpage/SpecialPageFactory.php:1519)

SpecialPage::getTitleValueFor (/mediawiki/includes/specialpage/SpecialPage.php:149)

SpecialPage::getTitleFor (/mediawiki/includes/specialpage/SpecialPage.php:134)

ChangesListSpecialPage::getRcFiltersConfigSummary (/mediawiki/includes/specialpage/ChangesListSpecialPage.php:857)

MediaWiki\ResourceLoader\FileModule->expandPackageFiles (/mediawiki/includes/ResourceLoader/FileModule.php:1251)

MediaWiki\ResourceLoader\FileModule->getDefinitionSummary (/mediawiki/includes/ResourceLoader/FileModule.php:608)

MediaWiki\ResourceLoader\Module->getVersionHash (/mediawiki/includes/ResourceLoader/Module.php:928)

MediaWiki\ResourceLoader\StartUpModule->getModuleRegistrations (/mediawiki/includes/ResourceLoader/StartUpModule.php:224)

MediaWiki\ResourceLoader\StartUpModule->getScript (/mediawiki/includes/ResourceLoader/StartUpModule.php:425)

MediaWiki\ResourceLoader\Module->buildContent (/mediawiki/includes/ResourceLoader/Module.php:817)

MediaWiki\ResourceLoader\Module->getModuleContent (/mediawiki/includes/ResourceLoader/Module.php:786)

MediaWiki\ResourceLoader\Module->getVersionHash (/mediawiki/includes/ResourceLoader/Module.php:925)

MediaWiki\ResourceLoader\ResourceLoader->MediaWiki\ResourceLoader\{closure:/space/home/mediawiki/mediawiki-1.39.1/includes/ResourceLoader/ResourceLoader.php:699-715} (/mediawiki/includes/ResourceLoader/ResourceLoader.php:701)

array_map (/mediawiki/includes/ResourceLoader/ResourceLoader.php:699)

MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion (/mediawiki/includes/ResourceLoader/ResourceLoader.php:699)

MediaWiki\ResourceLoader\ResourceLoader->respond (/mediawiki/includes/ResourceLoader/ResourceLoader.php:798)

wfLoadMain (/mediawiki/load.php:53)

{main} (/mediawiki/load.php:39)


Thank you very much!
Reply
Jparso (talk) 10:39, 1 January 2023 (UTC)

I'm sorry it's my first post here, so all my line breaks above were removed when published here. I just figured out a way how to keep line breaks, and edited the above post, hopefully readable now.
But my problems mentioned above still remains. Really appreciate your help! Jparso (talk) 17:08, 1 January 2023 (UTC)
What's in your LocalSettings.php file around line 775? In particular the error message looks like you might have a function implenting a hook to disable some special pages, which might be trying to look up user rights in a context where the user isn't supposed to be loaded. The hook may have to be modified to test for MW_NO_SESSION Bawolff (talk) 01:01, 2 January 2023 (UTC)
Cool!!! You are marvelous! Indeed that was some ancient setting for old version years ago. After removing that, all the problems are gone!
So when upgrading, problems can arise from outdated extensions, and outdated settings in LocalSettings.php
Thank you so much! Jparso (talk) 03:42, 2 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Visual Editor Problem

Hey :)

My site: https://wiki.hytalehub.com

When you try to edit with visual editor its trying to load, the domain is chaning but nothing is happening.

This is in the chrome console:

VM437:44 Uncaught TypeError: Cannot read properties of undefined (reading 'getDefaultMode')

    at <anonymous>:44:47

    at fire (load.php?lang=en&modules=jquery&skin=timeless&version=bh3lo:46:934)

    at Object.add [as done] (load.php?lang=en&modules=jquery&skin=timeless&version=bh3lo:47:454)

    at Object.onEditTabClick (<anonymous>:44:15)

    at HTMLLIElement.dispatch (load.php?lang=en&modules=jquery&skin=timeless&version=bh3lo:70:260)

    at elemData.handle (load.php?lang=en&modules=jquery&skin=timeless&version=bh3lo:66:877) KatastrophenKommando (talk) 17:02, 1 January 2023 (UTC)

I'm not sure if this is helpful, but double check that you have the right version of VisualEditor extension for your version of MediaWiki, and the right version of any skins you are using for your version of MediaWiki. Bawolff (talk) 07:06, 2 January 2023 (UTC)
Now i get "Error contacting the Parsoid/RESTBase server (HTTP 400)". When i try to edit a page its coming instantly, when i make a new page the editor works and it happens when i try to save it. Anyone has an idea? KatastrophenKommando (talk) 21:59, 2 January 2023 (UTC)

Recent changes not working after updating to 1.39.0

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


  • MediaWiki version: 1.39.1
  • PHP version: 7.4.13
  • MySQL version: 5.7.39
  • URL: http://mh.wdf.ink/

On December 1, 2022, I updated the wiki to 1.39.0. Recent changes have not been working since then, and the latest changes are only shown until November 30th.

Still not working after updating to 1.39.1. How to get recent changes back to normal? SkyEye FAST (talk) 10:26, 2 January 2023 (UTC)

After reinstalling 1.39.1 and executing update.php, new edits can show up in recent changes, but edits from the past month still don't appear.
The page history can be viewed normally, but it will not appear in the recent changes. SkyEye FAST (talk) 10:35, 2 January 2023 (UTC)
You could try running rebuildrecentchanges.php Bawolff (talk) 11:06, 2 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Database.php Error 1525 incorrect timestamp

refreshLinks.php --category Plan leads to the following error in a MW 1.35 installation. Any idea what could be wrong?

Refreshing pages in category 'Plan'... Wikimedia\Rdbms\DBQueryError from line 1713 of /includes/libs/rdbms/database/Database.php: Error 1525: Incorrect TIMESTAMP value: (xxx.at:53996) Function: RefreshLinks::refreshCategory Query: SELECT page_id,cl_timestamp FROM `page`,`categorylinks` WHERE (page_id=cl_from) AND cl_to = 'Plan' AND ((cl_timestamp > OR (cl_timestamp = AND cl_from > 0))) ORDER BY cl_timestamp,cl_from LIMIT 100

  1. 0 /includes/libs/rdbms/database/Database.php(1697): Wikimedia\Rdbms\Database->getQueryException()
  2. 1 /includes/libs/rdbms/database/Database.php(1672): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()
  3. 2 /includes/libs/rdbms/database/Database.php(1241): Wikimedia\Rdbms\Database->reportQueryError()
  4. 3 /includes/libs/rdbms/database/Database.php(1921): Wikimedia\Rdbms\Database->query()
  5. 4 /includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select()
  6. 5 /includes/libs/rdbms/database/DBConnRef.php(313): Wikimedia\Rdbms\DBConnRef->__call()
  7. 6 /maintenance/refreshLinks.php(462): Wikimedia\Rdbms\DBConnRef->select()
  8. 7 /maintenance/refreshLinks.php(77): RefreshLinks->refreshCategory()
  9. 8 /maintenance/doMaintenance.php(107): RefreshLinks->execute()
  10. 9 /maintenance/refreshLinks.php(496): require_once('/srv/ma01/wiki/...')
  11. 10 {main} Krabina (talk) 15:03, 2 January 2023 (UTC)

Put TOC on sidebar

On the wikimedia wikis, when using the 2022 vector skin, the table of contents is on the left sidebar. How do I do that? Aaron Liu (talk) 15:43, 2 January 2023 (UTC)
By using the 2022 Vector skin. :) (How do you mean? Please also see "Before you post" in the sidebar. Thanks.) Malyacko (talk) 09:22, 3 January 2023 (UTC)
I have checked the manuals. I'm hosting my own wiki at miraheze. The default skin there is vector 2022 but the TOC is still in body. Aaron Liu (talk) 12:30, 3 January 2023 (UTC)
Your Special:Version page shows that you are still on 1.38.4. That's old. Malyacko (talk) 12:46, 3 January 2023 (UTC)
That's probably why. It's only half a year old though. Aaron Liu (talk) 13:40, 3 January 2023 (UTC)
Skin:Citizen has TOC on the right and is available on Miraheze. Flounder ceo (talk) 14:53, 3 January 2023 (UTC)

Broken ASCII title characters during Wiki update

Hi, I am a member of the Internet Movie Firearms Database, a wiki about firearms in films, television, and video games powered by MediaWiki.

During an IMFDB server update last year, a strange error occurred where all the page titles with "non-standard" ASCII characters (mainly letters with diacritics) were broken; the pages became prefixed with "Broken/", and the non-standard characters were replaced with "\x(ASCII code here)".

We have been trying to fix the titles via manual moving (example), but it's a slow and inefficient process, and there are also many files (and pages in other namespaces) that have been broken by the update.

Me and most of the staff on IMFDB are not experts on MediaWiki science, so I would like to ask, what caused this error? What can be done to fix it quickly?

P.S.: I was recently promoted to administrator on IMFDB, and I am in contact with the head developer of IMFDB. I should be able to provide additional details by contacting them. Wuzh (talk) 20:27, 2 January 2023 (UTC)

This is usually caused by manual:cleanupTitles.php which is not usually part of the update process.
It looks like the issue was an iso-8859-1 vs utf-8 encoding issue. Sometimes this is caused by changing db charset settings or by making a mistake when restoring a backup.
You can potentially make a bot to fix this, but i dont know any preexisting ones. Bawolff (talk) 21:10, 2 January 2023 (UTC)
So, I am now an IMFDB admin, and over the last couple of months, our (i.e. IMFDB staff and the members of MediaWiki community who have been helping out on the unofficial MediaWiki Discord) investigation into the title errors has revealed many deeper and stranger problems.
All of our investigations have ended in dead ends, and I think we might need to have our Wiki be reviewed by professional MediaWiki developers to see just what went wrong with it.
Issues
  • (Functionally Resolved) Across the wiki, all the page whose titles contain "non-standard" ASCII characters, such as "é" or "ø", were spontaneously moved to "broken" titles (these pages will hereafter be referred to as "broken pages"); the pages became prefixed with "Broken/", and the non-standard characters were replaced with "\x(ASCII code here)". No page move is recorded in the page history logs.
    • Issue has been de facto resolved through manual page moving.
  • (Unresolved) Most of the wiki's redirects that redirect to "broken pages" appear as broken redirects on Special:BrokenRedirects, and no longer function; clicking on one of those redirects in a page will direct one to the redirect page itself, not its destination. Null editing did not fix the problem.
  • (Unresolved) Files with "broken" titles have completely disappeared from the front end. However, they are actually still on the wiki server; some of the files that have been manually re-uploaded (to their correct locations) have "blank" duplicate file entries (e.g. https://www.imfdb.org/wiki/Special:FileDuplicateSearch/Ger%C3%A4t_03.jpg).
Investigation
  • The initial suspected cause of the broken page titling, CleanupTitles.php, was not actually used during the update process; according IMFDB's head dev bunni, while he did run CleanupTitles.php during the update, it had no effect. Additionally, the fact that no page move is recorded in the page histories is uncharacteristic of CleanupTitles.php.
  • According to bunni, the encoding and the collage did not change during the update, and remained "latin1" and "latin1_bin" respectively. Wuzh (talk) 22:58, 24 August 2023 (UTC)
> Additionally, the fact that no page move is recorded in the page histories is uncharacteristic of CleanupTitles.php.
That would be normal for cleanupTitles.php. cleanupTitles.php does not normally log page moves.
So for broken image titles.
It does look like there is issues with latin1 vs utf-8 in the database not just for page titles, but also for the img_name field in the database. (You can see this at https://www.imfdb.org/api.php?action=query&prop=info&list=allimages&aifrom=Ges&ailimit=2&aito=Ger&aidir=descending - Note how one of them has %E4 in the url while the other is %C3%A4. %E4 is the character ä in latin1 encoding, where %C3%A4 is how you do it in UTF-8. (If you also notice \u00E4, just to be extra confusing that is how json writes the UTF-8 version of ä, where \ufffd is how json writes invalid character). cleanupImages.php may be able to fix this.
It looks like there is also still a page associated with the old name, but mediawiki does not want to view it directly giving an exception. . You can still view it in the API . So clearly if cleanupTitles.php was run, it didn't fully work as we still have invalid page titles in the database.
Similarly, broken redirects show's invalid characters in the redirect targets - https://www.imfdb.org/api.php?action=query&list=querypage&qppage=BrokenRedirects&qplimit=max . The actual text content of the redirect pages use proper utf-8, so it looks like the redirect database table just got its charsets munched up. This could possibly be fixed by running the script refreshLinks.php.
So my general advice would be:
  1. Take a backup of your wiki
  2. Run cleanupImages.php
  3. Run cleanupTitles.php
  4. run refreshLinks.php
And then see what your wiki looks like. Taking a backup in case that is not an improvement. If this was earlier in the process, i would say revert to before the upgrade, try to figure out what happened to cause the charset confusion and then reupgrade, but at this point people have been editing, so i think it makes more sense to just go from here.
p.s. If you are looking for professional consulting, there is a list at Professional_development_and_consulting Bawolff (talk) 19:28, 25 August 2023 (UTC)
We ran refreshLinks.php on a backup copy of IMFDB, and it didn't work; the same erroneous results still showed up, with no changes to any of them. We're planning on reverting our backup server to the pre-upgrade version to see what's different, and we want some advice as to what we should check or if we should try something different. Wuzh (talk) 18:07, 7 September 2023 (UTC)
Did you run it as the last step? It would only work after running cleanupImages.php Bawolff (talk) 00:38, 8 September 2023 (UTC)
The scripts were ran in the exact order as described. Wuzh (talk) 00:28, 9 September 2023 (UTC)
We tried running all the scripts again. We forgot to mention this, but there was an error while running refreshlinks.php (both this time and the last time):
MediaWiki\Revision\RevisionAccessException from line 1296 of /var/www/w/includes/Revision/RevisionStore.php: Main slot of revision not found in database. See T212428.
#0 /var/www/w/includes/Revision/RevisionStore.php(1224): MediaWiki\Revision\RevisionStore->constructSlotRecords()
#1 /var/www/w/includes/Revision/RevisionStore.php(1220): MediaWiki\Revision\RevisionStore->loadSlotRecords()
#2 /var/www/w/includes/Revision/RevisionStore.php(1335): MediaWiki\Revision\RevisionStore->loadSlotRecords()
#3 [internal function]: MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}()
#4 /var/www/w/includes/Revision/RevisionSlots.php(175): call_user_func()
#5 /var/www/w/includes/Revision/RevisionSlots.php(117): MediaWiki\Revision\RevisionSlots->getSlots()
#6 /var/www/w/includes/Revision/RevisionRecord.php(192): MediaWiki\Revision\RevisionSlots->getSlot()
#7 /var/www/w/includes/Revision/RevisionRecord.php(175): MediaWiki\Revision\RevisionRecord->getSlot()
#8 /var/www/w/includes/page/WikiPage.php(805): MediaWiki\Revision\RevisionRecord->getContent()
#9 /var/www/w/maintenance/refreshLinks.php(236): WikiPage->getContent()
#10 /var/www/w/maintenance/refreshLinks.php(188): RefreshLinks->fixRedirect()
#11 /var/www/w/maintenance/refreshLinks.php(84): RefreshLinks->doRefreshLinks()
#12 /var/www/w/maintenance/doMaintenance.php(107): RefreshLinks->execute()
#13 /var/www/w/maintenance/refreshLinks.php(496): require_once('/var/www/w/main...')
#14 {main}
Wuzh (talk) 21:32, 9 September 2023 (UTC)
huh.
That might be consistent with the updater not running fully. I'm not sure. Bawolff (talk) 23:34, 9 September 2023 (UTC)
So, head bureaucrat bunni is proposing that our single-leap update from version 1.19 to 1.35 could have broken the database and caused all these weird coding issues; he proposes that we should restore a backup and then update from 1.19 to 1.2 then to 1.3. Wuzh (talk) 21:06, 16 December 2023 (UTC)
Seems unlikely to me. Last time mediawiki changed encoding was version 1.5. It is most likely the encoding issues are at the layer brlow mediawiki.
Restoring from backup is probably the best way to go though, if doable. Bawolff (talk) 22:41, 16 December 2023 (UTC)

How to eliminate newlines after inserting HTML

Hello. I am creating a gadget for Visual Editor in MW 1.39. I want a button for adding custom html tags inline. This is my code so far:

ve.ui.BibliaCommand = function VeUiBibliaCommand() {

ve.ui.BibliaCommand.super.call( this, 'Biblia' );

};

OO.inheritClass( ve.ui.BibliaCommand, ve.ui.Command );

ve.ui.BibliaCommand.prototype.execute = function ( surface ) {

var model = surface.getModel(),

doc = model.getDocument(),

range = model.getSelection().getRange(),

docRange = doc.shallowCloneFromRange( range );

ve.init.target.getWikitextFragment( docRange, false ).done( function ( wikitext ) {

model.getFragment().insertHtml('<bible>'+wikitext+'</bible>');

} );

};

ve.ui.commandRegistry.register( new ve.ui.BibliaCommand() );


It works and wraps the selected text in the desired tags. But it also inserts a newline before and after the wrapped selection. Any suggestion on how I can remove these newlines? JuanMC78 (talk) 21:25, 2 January 2023 (UTC)

How do I change my username?

I'm finding multiple conflicting articles about this. Some of these might have been outdated. Is there a form to submit a request to change my username? Abwv00 (talk) 02:17, 3 January 2023 (UTC)

There is more than one way, but for wikimedia wikis request at https://meta.wikimedia.org/wiki/Special:GlobalRenameRequest Bawolff (talk) 02:33, 3 January 2023 (UTC)

extension "HideSidebar" doesn't work

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi, I installed 1.39.1, and enabled the following extensions:


SubPageList3

ApprovedRevs

CategoryTree

HideSidebar

WikiEditor

Lockdown


In my understanding, that extension "HideSidebar" would completely hide the left bar. However, I don't see any difference whether or not I enable this extension - the complete left bar is always there.

I also tried to follow https://www.mediawiki.org/wiki/Manual:Interface/Sidebar and set the entire MediaWiki:Sidebar page to


#column-content { margin: 0 0 1em 0; }

#content { margin: 0 0 0 0; }

#p-cactions { left: .1em; }


but again the complete leftbar is there intact.


What could go wrong? Where should I look into? Or what should I provide to help debug?


Thank you so much! Jparso (talk) 05:45, 3 January 2023 (UTC)

Its possible the extension author needs to update it for the new version of MediaWiki.
The MediaWiki:Sidebar page is not a css page. You can't add CSS to that page. Bawolff (talk) 07:38, 3 January 2023 (UTC)
BTW, you haven't said, which skin do you use, as it's possible you're using a skin the extension does not support (yet) ARychlik (talk) 20:24, 3 January 2023 (UTC)
Thanks. I'm just using the default "vector" skin. I also tried "vector-2022" and "monobook" skins, and they all still have the leftbar.
I now disabled all extensions, and the leftbar is still there.
I thought this instruction https://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Remove_the_Sidebar_and_main_logo_at_MediaWiki:Sidebar would delete everything on the left side. That page said:
To completely remove the sidebar and logo:
Blank the MediaWiki:Sidebar page and save.
Then add:
  1. column-content { margin: 0 0 1em 0; }
  2. content { margin: 0 0 0 0; }
  3. p-cactions { left: .1em; }
This moves the main text of your wiki to the left.
Where should I add the above CSS to? I thought it means to add to MediaWiki:Sidebar, but Bawolff said that's not true? Jparso (talk) 23:07, 3 January 2023 (UTC)
You should add css to MediaWiki:vector.css (assuming the skin you are using is vector. The css you are talking about sounds very skin specific) Bawolff (talk) 02:01, 4 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

VisualEditor: Error contacting the Parsoid/RESTBase server (HTTP 400) on nginx

On the wiki https://wiki.hytalehub.com/ the Visual Editor isn't working.

I reinstalled it like ten times.

Its saying "Error contacting the Parsoid/RESTBase server (HTTP 400)". When i try to create a new page it's working but you can't save it (--> same error).

I use nginx.

Could someone please help me, i am really struggling.. :( thanks! KatastrophenKommando (talk) 10:29, 3 January 2023 (UTC)

Description of change

Is there any way to retrospectively add a description of why a change was made? It's question for using in my wiki. Want (talk) 12:29, 3 January 2023 (UTC)

You could revert yourself and make the change again with a comment. Flounder ceo (talk) 15:13, 3 January 2023 (UTC)
8-/ This not solution for me. I need method, how to add comment to change, what was do by another user. For better orientation in history of the page. Want (talk) 15:34, 3 January 2023 (UTC)
That's cool. Short of editing the database directly, I don't know of another way. Maybe someone will make an extension. Flounder ceo (talk) 15:44, 3 January 2023 (UTC)
Mostly no. At most there are help:Tags which isnt really what you are looking for. Bawolff (talk) 18:31, 3 January 2023 (UTC)
Sometimes I forget to add an edit summary and would like to add one later.
How would you go about editing the database? I've had a look at the tables. I guess it would be possible to add an extra row to the comment table, incrementing comment_id, but how is comment_hash created? (It's mentioned in Manual:comment table.)
So far I've just worked out how to display the most recent revisions and their comments (or lack of comments) so I would know which revision is relevant.
SELECT rev_id, comment_id, comment_hash, LEFT(comment_text,100), comment_data, LEFT(page_title,40)
FROM prefix_revision r
INNER JOIN prefix_revision_comment_temp rct ON r.rev_id = rct.revcomment_rev
INNER JOIN prefix_comment c ON c.comment_id = rct.revcomment_comment_id 
INNER JOIN prefix_page p ON p.page_id = r.rev_page
ORDER BY rev_id DESC
LIMIT 30;
Jonathan3 (talk) 23:43, 3 January 2023 (UTC)
The algorithm is (signed) crc32 of comment text xor'd with crc32 of comment data. However, i would generally reccomend against manually adding things to DB tables as that can be risky. Bawolff (talk) 02:10, 4 January 2023 (UTC)
Thanks. An extension would be handy. Maybe it could keep earlier comments (or lack of comment) to make1984-style editing of history less likely. Jonathan3 (talk) 13:53, 4 January 2023 (UTC)

My wikis are experiencing issues

MediaWiki version: 1.36.2


PHP: 7.4.33

Hello. Last month, my web host provider migrated their control panel system from cPanel to Plesk. Currently, some of my wikis are having database issues since that problem. I got most of the advice needed from the webhost's staff; however, I experienced some problems while trying to fix the wiki family.

Here is the backtrace:

/mw19/index.php Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Error 1142: SELECT command denied to user 'gjlxrtap_mw3333'@'localhost' for table 'mwd50q_user' (localhost) Function: User::loadFromDatabase Query: SELECT user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount,user_actor.actor_id FROM `gjlxrtap_mw19758`.`mwd50q_user` JOIN `mwd50q_actor` `user_actor` ON ((user_actor.actor_user = user_id)) WHERE user_id = 1 LIMIT 1 Newman2 (talk) 16:48, 3 January 2023 (UTC)

The error is saying your username or password to the db is incorrect. I would check if you have the correct info, and if so ask your host. Bawolff (talk) 18:30, 3 January 2023 (UTC)
Here is a more detailed picture of the error:
https://ibb.co/T4mvVv6 Newman2 (talk) 19:11, 3 January 2023 (UTC)
Did anyone read the post above? 65.27.68.21 (talk) 18:55, 4 January 2023 (UTC)
The error message is pretty clear. The database user does not have permission to execute SELECT (the most basic operation on a database). Give proper permissions, or ask your hosting provider if you don't have the ability to modify permissions of the database user. Ciencia Al Poder (talk) 13:47, 5 January 2023 (UTC)

Special:Upload/Special:UploadWizard disappeared from Toolbox

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I noticed recently that the Upload link that is supposed to lead to Special:UploadWizard (I had put in the lines in LocalSettings.php to make the upload link to UploadWizard) disappeared from the Toolbox section of links on the sidebar. I have absolutely no idea what happened or what I'm supposed to do. I first tried deleting the lines in LocalSettings to convert the Upload link to UploadWizard, and reloaded, it didn't work. Then I tried this: Manual:Interface/Sidebar#Add or remove toolbox sections (JavaScript), but that only added the CategoryTree link. If anyone could help that'd be great, thanks Guillaume Taillefer (talk) 00:55, 4 January 2023 (UTC)

What was the code you had in LocalSettings.php that wasn't working? Bawolff (talk) 01:57, 4 January 2023 (UTC)
I didn't have code in LocalSettings.php that wasn't working. I had installed and used UploadWizard before, and have use the command (to turn the Upload link in the Toolbox into a link from Special:Upload to Special:UploadWizard):
$wgExtensionFunctions[] = function() {
$GLOBALS['wgUploadNavigationUrl'] = SpecialPage::getTitleFor( 'UploadWizard' )->getLocalURL();
return true;
};
before, and it worked then and initially when I tried it again a while ago when I installed UploadWizard again. What I was saying was that some time ago the Upload link in the toolbox completely disappeared, and so while trying to figure it out, I tried deleting the above lines of code to see if it reappears, but when I did so the link still didn't come back. Guillaume Taillefer (talk) 02:36, 4 January 2023 (UTC)
bump Guillaume Taillefer (talk) 03:11, 5 January 2023 (UTC)
I finally was able to resolve the issue for the most part. It didn't really have anything to do with UploadWizard, rather there was a file called Mediawiki:Common.js (type that in the url to find it) which for some reason at the end of the js file included:
function CustomizeModificationsOfSidebar() { // adds Special:CategoryTree to toolbox ModifySidebar( 'add', 'toolbox', 'CategoryTree', 'https://wwii-archives.org/index.php/Special:CategoryTree'); // removes Special:Upload from toolbox ModifySidebar( 'remove', 'toolbox', 'Upload file', 'https://wwii-archives.org/index.php/Special:UploadWizard' ); }
jQuery( CustomizeModificationsOfSidebar );
I just changed the second one to 'add' instead of 'remove' and it came back. Guillaume Taillefer (talk) 14:42, 19 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Since my hosting provider upgraded PHP version my websites don't work

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have two MediaWiki websites, both of them are in version 1.38.


Since my hosting provider upgraded PHP version from 7.4 to 8.1 my websites don't work, I just get HTTP error 500 when trying to access them.


What may cause this? 2001:44C8:418B:CB23:4973:D5FB:8175:B00D (talk) 09:19, 4 January 2023 (UTC)

Check php error log. See How to debug Bawolff (talk) 19:14, 4 January 2023 (UTC)
@Bawolff thank you, I did that. I get the following error for both websites:
Fatal error: Uncaught Error: Undefined constant "www" in /home/hanekudai/public_html/hanekudai.com/LocalSettings.php:13 Stack trace: #0 /home/hanekudai/public_html/hanekudai.com/includes/Setup.php(204): require_once() #1 /home/hanekudai/public_html/hanekudai.com/includes/WebStart.php(93): require_once('/home/hanekudai...') #2 /home/hanekudai/public_html/hanekudai.com/index.php(44): require('/home/hanekudai...') #3 {main} thrown in /home/hanekudai/public_html/hanekudai.com/LocalSettings.php on line 13
2001:44C8:4033:B7CE:3158:AD44:9311:87F (talk) 06:06, 5 January 2023 (UTC)
It sounds like you made a typo (probably forgot a quote mark) on line 13 of your LocalSettings.php. older versions of php tended to be a bit more forgiving of that sort of thing. Bawolff (talk) 13:20, 5 January 2023 (UTC)
Indeed, instead just $wgServer it was www.$wgServer.
I have deleted the www. part and now the website works.
Thank you! 2001:44C8:4171:F105:1807:C255:403D:DE62 (talk) 13:37, 5 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Ubuntu 22.10.1 new installed

All Packetes ready, i need start installation from mediawiki.

the message:

Es konnte kein adäquater Datenbanktreiber gefunden werden. Es muss daher ein Datenbanktreiber für PHP installiert werden. Die folgenden Datenbanksysteme werden unterstützt: MariaDB, MySQL (oder kompatible Datenbanksysteme), PostgreSQL, SQLite

Wenn du PHP selbst kompiliert hast, konfiguriere es erneut mit einem aktivierten Datenbankclient, zum Beispiel durch Verwendung von ./configure --with-mysqli. Wenn du PHP von einem Debian- oder Ubuntu-Paket installiert hast, dann musst du auch beispielsweise das php-mysql-Paket installieren...


Where do I start ? Paulkle (talk) 09:46, 4 January 2023 (UTC)

As the error message suggests, do apt install php-mysql Bawolff (talk) 19:14, 4 January 2023 (UTC)

using external_data extension with CSV files in a template

but have them evaluated only on the importing pages with PAGENAME.csv


How do i do that? 24.134.95.253 (talk) 10:58, 4 January 2023 (UTC)

Custom Logo on Every Page

I have PHP code that fetches a QR code for the current page using the API from qr-code-generator.com (which we have a license for).

I'm hoping there is an easy way to replace our $wgLogos 1x image and icon with the generated QR code. Any ideas?

Here is my PHP

<?php

$ACCESS_TOKEN=""; //API Key

$url = "https://api.qr-code-generator.com/v1/create?access-token=" . $ACCESS_TOKEN;

$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";

//The data you want to send via POST

$fields = [

  'frame_name'   => 'no-frame',

  'qr_code_text' => $actual_link,

  'image_format' => 'PNG',

  'qr_code_logo' => 'no-logo',

  'image_width'   => '100'

];

//url-ify the data for the POST

$fields_string = http_build_query($fields);

//open connection

$ch = curl_init();

//set the url, number of POST vars, POST data

curl_setopt($ch,CURLOPT_URL, $url);

curl_setopt($ch,CURLOPT_POST, true);

curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);

//So that curl_exec returns the contents of the cURL; rather than echoing it

curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);

//execute post

$result = curl_exec($ch);

function data_uri($file, $mime)

{

  $base64   = base64_encode($file);

  return ('data:' . $mime . ';base64,' . $base64);

}

?>

<img src="<?php echo data_uri($result,'image/png'); ?>" alt="QR Code" /> Dylan Banta (talk) 19:32, 4 January 2023 (UTC)

I have just created an account, but in the top right corner there is no "Log out" link. OPWNW (talk) 01:35, 5 January 2023 (UTC)

Which website?
The location may vary by skin and also mobile/non mobile. Bawolff (talk) 02:43, 5 January 2023 (UTC)

confirmation email

how long to wait for a confirmation email?~ Vladlen Terezhe (talk) 04:04, 5 January 2023 (UTC)

what website?
For wikimedia wikis (e.g. wikipedia) should be a few minutes. Bawolff (talk) 04:36, 5 January 2023 (UTC)
My site greenwiki.ru. I have already tried three different mail.
@Bawolff Vladlen Terezhe (talk) 07:08, 5 January 2023 (UTC)
If its your own site, then it depends on the mail backend you have setup as well as how fast Job queue is working (for some email types).
are you using $wgSMTP or built in mail. If the former make sure everything is correct for options. If the latter, make sure that system mail is setup correctly, especially SPF, and that the system is configured to send email and no firewall is blocking it. Bawolff (talk) 08:35, 5 January 2023 (UTC)

how long do you have to wait for a confirmation email,,?????

how long do you have to wait for a confirmation email,,????? 185.188.236.67 (talk) 07:20, 5 January 2023 (UTC)
Same problem Vladlen Terezhe (talk) 08:14, 5 January 2023 (UTC)
You should read the reply you got at Project:Support desk/Flow/2023/01#h-confirmation_email-20230105040400 and provide further information there. Sam Wilson 13:36, 5 January 2023 (UTC)
It should be sent as soon as the form is submitted. There may be some delay in delivery, but usually not very long.
Is this on a wiki that you're installing yourself? You might want to check that your web server is able to send email. You might also need to configure $wgSMTP. Sam Wilson 08:07, 5 January 2023 (UTC)

Thumbnailing of images doesn't work on arywiki

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


We've had this problem since forever, and I thought it was just due to a missing JS script or such, but according to this page the fault could lie in LocalSettings.php. But I don't know where to start with editing this script or if I even have the right to access it. Please confirm whether the issue is with LocalSettings.php, and how it can be resolved. Thank you!--~ Ideophagous (talk) 11:28, 5 January 2023 (UTC)

To clarify, I'm talking about images uploaded directly to arywiki, not images from Commons for which thumbnailing works without any issues.-~ Ideophagous (talk) 11:30, 5 January 2023 (UTC)
Weird. They are giving 403 errors. This is definitely a misconfiguration on Wikimedia's end. This is a pretty big issue so i suspect it will be looked into rather quickly. Bawolff (talk) 13:07, 5 January 2023 (UTC)
I have forwarded this report to phabricator at https://phabricator.wikimedia.org/T326309 . There should hopefully be some sort of update there in the next few days. Bawolff (talk) 13:12, 5 January 2023 (UTC)
Thanks for reporting this via Phabricator; it's now fixed. MVernon (WMF) (talk) 14:51, 5 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Deprecated: strcasecmp(): Passing null to parameter #1

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have activated debugging mode and found this:
Deprecated: strcasecmp(): Passing null to parameter #1 ($string1) of type string is deprecated in /home/user/public_html/example.com/includes/session/CookieSessionProvider.php on line 99
This may be associated with the fact that my hosting provider recently upgraded the PHP version from 7.4 to 8.1

What should I do about that, if at all? 2001:44C8:4171:F105:1807:C255:403D:DE62 (talk) 13:40, 5 January 2023 (UTC)

This has been solved in MediaWiki 1.38.3 and later. See T248925#8245333 Ciencia Al Poder (talk) 13:44, 5 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Form Descriptor Sequence Problem, Possibly Bug

A form in a special page which is generated by


$formDescriptor2 =   [
'ainform' => [ 'class' => 'HTMLInfoField', 'default' => 'Infotext', 'raw' => true, 'type' => 'info'],
'zip'     => [ 'section' => 's2', 'class' => 'HTMLCheckField',  'label' => 'Compress', 'name' => 'compressed', 'type' => 'check'],
'enc'     => [ 'section' => 's1','class' => 'HTMLCheckField',  'label' => 'Encrypt', 'name' => 'encrypted', 'type' => 'check'],
];


has the "Infotext" at the end.

I was expecting the "Infotext" at the beginning.

What is going wrong here?

How should I describe a form when I want the form to start with an info text?

This is with 1.38.0 (0ab0e77). Tigelriegel (talk) 16:03, 5 January 2023 (UTC)

Its probably because the other elements are in a section which moght change the order. Bawolff (talk) 21:25, 5 January 2023 (UTC)
Yes. Form some of my experiments I can confirm this.
I suspect this is a bug in the class interpreting the form descriptors.
I am not familiar with phabricator or gerrit but would like to raise this as an issue / bug report. How can I do so? 217.95.171.60 (talk) 15:04, 6 January 2023 (UTC)

MediaWiki 1.35.6-1061 on Synology DSM & Composer error

After I install composer 3.5.1 on Synology DSM 7 with a fresh install of MediaWiki 1.35.6-1061, I get the following error. What gives?


Warning: require(/volume1/web_packages/mediawiki/vendor/composer/../param-processor/param-processor/DefaultConfig.php): failed to open stream: Permission denied in /volume1/web_packages/mediawiki/vendor/composer/autoload_real.php on line 45 Fatal error: require(): Failed opening required '/volume1/web_packages/mediawiki/vendor/composer/../param-processor/param-processor/DefaultConfig.php' (include_path='/volume1/web_packages/mediawiki/vendor/pear/console_getopt:/volume1/web_packages/mediawiki/vendor/pear/mail:/volume1/web_packages/mediawiki/vendor/pear/mail_mime:/volume1/web_packages/mediawiki/vendor/pear/net_smtp:/volume1/web_packages/mediawiki/vendor/pear/net_socket:/volume1/web_packages/mediawiki/vendor/pear/pear-core-minimal/src:/volume1/web_packages/mediawiki/vendor/pear/pear_exception:.:/usr/share/pear') in /volume1/web_packages/mediawiki/vendor/composer/autoload_real.php on line 45 Drewsaur (talk) 16:10, 5 January 2023 (UTC)

Am I doomed? Drewsaur (talk) 14:19, 7 January 2023 (UTC)
/volume1/web_packages/mediawiki/vendor/composer/../param-processor/param-processor/DefaultConfig.php: failed to open stream: Permission denied
Looks like a (file) permission problem. Check read permissions of that file and folder. Ciencia Al Poder (talk) 15:20, 7 January 2023 (UTC)
I realize I had tried to install a plugin after installing composer.
Started from scratch, only installing composer and then running a composer update, now getting the following:
Warning: require(/volume1/web_packages/mediawiki/vendor/composer/../sabre/event/lib/coroutine.php): failed to open stream: Permission denied in /volume1/web_packages/mediawiki/vendor/composer/autoload_real.php on line 45 Fatal error: require(): Failed opening required '/volume1/web_packages/mediawiki/vendor/composer/../sabre/event/lib/coroutine.php' (include_path='/volume1/web_packages/mediawiki/vendor/pear/console_getopt:/volume1/web_packages/mediawiki/vendor/pear/mail:/volume1/web_packages/mediawiki/vendor/pear/mail_mime:/volume1/web_packages/mediawiki/vendor/pear/net_smtp:/volume1/web_packages/mediawiki/vendor/pear/net_socket:/volume1/web_packages/mediawiki/vendor/pear/pear-core-minimal/src:/volume1/web_packages/mediawiki/vendor/pear/pear_exception:.:/usr/share/pear') in /volume1/web_packages/mediawiki/vendor/composer/autoload_real.php on line 45 Drewsaur (talk) 21:08, 7 January 2023 (UTC)
UPDATE: Solved this. So, I am in an environment that requires me to run composer using sudo. After running composer, I definitely have to run the following:
sudo chown -R MediaWiki:http vendor/
sudo chmod -R 755 vendor/
I am all set after I do that! Drewsaur (talk) 22:29, 7 January 2023 (UTC)
sudo chmod -R 755 vendor/
This will make all files executable. You probably don't want to do that :)
Be more specific about files and folders:
sudo find vendor -type d -exec chmod 755 {} \;
sudo find vendor -type f -exec chmod 644 {} \; Ciencia Al Poder (talk) 11:46, 8 January 2023 (UTC)

Trouble upgrading

Hi there,


I tried to upgrade my Wiki to V1.39.1 using the update.php. This is the error I'm getting. Can anybody give me a hint what to do...?


...collations up-to-date.

...have rev_actor field in revision table.

...have img_description_id field in image table.

...slots table already exists.

...have slot_origin field in slots table.

...content table already exists.

...slot_roles table already exists.

...content_models table already exists.

...actor table already exists.

...have ar_actor field in archive table.

...have ipb_by_actor field in ipblocks table.

...have img_actor field in image table.

...have oi_actor field in oldimage table.

...have fa_actor field in filearchive table.

...have rc_actor field in recentchanges table.

...have log_actor field in logging table.

Changing 'revision.rev_text_id' default value.

...table site_stats already modified by patch patch-site_stats-modify.sql.

...index rc_namespace_title_timestamp already set on recentchanges table.

...change_tag_def table already exists.

Running maintenance/deduplicateArchiveRevId.php...

...Update 'DeduplicateArchiveRevId' already logged as completed. Use --force to run it again.

done.

...have ct_tag_id field in change_tag table.

...index ar_revid_uniq already set on archive table.

...index log_type_action already set on logging table.

...type_action key doesn't exist.

...index PRIMARY already set on interwiki table.

...index PRIMARY already set on page_props table.

...index PRIMARY already set on protected_titles table.

...index PRIMARY already set on site_identifiers table.

...index rc_this_oldid already set on recentchanges table.

...transcache doesn't exist.

Running maintenance/populateChangeTagDef.php...

...Update 'PopulateChangeTagDef' already logged as completed. Use --force to run it again.

done.

...change_tag_rc_tag key doesn't exist.

...have ipb_sitewide field in ipblocks table.

...ipblocks_restrictions table already exists.

...change_tag table does not contain ct_tag field.

...valid_tag doesn't exist.

...tag_summary doesn't exist.

...archive table does not contain ar_comment field.

...ipblocks table does not contain ipb_reason field.

...image table does not contain img_description field.

...oldimage table does not contain oi_description field.

...filearchive table does not contain fa_description field.

...recentchanges table does not contain rc_comment field.

...logging table does not contain log_comment field.

...protected_titles table does not contain pt_reason field.

...table job already modified by patch patch-job-params-mediumblob.sql.

...ar_usertext_timestamp key doesn't exist.

...usertext_timestamp key doesn't exist.

...archive table does not contain ar_user field.

...ipblocks table does not contain ip_by field.

...img_user_timestamp key doesn't exist.

...image table does not contain img_user field.

...oldimage table does not contain oi_user field.

...filearchive table does not contain fa_user field.

...recentchanges table does not contain rc_user field.

...logging table does not contain log_user field.

...index un_user_ip already set on user_newtalk table.

...watchlist_expiry table already exists.

...page_restrictions in table page already modified by patch patch-page_restrictions-null.sql.

...index ipb_address_unique already set on ipblocks table.

Table archive contains ar_text_id field. Dropping...

An error occurred:

Error 1091: Can't DROP 'ar_content_model'; check that column/key exists

Function: Wikimedia\Rdbms\Database::sourceFile( /hp/ax/ab/es/www/HuskyWiki/maintenance/archives/patch-archive-MCR.sql )

Query: ALTER TABLE `archive`

DROP COLUMN ar_text_id,

DROP COLUMN ar_content_model,

DROP COLUMN ar_content_format TexasR87 (talk) 20:01, 5 January 2023 (UTC)

I was searching the internet for you and found that you had exactly the same problem when you upgraded to 1.37.1 last year, at Project:Support desk/Flow/2022/01#h-Error_1091:_Can't_DROP_'ar_content_model'-2022-01-12T18:05:00.000Z. Bawolff's advice then was "Try running each command in /hp/ax/ab/es/www/HuskyWiki/maintenance/archives/patch-archive-MCR.sql seperately. You may have gotten to a state where the update is half applied". After that then I guess you could try update.php again. Jonathan3 (talk) 09:27, 6 January 2023 (UTC)
Found this discussed at https://phabricator.wikimedia.org/T238966 and the content of patch-archive-MCR.sql at https://gerrit.wikimedia.org/r/c/mediawiki/core/+/552339/19/maintenance/archives/patch-archive-MCR.sql Jonathan3 (talk) 09:35, 6 January 2023 (UTC)

Exclude content from search results snippets

I am using the following

<div class="noexcerpt nomobile noprint searchaux navigation-not-searchable">

but I still get content from that div in search results snippets (MW 1.31/CirrusSearch). Am I missing something? Spiros71 (talk) 09:02, 6 January 2023 (UTC)

Using External Data Extension in a Template

Hi all!


I want to create a template page that gathers data to display from the external data extension. This template is called Template:Host and it shall display data like ip-addresses and host configuration.


The data resides in CSV and JSON files and accessing them works fine. The files are distributed in the file system and named <hostname>.csv or <hostname>.json


However i want to use this template in other pages and the data collected from the extension depends on the name. Say i have the page Host:somehost that includes {{ template:host }}. The external data plugin should then look for data in somehost.csv and somehost.json


So far i have only gotten it to work looking in Template:Host.json with the use of {{PAGENAME}}


What’s the secret to make this work?

is it something with {{subst:}} ?


please help 24.134.95.253 (talk) 13:33, 6 January 2023 (UTC)

Can you paste the template code you are using? Bawolff (talk) 21:16, 6 January 2023 (UTC)
{{infobox | abovestyle  = | above       = | image       = | caption     = | headerstyle = | title   = {{{name|{{#sub:{{PAGENAME}}|5}}}}} | header1     = | label1      = Hostname | data1       = {{{name|}}} | header2     = | label2      = Proxmox-ID | data2       = {{#if: {{{name|}}}|{{#external_value:proxmox_id
                            |source=vmdata
                            |format=csv with header
                            |delimiter=;
                            |file name={{{name|{{#sub:{{PAGENAME}}|5}}}}}.csv}}|0}} | label3      = CPU# | data3       = {{{numcpu|}}} | label4      = Disk Size | data4       = {{unbulleted list|{{{disk1|}}}|{{{disk2|}}}|{{{disk3|}}}|{{{disk4|}}}|{{{disk5|}}}|{{{disk6|}}}|{{{disk7|}}}|{{{disk8|}}}|{{{disk9|}}}|{{{disk10|}}}|}} | label5      = RAM
 | data5       = {{#if: {{{name|}}}|{{#external_value:ram       
                             |source=vmdata
                             |format=csv with header
                             |delimiter=;
                             |file name={{{name|{{#sub:{{PAGENAME}}|5}}}}}.csv}} GB|0 GB}}
| label6 = IP-Addressen | data6  = {{unbulleted list|{{{ipaddress1|}}}|{{{ipaddress2|}}}|{{{ipaddress3|}}}|{{{ipaddress4|}}}|{{{ipaddress5|}}}|{{{ipaddress6|}}}|{{{ipaddress7|}}}|{{{ipaddress8|}}}|label7=Standort|data7={{#if: {{{name|}}} | 
                       {{#external_value:location
                           |source=vmdata
                           |format=csv with header
                           |delimiter=;
                           |file name={{{name|{{#sub:{{PAGENAME}}|5}}}}}.csv
                       }}|
                       none}}}} }}

62.72.73.138 (talk) 12:16, 9 January 2023 (UTC)

i’ll shorten it.
{{infobox 
| label1 = label
| data1 = {{#if {{{name|}}} |
{{#external_valuecsvrow
| source=vmdata
| format=csv with header
| delimiter=;
| file name={{{name
| {{#sub{{PAGENAME}}|5}}
}}}.csv
}}|
empty
}}
}}

62.72.73.138 (talk) 12:24, 9 January 2023 (UTC)

About Install MediaWiki on Windows 10

I'm wondering if anybody successfully downloaded and mounted the latest image to Docker container. I had trouble to figure out the command to run in PowerShell to install MediaWiki.


https://github.com/wikimedia/mediawiki/blob/master/DEVELOPERS.md

1) Install PHP dependencies from Composer:

   docker compose exec mediawiki composer update


Please note I was only able to run the above composer update command after I put https://github.com/wikimedia/mediawiki/blob/master/composer.json file at the same level of docker-compose.yml directory.


2) Install MediaWiki:

   docker compose exec mediawiki /bin/bash /docker/install.sh

Windows users: make sure you run the above command in PowerShell as it does not work in Bash.


Could you please provide more clear instructions here on how to run install command in PowerShell? It took me hours trying again and again without success. Then I searched online and found this workaround https://phabricator.wikimedia.org/T246953 However, the author did not indicate where should I put the install.sh script. I save the file at the same level of docker-compose.yml directory and it does not work! I really need to make the MW installation work on my Windows. I do have Docker Desktop installed.


I'm looking forward to seeing my site as described below:

Done! The wiki should now be available for you at http://localhost:8080.


For the time being, it shows "File not found."


In addition, would docker-compose.yml and .env files suffice to set up the latest mediawiki version? I saw so many files at https://github.com/wikimedia/mediawiki How many would I need to download to make it work? Please clarify. Many thanks. Hyang26 (talk) 18:06, 6 January 2023 (UTC)

I think I'm really puzzled why the docker-compose.yml file did not work on my local as expected...
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/docker-compose.yml
Would I need to run docker pull manually or docker-compose.yml should take care of it?
https://docker-registry.wikimedia.org/dev/buster-php81-fpm/tags/
docker pull docker-registry.wikimedia.org/dev/buster-php81-fpm:1.0.0
version: '3.7'
services:
  mediawiki:
   image: docker-registry.wikimedia.org/dev/buster-php81-fpm:1.0.0
   volumes:
     - ./:/var/www/html/w:cached
   env_file:
     - '.env'
What I noticed is after I ran "docker-compose up", the images listed in the docker composer yml file were not downloaded and mounted to the docker container.
image: docker-registry.wikimedia.org/dev/buster-php81-fpm:1.0.0
image: docker-registry.wikimedia.org/dev/buster-apache2:2.0.0-s1
image: docker-registry.wikimedia.org/dev/buster-php81-jobrunner:1.0.0
=================================================================================
I have below sample docker-compose.yml worked perfectly! However, the default image: mediawiki is for version <meta name="generator" content="MediaWiki 1.38.4"/>
I want to set up the latest version with PHP8.1 yet current docker-compose.yml does not seem working on my local PC. https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/docker-compose.yml
# MediaWiki with MariaDB
# Access via "http://localhost:8080"
version: '3.7'
services:
  mediawiki:
   container_name: wiki
   image: mediawiki
   restart: always
   ports:
     - 8080:80
   links:
     - database
   volumes:
     - $HOME/volumes/mediawiki/images:/var/www/html/images
     # After initial setup, download LocalSettings.php to the same directory as
     # this yaml and uncomment the following line and use compose to restart
     # the mediawiki service
     - $HOME/volumes/mediawiki/LocalSettings.php:/var/www/html/LocalSettings.php
  database:
   image: mariadb
   container_name: db
   restart: always
   ports:
       - 3306:3306
   environment:
     # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
     MYSQL_RANDOM_ROOT_PASSWORD: 1
     MYSQL_DATABASE: my_wiki
     MYSQL_USER: wikiuser
     MYSQL_PASSWORD: example
   volumes:
      - $HOME/volumes/mysql/data:/var/lib/mysql
Many thanks for your help. Hyang26 (talk) 21:43, 6 January 2023 (UTC)

The gallery on a number of pages is broken, showing what looks like HTML. On other pages the gallery works fine. Any thoughts on why this might be? 162.83.166.96 (talk) 00:54, 7 January 2023 (UTC)

link? Bawolff (talk) 02:27, 7 January 2023 (UTC)
Thank you for your query. I will try to send link. There is a PW on the site, so I have to work around that. 67.83.25.198 (talk) 13:22, 10 January 2023 (UTC)

Mediawiki V.1.39.1

Hello,


I would like to upgrade from version 1.38.4 to version 1.39.1

I downloaded version 1.39.1 and I replaced all the files on my database (except LocalSettings.php and the "extensions" and "images" directories)

My wiki no longer gives anything (there remains the logo that I had modified), are there other modifications to make for it to work?

Thanks Schub srx (talk) 14:53, 7 January 2023 (UTC)

See Manual:Common errors and symptoms. If you can't resolve the issue, provide more information, including descriptive error messages. Ciencia Al Poder (talk) 15:16, 7 January 2023 (UTC)
Thank you
i have this message, i don't understand what i have to do
Erreur fatale: Erreur non interceptée : Interface "Wikimedia\Rdbms\Platform\ISQLPlatform" introuvable dans /homepages/3/d938089406/htdocs/clickandbuilds/MediaWiki/Srxteam/includes/libs/rdbms/database/IDatabase.php:39 Stack trace : #0 /homepages/3/d938089406/htdocs/clickandbuilds/MediaWiki/Srxteam/includes/AutoLoader.php(116): require() #1 /homepages/3/d938089406/htdocs/clickandbuilds/MediaWiki/Srxteam/includes/libs/rdbms/ Définit.php(9): AutoLoader::autoload('Wikimedia\\Rdbms...') #2 /homepages/3/d938089406/htdocs/clickandbuilds/MediaWiki/Srxteam/includes/Defines.php(24): require_once( '/homepages/3/d9...') #3 /homepages/3/d938089406/htdocs/clickandbuilds/MediaWiki/Srxteam/includes/Setup.php(110): require_once('/homepages/3/d9... ') #4 /homepages/3/d938089406/htdocs/clickandbuilds/MediaWiki/Srxteam/includes/WebStart.php(93): require_once('/homepages/3/d9...') #5 /homepages/3/d938089406/htdocs/clickandbuilds/MediaWiki/Srxteam/index.php(44): require('/homepages/3/d9...') # 6 {principal} ajouté/homepages/3/d938089406/htdocs/clickandbuilds/MediaWiki/Srxteam/includes/libs/rdbms/database/IDatabase.php à la ligne 39 Schub srx (talk) 14:49, 8 January 2023 (UTC)
The error message is about a class interface not found. This is usually a missing composer dependency that may be solved by running "composer update --no-dev" (see Composer#Usage_in_MediaWiki_core). However,
Apparently, you're using a "click and build" application (from IONOS, maybe?), because of the name of one of the intermediate folders, which suggests you should contact their support. Ciencia Al Poder (talk) 18:07, 8 January 2023 (UTC)
ISQLPlatform is a core class, so it is probably not a composer issue, but missing mediawiki core files.
I agree that it seems likely a problem with the click and build application. Bawolff (talk) 03:11, 9 January 2023 (UTC)
Tks a lot, i will contact the support of ionos Schub srx (talk) 19:47, 9 January 2023 (UTC)

upgrade from version 1.26.3 to 1.39.x (LTS)

hello, my professor at the federal university of uberlândia uses MediaWiki 1.26.3 and we would like to update it to the latest version lts has anyone done this or have any idea how to do it?. 179.155.91.90 (talk) 14:57, 7 January 2023 (UTC)

See Manual:Upgrading. However, you'll have to upgrade to 1.35 first, run update.php, and then upgrade to 1.39, because the upgrade straight to 1.39 straight from versions before 1.35 will cause data loss due a bug still not fixed. Ciencia Al Poder (talk) 15:18, 7 January 2023 (UTC)

Overwritten LocalSettings.php - how to restore or reinstall?

Hi, I have inadvertedly overwritten the LocalSettings.php and no backup. Is there any way to restore the file or at least set up a new Mediawiki installation with the old database, so the wiki content is restored? 2A01:C22:A819:1B00:476F:9A98:414A:B1F0 (talk) 15:37, 7 January 2023 (UTC)

you should be able to re-run the installer to regenerate LocalSettings.php. just make sure you enter the same db info as you did the first time.
Of course any post-install changes you made to LocalSettings.php are lost. Bawolff (talk) 19:58, 7 January 2023 (UTC)

translate: why sometimes a menu 'Page state'

Hi all, I focus on message translations and as it is a cross site activity, i have observed sometimes the presence of a page State menu depending on the site.

For example on this WIKIDATA translation page there is a single drop down menu with the State of the page: 'progress, need updating...' and I can modify it as I want.

What is this used for ? where are described the rules of use  ?

MediaWiki has not this box. So when does this box appear ? and how is its goal useful ?

Thanks.

Christian 🇫🇷 FR (talk) 14:01, 8 January 2023 (UTC)

The feature is behind a flag, so (I guess) it's not enabled on mediawiki.org, since you are not seeing it. What it does is that, it communicates state of translation. For that particular translation, you can see at which state/stage each language is here at MessageGroupStats. – Ammarpad (talk) 14:14, 9 January 2023 (UTC)
The 'state' should then be deduced automatically by the system from the level of progression of the translations as same as from the level of rereadings of the page through a described lifecycle. It remains strange for me that a translator can force the new state from the menu... May be someone could bring more informations about this functionnality and discuss of its real utility. Christian 🇫🇷 FR 🚨 (talk) 14:41, 9 January 2023 (UTC)

Special:QuizGameHome

[90d81b3a0773b0d27e23e595] /ethiowiki/index.php/Special:QuizGameHome Error: Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::useIndexClause()

Backtrace:

from C:\xampp\htdocs\ethiowiki\includes\libs\rdbms\database\DBConnRef.php(103)

#0 C:\xampp\htdocs\ethiowiki\extensions\QuizGame\includes\specials\SpecialQuizGameHome.php(191): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#1 C:\xampp\htdocs\ethiowiki\extensions\QuizGame\includes\specials\SpecialQuizGameHome.php(884): QuizGameHome->getNextQuestion()

#2 C:\xampp\htdocs\ethiowiki\extensions\QuizGame\includes\specials\SpecialQuizGameHome.php(126): QuizGameHome->launchGame()

#3 C:\xampp\htdocs\ethiowiki\includes\specialpage\SpecialPage.php(701): QuizGameHome->execute(NULL)

#4 C:\xampp\htdocs\ethiowiki\includes\specialpage\SpecialPageFactory.php(1428): SpecialPage->run(NULL)

#5 C:\xampp\htdocs\ethiowiki\includes\MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)

#6 C:\xampp\htdocs\ethiowiki\includes\MediaWiki.php(904): MediaWiki->performRequest()

#7 C:\xampp\htdocs\ethiowiki\includes\MediaWiki.php(562): MediaWiki->main()

#8 C:\xampp\htdocs\ethiowiki\index.php(50): MediaWiki->run()

#9 C:\xampp\htdocs\ethiowiki\index.php(46): wfIndexMain()

#10 {main} Adugna.assefa (talk) 17:39, 8 January 2023 (UTC)

I faced error while using QuizGame in mediawiki version 1.39.1and any support? Adugna.assefa (talk) 17:42, 8 January 2023 (UTC)
See also phab:T322959 Bawolff (talk) 22:53, 8 January 2023 (UTC)

mediawiki "upstream connect error"

I access in my browser to URL : https://www.mediawiki.org/wiki/Manual:SkinMustache.php/fr

Blanked page with message

upstream connect error or disconnect/reset before headers. reset reason: overflow

ok after reload. Christian 🇫🇷 FR 🚨 (talk) 20:37, 8 January 2023 (UTC)

It should be fixed now. Bawolff (talk) 23:41, 8 January 2023 (UTC)
thanks, has been transitional. Christian 🇫🇷 FR 🚨 (talk) 11:04, 9 January 2023 (UTC)

Image on the frontpage?

Hello

I wanted to add an image to the frontpage of my wiki in the middle of the site and tried to add it with "File:imageiwanted.png" but that did not work. Is there anyway i can add an image to the that page ? 81.170.199.8 (talk) 23:39, 8 January 2023 (UTC)

the same with having [[ ]] tags around it. Nothing appears at all :( 81.170.199.8 (talk) 23:47, 8 January 2023 (UTC)
Is the image in question uploaded to your wiki?
Can you paste the exact text of what you typed (and what is surrounding it)?
If the wiki is public, a link to your wiki would be helpful. Bawolff (talk) 03:09, 9 January 2023 (UTC)

Thumbnails of images showing shortened/compressed versions not full size

Hello, I found out recently that thumbnails of images with a certain width will not be shown properly. Here is the original image file in question: https://wwii-archives.org/index.php/File:T%C3%A9l%C3%A9grame_de_Raymond_Traumann_au_Bureau_Commandment_Recrutements_Rouen_8_Juin_1940.pdf

And here is what happens when I try to put it in an article:

https://wwii-archives.org/index.php/User:GTaillefer/sandbox

What could I do to fix this? Thanks Guillaume Taillefer (talk) 00:03, 9 January 2023 (UTC)

it looks like its been fixed now(?) Bawolff (talk) 06:37, 9 January 2023 (UTC)
How? When I put it on an article, it compresses the image so that it is not the complete width that it actually is, making it look squished, while now when you go to see the image on its file page it is displayed like normal. Guillaume Taillefer (talk) 21:42, 9 January 2023 (UTC)
oh weird, it looks correct on my cell phone (in timeless), but not when i view on desktop.
I suspect this has something to do with the size of the image detected as being "404.595 x 773.865 pts (rotated 90 degrees)", where the rotation isn't being applied properly. https://wwii-archives.org/api.php?action=query&prop=imageinfo&iiprop=dimensions%7Cmetadata&titles=File:T%C3%A9l%C3%A9grame_de_Raymond_Traumann_au_Bureau_Commandment_Recrutements_Rouen_8_Juin_1940.pdf&page=2
Possibly this is caused by phab:T227482 Bawolff (talk) 22:03, 9 January 2023 (UTC)
What is your version of pdfinfo (i.e. the output of pdfinfo -v) Bawolff (talk) 22:28, 9 January 2023 (UTC)
I checked my phone too and I get your same result and was wondering if you were using a phone lol. I just checked and it seems I didn't download pdfinfo. Let me try and figure out how I did that originally and come back to you Guillaume Taillefer (talk) 23:26, 9 January 2023 (UTC)
Nevermind I do have it it is just in a different folder than the pdfinfo command would find because I am on shared hosting and so cannot modify usr/bin/. Anyways it says that it is xpdf version 4.02 so therefore it would be pdfinfo version 4.02 Guillaume Taillefer (talk) 23:47, 9 January 2023 (UTC)
So most people now a days use the poppler version of pdfinfo not the xpdf version, so it might be subtle differences with that. Bawolff (talk) 09:38, 10 January 2023 (UTC)
I will try to download that but I will see if the bluehost sharedhosting will even let me try. I'll come back if it was successful and/or I had any issues. Thanks Guillaume Taillefer (talk) 13:01, 10 January 2023 (UTC)
Ok so I tried downloading poppler to my bin folder and replaced the previous pdfinfo and pdftotext commands with:
$wgPdfInfo = "/home2/wwiiarch/bin/poppler-23.01.0/utils/pdfinfo.cc";
$wgPdftoText = "/home2/wwiiarch/bin/poppler-23.01.0/utils/pdftotext.cc";
(Note that I also tried pdfinfo.1 and pfdtotext.1 and still doesn't do anything), and I tried going back to the links I had sent, and nothing changed. I then tried deleting the two lines entirely, and checked back and essentially nothing changed. Idk what exactly to do here, maybe it has something to do with having to configure poppler or something like that but I can't really find anything on it. Guillaume Taillefer (talk) 13:32, 12 January 2023 (UTC)
.cc is the source code, and .1 would be the manual page. You would have to find a version that is already compiled into a binary for you or you would have to compile it yourself. Bawolff (talk) 19:15, 12 January 2023 (UTC)

Ограничение доступа к определенным страницам Wiki

Вопрос в следующем. У меня есть Wiki общедоступная. Мне необходимо создать на ней страницу и ограничить доступ только к ней (при этом остальной контент будет доступен всем). Если я создам группу пользователей, смогу ли я ограничить доступ к этой единственной странице для всех остальных пользователей и будет ли такое ограничение влиять на простых обывателей открывших мою Wiki (имею ввиду не зарегистрированных) 109.232.255.173 (talk) 15:07, 9 January 2023 (UTC)

See Manual:Preventing access Malyacko (talk) 16:26, 9 January 2023 (UTC)

Manual:$wgGroupPermissions

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello! Could you tell me which exactly files I should open to find this table in my wiki? Thanks! AlPaD (talk) 20:26, 9 January 2023 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

RecentChanges doesn't work correctly in de-Wikibooks

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The parameters in URL aren't interpreted correctly:

https://de.wikibooks.org/wiki/Spezial:Letzte_%C3%84nderungen?hidebots=1&hidecategorization=1&limit=500&days=14&enhanced=1&urlversion=2

but the result shows only about 40 items (2023-01-09 22:31 MEZ and later). My latest request at 2023-01-09 15:00 MEZ worked correctly. – At de-WP or en-WB I see no problems.

MediaWiki 1.40.0-wmf.17 (a638bfe)

22:41, 2. Jan. 2023

PHP 7.4.33 (fpm-fcgi)
MariaDB 10.4.26-MariaDB-log

Please, let me read the complete result. Juetho (talk) 08:45, 10 January 2023 (UTC)

@Juetho Hi, this seems to be about a Wikimedia wiki and not the MediaWiki software. Can you please report a bug in Phabricator via How to report a bug instead? The problem does not happen when hiding Wikidata edits (URL parameter: hideWikibase=1) it seems? Malyacko (talk) 09:29, 10 January 2023 (UTC)
@Malyacko You're alright: Hiding Wikidata edits works.
I'll use Phabricator – thanks for this hint. I told a bug some years ago and didn't remember the best way. Juetho (talk) 15:32, 10 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Automatic translation can not be bypassed?!

Hi,

I have a (german) wiki and want to add a link to my FAQ-Page in the sidebar. If I add the link (**FAQ|FAQ) to my sidebar, it automatically translates the "FAQ" itto the german term ("Häufig gestellte Fragen"). So I canched the page "MediaWiki:Faq" from the german term to "FAQ". This doesen't change anything. Also I can see, that the link to the page "FAQ" is automatically (?) replaced by a link to page "Häufig_gestellte_Fragen".

How can I change the shown text to FAQ, instead of the german translation? Can anyone helpt me? Thank you :) 212.185.80.5 (talk) 08:56, 10 January 2023 (UTC)

If you put FAQ, i would expect the relavent page to be mediawiki:FAQ not mediawiki:Faq. Mostly i would suggest using some other keyword, like faq-text, that is not already in use, and then creating MediaWiki:faq-text to be FAQ. Bawolff (talk) 09:34, 10 January 2023 (UTC)
Edit MediaWiki:Faqpage on your wiki to point to your actual FAQ page.
The change on the MediaWiki:FAQ page should be displayed. Maybe it takes a while to update, or maybe your preferences are using a German variant different from your wiki's default language (de-at is a different language than de or de-formal), and you're seeing the contents of MediaWiki:FAQ/de-at or similar.
Alternatively, set the sidebar to something like:
    • Faq1|Faq2
And edit MediaWiki:Faq1 and MediaWiki:Faq2 respectively. Since they're not standard messages, there's no way they could be translated in other languages to pick a wrong one. Ciencia Al Poder (talk) 09:37, 10 January 2023 (UTC)

Space in image filename

Hi,

I upgraded my mediawiki from 1.29 to 1.39 in three steps (1.29 -> 1.31 then 1.31 -> 1.35 then 1.35 -> 1.39) and it seems to work...for now...

But I have a little bug...Some images are not displayed and an error message appears about vignette rendering.

Whe I look at the code of the page it appears that there is a space in the name of the picture file.

Filename on the system : my_image.png

The link in mediawiki : [ [ my image.png ] ]

In my 1.29 mediawiki version, it works but it didn't work anymore in 1.39.

So I change [ [ my image.png ] ] in [ [ my_image.png ] ] : replacing the space " " in a "_" as in the filesystem and it works now !

My question is how to query the database in order to find ALL files with a space in its name to correct it. I don't want to look at each page of my wiki !

Thanx Fabrice9164 (talk) 16:00, 10 January 2023 (UTC)

What's the exact error? The normal syntax is [[File:my_image.png]] not [[my_image.png]]. It really shouldn't matter in a link whether you use space or underscore.
Are you sure that it is changing the space tgat is fixing it, and not simply editing the page?
To actually answer your question, it doesn't sound like you want to find images with spaces in them but links with spaces? You might want extension:ReplaceText Bawolff (talk) 20:14, 10 January 2023 (UTC)
Thank you @Bawolff, yes you're right, the link is [[Image:my image.png]] and yes, if I change the space in the link with a _ as in the file name, the image appears in my 1.39 mediawiki instead of this (french) error message : Erreur lors de la création de la vignette: impossible d'enregistrer la vignette sur la destination Fabrice9164 (talk) 14:02, 11 January 2023 (UTC)
After digging a while and a clue given by @Bawolff it appears that the issue is not the space in the file name but the tag in front of the filename.
If there is the tag "Image:" in front of file name, the image appears on 1.29 mediawiki but not on 1.39 mediawiki (french error message above).
BUT if I replace "Image:" by "File:" in the 1.39 mediawiki, then the image appears ok with no error.
So is there a tip to find all "Image:" tag and replace them with "File:" ? I tried ReplaceText but it doesn't find the tag "Image:"
Thanx Fabrice9164 (talk) 14:42, 11 January 2023 (UTC)
Image is a english alias as well as the old name of the canonical "File" namespace. As far as I know, image should still be a alias for file, at least it seems to be on fr.wikipedia.org.
Not sure why it would break. —TheDJ (Not WMF) (talkcontribs) 22:26, 11 January 2023 (UTC)

Removing/Deleting a page.

Hello Developers,

I am using a JsCalendar extension and wanted to know how can i delete the event pages which are no more required. I have created all the pages in the "Event:" namespace and they are reflecting in my JsCalendar but if I want to remove any event how do i do it?

I already tried the move function and then changing the namespace of the page, but it's redirecting it to a new page and the event still reflects on my JsCalendar.

Can you also suggest how do i stop the redirection either page by page or global to namespace?


Thankyou in advance. Shek sh11 (talk) 16:32, 10 January 2023 (UTC)

From what i'm reading, you can simply navigate to the page and delete it. Events are just Pages with pagenames as defined by the calendar widget that is showing the events. —TheDJ (Not WMF) (talkcontribs) 22:31, 11 January 2023 (UTC)

Intermittently, can’t view or create pages beginning with forward slash:

A link to https://teflpedia.com//foo switches to https://foo -- but only some of the time. Some of the time it works just fine. Others, not.

(annoyingly, it seems to be working OK for now, but later...)

I think I’ve got a possible cause. If I go to https://teflpedia.com/Special:Version

Script path is specified as / when its default should be /w. Is that what’s causing this problem? And if so, will changing the script path to default solve the problem, and how can Roger the site owner do that?

Otherwise MW 1.35.1 and PHP 7.3.33

I reported as bug but the bug ppl said it was a setup issue. Bugreporter (talk) 04:22, 11 January 2023 (UTC)

It doesn't look like there's any issue with $wgScriptPath as you've got it. Every page I load on that wiki loads fine, even with the two slashes. Have you found a repeatable way to make it fail when there are two slashes? Maybe it's something odd in your web browser? Sam Wilson 07:30, 11 January 2023 (UTC)
Thanks for looking.
The problem is active now.
Checked it with Google chrome, Microsoft Edge, and on my phone (which is not on the WiFi). All show the same behaviour. Bugreporter (talk) 08:31, 11 January 2023 (UTC)
I can confirm that the pages starting with a / are turned into protocol relative links on https://teflpedia.com/Special:PrefixIndex?prefix=%2F&namespace=0
It is a bug when using a $wgArticlePath of /$1 using an alternative $wgArticlePath would prevent this.
See phab:T40048 Bawolff (talk) 09:02, 11 January 2023 (UTC)
Thanks.
Any recommendations to get this fixed? Can we change $wgArticlePath easily? Just a change in local settings.php or does that have downstream effects? Bugreporter (talk) 09:29, 11 January 2023 (UTC)
It would change the urls.
If you set it to $wgArticlePath = '/index.php?title=$1'; it would just work (with uglier urls). If you want to change it to something like /wiki/$1 you have to adjust your webserver config to make it work.
Manual:Short Url has more details on various options.
Unfortunately the bug has been open for basically ever, so it doesn't look like there is much interest in fixing the bug. Bawolff (talk) 10:41, 11 January 2023 (UTC)
Thanks.
What's the recommended solution to the issue? Actually having links like /b/ permitted would be quite beneficial.
So if we redefined $wgArticlePath = '/index.php?title=$1'; what would happen then if someone linked an URL to https://www.teflpedia.org/English ? What would happen to https://www.teflpedia.org//b/ ? Bugreporter (talk) 15:31, 11 January 2023 (UTC)

Internal Error: Fatal exception of type "LogicException"

Hi! For the past month, I've been using 'Memcached' and since then, occasionally when retrieving an article, the error message 'Internal Error: Fatal exception of type "LogicException" appears. When I reload the page, the error disappears. What could be causing this? The error seems to occur arbitrarily, whether it's an article, special page, or image. Through analytics, I've seen that the error appears maybe once in every 1000 retrievals.

Software Version
MediaWiki 1.39.0
PHP 8.1.14 (fpm-fcgi)
MariaDB 10.6.11-MariaDB-1:10.6.11+maria~ubu1804
ICU 60.2
Pygments 2.11.2

2A00:20:B058:1051:8817:4E77:DBAD:B770 (talk) 14:04, 11 January 2023 (UTC)

and I am not seeing the cause in the logs. Now I set $wgShowExceptionDetails to true. Perhaps someone already has an idea... Or could it be due to PHP 8? Thanks! 2A00:20:B058:1051:8817:4E77:DBAD:B770 (talk) 14:09, 11 January 2023 (UTC)
Its unlikely to be due to php8. It would really help to know the full details of the exception Bawolff (talk) 21:49, 11 January 2023 (UTC)
I don't know if this may be the same issue, but the "LogicException" appears occasionally on several wikis running different versions (1.35, 1.37, 1.38...) and all report sporadic random errors with the message "LogicException: Process cache for 'en' should be set by now", which is reported as phab:T258860. Ciencia Al Poder (talk) 09:19, 13 January 2023 (UTC)
This is the ShowExceptionDetails
LogicException: Process cache for 'de' should be set by now.
Backtrace:
from /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/MessageCache.php(440)
#0 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/MessageCache.php(318): MessageCache->loadUnguarded()
#1 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/MessageCache.php(1162): MessageCache->load()
#2 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/MessageCache.php(1089): MessageCache->getMsgFromNamespace()
#3 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/MessageCache.php(1060): MessageCache->getMessageForLang()
#4 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/MessageCache.php(1002): MessageCache->getMessageFromFallbackChain()
#5 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/Message.php(1473): MessageCache->get()
#6 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/Message.php(970): Message->fetchMessage()
#7 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/language/Message.php(1053): Message->format()
#8 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/specialpage/SpecialPage.php(787): Message->text()
#9 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/specialpage/SpecialPage.php(676): SpecialPage->getDescription()
#10 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/extensions/RottenLinks/includes/SpecialRottenLinks.php(8): SpecialPage->setHeaders()
#11 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/specialpage/SpecialPage.php(701): SpecialRottenLinks->execute()
#12 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()
#13 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#14 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/MediaWiki.php(904): MediaWiki->performRequest()
#15 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/includes/MediaWiki.php(562): MediaWiki->main()
#16 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/index.php(50): MediaWiki->run()
#17 /var/www/vhosts/EXAMPLE-wiki.de/MediaWiki/index.php(46): wfIndexMain()
#18 {main} 2003:C5:FF43:45FD:1CB7:1093:84CD:F168 (talk) 08:28, 15 January 2023 (UTC)
Any idea? Memcached problem? 2003:C5:FF0B:4531:5D6C:4559:3E66:E937 (talk) 18:01, 23 January 2023 (UTC)
Sometimes this is caused by extensions trying to initialize stuff before mediawiki is ready.
Do you have any non default config set for localisation cache in LocalSettings.php? Bawolff (talk) 18:45, 23 January 2023 (UTC)
@Bawolff: My memory settings
$wgMainCacheType = CACHE_MEMCACHED;
$wgParserCacheType = CACHE_MEMCACHED; // optional
$wgMessageCacheType = CACHE_MEMCACHED; // optional
$wgMemCachedServers = [ '127.0.0.1:11211' ];
$wgSessionCacheType = CACHE_MEMCACHED; // optional
$wgPHPSessionHandling = 'enable';
$wgCachePages = true;
 
$wgCacheEpoch = '20030516000000';
$wgRevisionCacheExpiry = 86400 * 7;
$wgParserCacheExpireTime = 2592000;
$wgResourceLoaderMaxage = [];
$wgDiff = '/usr/bin/diff';
$wgDiff3 = '/usr/bin/diff3';
$wgMemoryLimit = "50M";
$wgCacheDirectory = "$IP/cache";
$wgEnableSidebarCache = true; 109.42.240.206 (talk) 06:22, 27 January 2023 (UTC)
Those look pretty normal. (50 mb is a really small memory limit, but that wouldn't cause this problem)
If you disable all extensions does it still happen? Bawolff (talk) 14:28, 27 January 2023 (UTC)
While me, I try going to Rarewiki but all it shows is : [708b7b0f69dcf049da7804f9] 2023-09-02 08:37:15: Fatal exception of type "LogicException". Do you think it will be fixed later or do we have to wait for a few days, weeks, months or years until the issue is resolved ? 2A01:CB19:8434:A200:2038:E7C3:33E1:A6DB (talk) 09:28, 2 September 2023 (UTC)
Rarewiki works for me. Ciencia Al Poder (talk) 20:13, 3 September 2023 (UTC)
4 weeks later : [5b4bd19c4cdc454c8dbbeea8] 2023-09-30 17:41:32: Fatal exception of type "LogicException". It's happening again in Rarewiki 2A01:CB19:8434:A200:C83C:794C:2D34:1CF6 (talk) 17:43, 30 September 2023 (UTC)
Fatal exception of type "LogicException" is completely useless for us. See Manual:How to debug to get a more descriptive error message. Ciencia Al Poder (talk) 19:33, 1 October 2023 (UTC)
On some versions of mediawiki (not the latest) if memcache wasn't reachable over the network a logic exception related to process cache would be issued. (But like Ciencia said, please include full exception details) Bawolff (talk) 01:12, 2 October 2023 (UTC)

Uploading error: Could not read file "mwstore://local-backend/local-temp/8/8f/19rrutfodpl4.pn5354.3.pdf.0".

While I was trying to upload a pdf file that was 1.72 Gb big, I encountered a problem. It would upload the file, but then give me this at the end (Could not read file "mwstore://local-backend/local-temp/8/8f/19rrutfodpl4.pn5354.3.pdf.0".), and say that the file failed to upload. I am on MediaWiki version 1.38.4, using Bluehost as well as cpanel. I have this in my LocalSettings.php:

$wgMaxUploadSize = 1024*1024*1024*10;

In my php.ini:

memory_limit, post_max_size, upload_max_filesize all are set to 10240M

I also tried doing this on just Special:Upload but it gave me a Bad Gateway error Guillaume Taillefer (talk) 00:08, 12 January 2023 (UTC)

Generally speaking, direct uploads start to become unreliable after about 500MB. The bad gateway error probably means you have some sort of HTTP middle box (e.g. a caching server or routing server) that has a max upload size.
extension:UploadWizard supports larger file uploads by splitting it into chunks, but that can also be somewhat unreliable. You need special config to make it work - $wgEnableAsyncUploads, and you also have to run runJobs.php specifying the types AssembleUploadChunks and PublishStashedFile (These types are not run by default if you don't specify a type).
Another option is $wgAllowCopyUploads to upload from a url.
The most reliable option for very large files (< 4gb), is importImages.php Bawolff (talk) 03:23, 12 January 2023 (UTC)
Thank you so much! Would I be able to run runJobs.php in LocalSettings with the command that is provided or would I have to have it run somewhere else. I am saying this because I am assuming that you would constantly need to run it from SSH using that run command, or if you run that command in SSH once it will keep running as long as you want before you deactivate it?
Edit: Would this work in LocalSettings?:
$output = shell_exec('php maintenance/runJobs.php');
echo "<pre>$output</pre>"; Guillaume Taillefer (talk) 12:24, 12 January 2023 (UTC)

VisualEditor adds to every change

VisualEditor adds <!--[selectrongo:done]--> to every change
e.g. https://teflpedia.com/index.php?title=Sound&type=revision&diff=115630&oldid=109807
It's more annoying than anything else.
Why is this and what can be done to stop it? Bugreporter (talk) 04:50, 12 January 2023 (UTC)
Does this also happen with another web browser? Malyacko (talk) 10:18, 14 January 2023 (UTC)
Also, what is a rongo and why does it need to be selected? Bugreporter (talk) 04:51, 12 January 2023 (UTC)

Special:Upload and description & comment issue

Hi. I want to upload some duplicate images to my wiki (with different names). When I use Special:Upload, there is a "Ignore the warnings" selection so I can upload duplicate images. But when I use editor's upload (you know, the pop-up one) there isn't. So I cant upload images through editor.


I dont want to directly use S:Upload, because when I add a description through it, S:Upload adds that description to comment area of the image version. I don't want this, I want description to appear just below image, you know the description area, when I upload them through editor.


How can I do this? 159.146.48.74 (talk) 08:03, 12 January 2023 (UTC)

Hi, please also see "Post a new question". What does "below image" mean on which exact page? Malyacko (talk) 09:46, 12 January 2023 (UTC)
It means content area of any of the files.
I want to upload duplicate images without using Special:Upload, just directly through editor.
When I upload any image through editor, description I've added appears in content section of File:Image. When I upload through Special:Upload, description(s) appear in the comment section of image versions. 159.146.48.74 (talk) 10:02, 12 January 2023 (UTC)

Error Install MediaWiki

MediaWiki 1.39 internal error

Installing some PHP extensions is required.

Required components

You are missing a required extension to PHP that MediaWiki requires to run. Please install:


Help me please! Lomeno 24 (Contact me here) 09:57, 12 January 2023 (UTC)

@Lomeno 24 Please describe what is unclear with the error message so it can be improved. It says that the PHP extension called "intl" is not installed. Malyacko (talk) 11:37, 12 January 2023 (UTC)
@Malyacko: How can I install the PHP extension "intl"? Lomeno 24 (Contact me here) 18:56, 12 January 2023 (UTC)
That entirely depends on your system and how you installed PHP. Malyacko (talk) 18:59, 12 January 2023 (UTC)
I downloaded a zip file from a website called www.php.net/intl, I don't know whether to unzip the file or not. Lomeno 24 (Contact me here) 04:37, 13 January 2023 (UTC)
If you are on windows, you are usually looking for a .dll file. Usually named php_intl.dll (or maybe intl.dll). Sometimes your copy of php might come with it already and you just have to enable it.
You can enable it by adding a line like extension=php_intl.dll in your php.ini file, once you have placed the .dll file in the right directory.
Your dustribution of php might be better suited to answer specific questions about this. Bawolff (talk) 11:27, 13 January 2023 (UTC)
If you're on shared hosting with Cpanel, go into "Select PHP Version" (PHP selector). You'll see a screen that says "PHP extensions". Check the box that says "intl". If you're working from the command line there are other ways. Flounder ceo (talk) 15:08, 13 January 2023 (UTC)
I solved it, thank you all very much. Lomeno 24 (Contact me here) 22:51, 13 January 2023 (UTC)

Internal server error only when editing certain pages

I get a 500 internal server error when saving only certain pages and only when making certain edits. I can save a version of the page that just says 'test' or a few lines, but anything more than that and the error pops up. I know there's no way it can be over the max page size because it's still only a few bytes.

I was having this error on a previous version of the wiki (1.35) and upgraded to 1.39 and the issue is still present. There's nothing in the site error log either. 2A02:C7C:AA2E:D100:34CF:2342:CEE2:F233 (talk) 16:06, 12 January 2023 (UTC)

Are you sure you are checking the correct site log? Is php error logging enabled? See How to debug
500 errors should definitely show upbin either the web server error logs or the php error logs. Bawolff (talk) 19:17, 12 January 2023 (UTC)
Thanks, looks like I was looking at the wrong error log. The error I'm getting is something about http request smuggling attack, which makes no sense because the page content is just text with a few external links to harmless sites I own. 2A02:C7C:AA2E:D100:34CF:2342:CEE2:F233 (talk) 21:50, 12 January 2023 (UTC)
Can you paste the exact text of the error?
Its possible the issue is a WAF false positive. Bawolff (talk) 22:10, 12 January 2023 (UTC)
The error includes: [Thu Jan 12 06:52:08.262565 2023] [:error] [pid 19299:tid 3556755736320] [client REDACTED:50673] [client REDACTED] ModSecurity: Warning. Pattern match "(?:get|post|head|options|connect|put|delete|trace|track|patch|propfind|propatch|mkcol|copy|move|lock|unlock)\\\\s+(?:\\\\/|\\\\w)[^\\\\s]*(?:\\\\s+http\\\\/\\\\d|[\\\\r\\\\n])" at ARGS:text. [file "/dh/apache2/template/etc/mod_sec3_CRS/REQUEST-921-PROTOCOL-ATTACK.conf"] [line "53"] [id "921110"] [msg "HTTP Request Smuggling Attack"]
The weird thing is I've turned off extra security/mod_security with the hosting provider and this is still happening. 2A02:C7C:AA2E:D100:34CF:2342:CEE2:F233 (talk) 13:42, 13 January 2023 (UTC)
Nvm the provider confirmed it wasn't fully disabled and has added some exceptions so it's working now. Thank you for the help! 2A02:C7C:AA2E:D100:34CF:2342:CEE2:F233 (talk) 15:49, 13 January 2023 (UTC)

Como incorporar Comentários do Facebook em site da Wiki?

Pretendo incluir possibilidade de comentários em nossas paginas, como utilizar o plugins da face book para incorporar os comentários. Grato pela ajuda EPZanette (talk) 17:58, 12 January 2023 (UTC)

Extension:FacebookComments Malyacko (talk) 18:08, 12 January 2023 (UTC)
Instalamos as extensões porém as caixas de comentáris do facebook não ficaram visíveis nas aginas.
Alguma outra dica que possamos fazer? EPZanette (talk) 12:32, 13 January 2023 (UTC)

Feedback Extensions

I've seen the ArticleFeedbackv5 extension which seems like it allows users to give feedback on a wiki page and I'd like to install something similar. Our current version (1.34.1) is too old to make user of that

Is there other extensions with similar functionality that I am not seeing? Thanks for any and all help! DrpepperUser (talk) 21:50, 12 January 2023 (UTC)

I was going to suggest just using the talk page, but Extension:ArticleFeedbackv5 actually looks good!
There's a REL1_34 branch so you could use git to download that.
Or you could maybe use the bundled Extension:InputBox along these lines:
How could this article be improved?
<inputbox>
type=commenttitle
page=Talk:{{PAGENAME}}
buttonlabel=Post your feedback
</inputbox>
There is some interesting stuff at Manual:Parameters_to_index.php#Options_affecting_the_edit_form but the InputBox idea probably is easier/better. Jonathan3 (talk) 09:31, 13 January 2023 (UTC)
First off, thank you so much for your help Jonathan, you have answered multiple topics of mine and I really appreciate it.
The inputbox may be sufficient, but I would really like to get the feedback extension working. I installed the REL1_34 and have these settings in my config file (sorry for format):
wfLoadExtension( 'ArticleFeedbackv5' );
$wgArticleFeedbackv5Categories = array( '*', 'How_to', 'Org');
$wgArticleFeedbackv5CTABuckets = array(
'buckets' => array(
'0' => 0, // display nothing
'1' => 20, // display "Enticement to edit"
'2' => 0, // display "Learn more"
'3' => 0, // display "Take a survey"
'4' => 0, // display "Sign up or login"
'5' => 80, // display "View feedback"
'6' => 0, // display "Visit Teahouse"
),
'version' => 5,
'expires' => 0,
);
But when I click post feedback I get:
[0a794a08f10a389365123adf] Exception caught: List '*' is not allowed for this user
I'm not sure how to resolve this issue. DrpepperUser (talk) 23:19, 18 January 2023 (UTC)
(I edited your post to add syntaxhighlight tags.) Jonathan3 (talk) 22:53, 19 January 2023 (UTC)
Maybe change second line to:
$wgArticleFeedbackv5Categories = array( 'How_to', 'Org');
I don't know that extension but I don't think the '*' belongs there.
If you turn on debugging (I think the instructions are on this page) you might get a more detailed message. Jonathan3 (talk) 22:57, 19 January 2023 (UTC)

MediaWiki file nonsense

MediaWiki is having 2 seemingly related issues. The first issue is that it isn't using $wgFileExtensions, instead adding a bunch of random file types. The second is that any file uploaded, when going to the File: page for it, shows nothing but the text "File not found" on the whole webpage. The files do render elsewhere, however. I am running MediaWiki version 1.39.1. Kikicat123 (talk) 00:14, 14 January 2023 (UTC)

I fixed the "File not found" problem. turns out it was some nginx config issue. Kikicat123 (talk) 00:21, 14 January 2023 (UTC)
For the first part, some extensions automatically add things to $wgFileExtensions (e.g. TimedMediaHandler does this). What are you expecting to see and what is it actually? Bawolff (talk) 01:32, 14 January 2023 (UTC)

Change the default questions

After installing the media wiki script, a few questions will be asked during the registration that the name of Wikipedia is mentioned. Shouldn't this name change the name of the site?
For example, I started WikiDM, instead of asking questions about WikiDM, it asks questions about Wikipedia. Rick Sanchez (talk) 04:10, 14 January 2023 (UTC)
Please see "Post a new question" in the sidebar. Malyacko (talk) 10:17, 14 January 2023 (UTC)
The install should never ask any questions about wikipedia at all. Although it might use the phrase "your wiki" (wiki being a generic noun).
What is the exact text it is asking you think should be changed? Bawolff (talk) 04:57, 14 January 2023 (UTC)
You can go to wikidm.org, and check in the registration section that all questions are related to Wikipedia. I would also like to say that this happens in Persian, I did not study in English. Rick Sanchez (talk) 06:39, 4 March 2023 (UTC)
Did you set up and run wikidm.org? If so, which steps where (URL) did you follow? Malyacko (talk) 08:07, 4 March 2023 (UTC)
Why is extension:WikimediaMessages installed on this wiki? Bawolff (talk) 13:31, 5 March 2023 (UTC)

VisualEditor not starting

Hello, I am running into an issue where VisualEditor does not start at all. When I click the edit button, it simply does nothing. No popups, nothing. There are no nginx errors or php-fpm errors. But checking the browser console, i can find something:

VisualEditor failed to load: Error: Dependency ext.visualEditor.data failed to load

I don't know what this means, but maybe it's the reason VisualEditor isn't starting? VisualEditor just broke apparently randomly one day. I tried disabling all extensions except for VisualEditor, still didn't work. I tried switching skins, didn't work. I upgraded to 1.39.1, didnt work. I don't know what to do anymore.

I'm running Mediawiki 1.39.1, php-fpm 7.4 and MariaDB 10.5.18 Wassermelon (talk) 07:47, 14 January 2023 (UTC)

Can you make sure the copy of visual editor you have is the right one for your version of MediaWiki (E.g. if you are on 1.39.1, you selected 1.39 from the download page on Special:ExtensionDistributor/VisualEditor)?
If you go to the url mywebsitehere.com/w/load.php?lang=en&skin=vector&only=scripts&modules=ext.visualEditor.data does it give a more specific error message? Bawolff (talk) 08:41, 14 January 2023 (UTC)
Bawolff, thanks for the reply
I made sure the VisualEditor was the correct version by downloading it again for 1.39. The error still persists
I went to the page you sent me and I found this:
/*
[ba05e685cbc8acdf354d483c] 2023-01-14 09:08:08: Fatal exception of type "BadMethodCallException"
  • /
if (window.console && console.error) { console.error("[ba05e685cbc8acdf354d483c] 2023-01-14 09:08:08: Fatal exception of type \"BadMethodCallException\""); }
ve.init.platform.addParsedMessages({"missingsummary":"\u0026lt;strong\u0026gt;Reminder:\u0026lt;/strong\u0026gt; You have not provided an edit summary.\nIf you click \u0026quot;Save changes\u0026quot; again, your edit will be published without one.","summary":"Summary:","visualeditor-browserwarning":"You are using a browser which is not officially supported by this editor.","visualeditor-wikitext-warning":"You are using the visual editor - wikitext does not work here. To switch to source editing at any time without losing your changes, click on the switch button."});ve.init.platform.addMessages({"visualeditor-feedback-link":"Project:VisualEditor/Feedback","visualeditor-feedback-source-link":"VisualEditor/Feedback","visualeditor-quick-access-characters.json":"null","visualeditor-template-tools-definition.json":"null"});
mw.loader.state({"ext.visualEditor.data":"ready"}); Wassermelon (talk) 09:10, 14 January 2023 (UTC)
If you add $wgShowExceptionDetails = true; to LocalSettings.php does it give more details about the BadMethodCallException ? Bawolff (talk) 14:21, 14 January 2023 (UTC)
Yep, I get more info:
/*
[afa6cdeae2e6453e4b9f4043] /load.php?lang=en&skin=monobook&only=scripts&modules=ext.visualEditor.data BadMethodCallException: Sessions are disabled for load entry point
Backtrace:
from /var/www/ki/includes/session/SessionManager.php(900)
#0 /var/www/ki/includes/session/SessionManager.php(363): MediaWiki\Session\SessionManager->getSessionFromInfo()
#1 /var/www/ki/includes/session/SessionManager.php(296): MediaWiki\Session\SessionManager->getEmptySessionInternal()
#2 /var/www/ki/includes/session/SessionManager.php(376): MediaWiki\Session\SessionManager->getEmptySession()
#3 /var/www/ki/includes/session/SessionManager.php(246): MediaWiki\Session\SessionManager->getInitialSession()
#4 /var/www/ki/includes/WebRequest.php(843): MediaWiki\Session\SessionManager->getSessionForRequest()
#5 /var/www/ki/includes/user/User.php(1115): WebRequest->getSession()
#6 /var/www/ki/includes/user/User.php(438): User->loadFromSession()
#7 /var/www/ki/includes/user/User.php(1658): User->load()
#8 /var/www/ki/includes/user/User.php(2310): User->getId()
#9 /var/www/ki/includes/Permissions/PermissionManager.php(1549): User->isRegistered()
#10 /var/www/ki/includes/Permissions/PermissionManager.php(1477): MediaWiki\Permissions\PermissionManager->getRightsCacheKey()
#11 /var/www/ki/extensions/AnonPrivacy/AnonPrivacy.php(22): MediaWiki\Permissions\PermissionManager->getUserPermissions()
#12 /var/www/ki/includes/HookContainer/HookContainer.php(338): AnonPrivacy::onHtmlPageLinkRendererEnd()
#13 /var/www/ki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#14 /var/www/ki/includes/HookContainer/HookRunner.php(2034): MediaWiki\HookContainer\HookContainer->run()
#15 /var/www/ki/includes/linker/LinkRenderer.php(316): MediaWiki\HookContainer\HookRunner->onHtmlPageLinkRendererEnd()
#16 /var/www/ki/includes/linker/LinkRenderer.php(211): MediaWiki\Linker\LinkRenderer->buildAElement()
#17 /var/www/ki/includes/linker/LinkRenderer.php(242): MediaWiki\Linker\LinkRenderer->makePreloadedLink()
#18 /var/www/ki/includes/linker/LinkRenderer.php(158): MediaWiki\Linker\LinkRenderer->makeKnownLink()
#19 /var/www/ki/includes/parser/LinkHolderArray.php(313): MediaWiki\Linker\LinkRenderer->makeLink()
#20 /var/www/ki/includes/parser/LinkHolderArray.php(159): LinkHolderArray->replaceInterwiki()
#21 /var/www/ki/includes/parser/Parser.php(5085): LinkHolderArray->replace()
#22 /var/www/ki/includes/parser/Parser.php(1713): Parser->replaceLinkHoldersPrivate()
#23 /var/www/ki/includes/parser/Parser.php(727): Parser->internalParseHalfParsed()
#24 /var/www/ki/includes/language/MessageCache.php(1374): Parser->parse()
#25 /var/www/ki/includes/language/Message.php(1427): MessageCache->parse()
#26 /var/www/ki/includes/language/Message.php(1004): Message->parseText()
#27 /var/www/ki/includes/language/Message.php(1042): Message->format()
#28 /var/www/ki/extensions/VisualEditor/includes/VisualEditorDataModule.php(32): Message->parse()
#29 /var/www/ki/includes/ResourceLoader/Module.php(817): MediaWiki\Extension\VisualEditor\VisualEditorDataModule->getScript()
#30 /var/www/ki/includes/ResourceLoader/Module.php(786): MediaWiki\ResourceLoader\Module->buildContent()
#31 /var/www/ki/includes/ResourceLoader/Module.php(925): MediaWiki\ResourceLoader\Module->getModuleContent()
#32 /var/www/ki/includes/ResourceLoader/ResourceLoader.php(701): MediaWiki\ResourceLoader\Module->getVersionHash()
#33 [internal function]: MediaWiki\ResourceLoader\ResourceLoader->MediaWiki\ResourceLoader\{closure}()
#34 /var/www/ki/includes/ResourceLoader/ResourceLoader.php(699): array_map()
#35 /var/www/ki/includes/ResourceLoader/ResourceLoader.php(798): MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion()
#36 /var/www/ki/load.php(53): MediaWiki\ResourceLoader\ResourceLoader->respond()
#37 /var/www/ki/load.php(39): wfLoadMain()
#38 {main}
*/ Wassermelon (talk) 14:52, 14 January 2023 (UTC)
Can you disable the AnonPrivacy extension (or update it if a new version is available)? It looks like its not compatible with recent versions of mediawiki. Bawolff (talk) 23:12, 14 January 2023 (UTC)
Yep, disabled the extension and VisualEditor works. But the problem is that AnonPrivacy is an important extension for my wiki due to its IP hiding capabilities. Is there an extension/mediawiki feature which does the same thing and works for 1.39? Or is there a way to delete IPs from the entire history, so people don't get their IPs leaked?
Thanks Wassermelon (talk) 08:45, 15 January 2023 (UTC)
There's a proposed fix for this issue at https://gerrit.wikimedia.org/r/c/mediawiki/extensions/AnonPrivacy/+/879940 Bawolff (talk) 11:42, 15 January 2023 (UTC)
The fix was merged, so if you download the master version of the extension, it should have the fix. Bawolff (talk) 19:43, 15 January 2023 (UTC)
Thank you so much for the help!!! Wassermelon (talk) 20:10, 15 January 2023 (UTC)

How do I install the Vector skin to my wiki?

I need help to install the vector skin, it is not available by default, as I just recently installed MediaWiki and the MediaWiki version is 1.29.1 as the Vector mode is not included in the main repository. Lomeno 24 (Contact me here) 08:43, 14 January 2023 (UTC)

To start with, why would you install ancient unsupported insecure 1.29.1? Malyacko (talk) 10:16, 14 January 2023 (UTC)
  • Short Answer: I can't find a way to download MediaWiki so that I don't get this error.
  • Long answer: The current version has an error, a problem that does not let me install it, I will have to uninstall the old version of MediaWiki and the XAMPP also does not have the extensions to proceed with the installation of MediaWiki since I would have to download more compatible versions, it is a waste of time since I want to create my own wiki to continue with my future project. I can't download the current version because it says an intl extension is missing and I don't understand how to install it. Lomeno 24 (Contact me here) 17:52, 14 January 2023 (UTC)
Then the problem to fix is installing the intl extension instead of installing ancient insecure software versions. See https://www.php.net/manual/en/install.pecl.windows.php Malyacko (talk) 18:15, 14 January 2023 (UTC)
Ok, I'll try until I make it Lomeno 24 (Contact me here) 18:25, 14 January 2023 (UTC)
See Download how to download MediaWiki. Malyacko (talk) 18:15, 14 January 2023 (UTC)
Thanks Lomeno 24 (Contact me here) 18:25, 14 January 2023 (UTC)
Well i don't reccomend using mediawiki 1.29, it does indeed come with vector automatically in the tar file . For non bundled extensions you would have to use the REL1_29 branch of the extension from git.
But again i really dont reccomend as 1.29 is super old. If you really cannot figure out intl, at the very least use 1.35.9 Bawolff (talk) 00:40, 15 January 2023 (UTC)
Thank you very much Lomeno 24 (Contact me here) 01:37, 15 January 2023 (UTC)
Hi again, I need to install the vector mode for MediaWiki version 1.35.9 recommended by Bawolff in the whole wiki and remove the message "Warning: Undefined variable $wgScritPath in C:\xampp\htdocs\mediawiki\LocalSettings.php on line 132". Lomeno 24 (Contact me here) 05:54, 15 January 2023 (UTC)
If you downloaded the official tarball it should already be included, depending on what you selected in installer possibly already enabled. If not wfLoadSkin("vector"); in LocslSettings.php.
For the error it depends on what you are doing put presumably you missed the p in $wgScriptPath Bawolff (talk) 06:19, 15 January 2023 (UTC)

Strange Template

What does it means when a template name has a / as first char like Template:/Categories ?

Regards,

Kato Kato196613 (talk) 17:52, 14 January 2023 (UTC)

I don't think it means anything. Jonathan3 (talk) 19:21, 14 January 2023 (UTC)
Sometimes it can be due to confusion when copying templates from a wiki that has subpages enabled in the template namespace to one that does not.
See help:subpages Bawolff (talk) 00:30, 15 January 2023 (UTC)

How to split a wiki into two independent wikis

Due to different classification of our pages we want to split our wiki into two separate wikis (pub and priv) located in different subnets for isolation. Our plan was to create a new wiki as a backup restore of the existing wiki and then delete the pages not needed in each instance. However we are not sure how to delete a page completely including all revisions, links, changelog, ... We have experimented with deletePage.php but it just moves revisions to archive etc - we want to delete all pagetraces permanently. How can we do this ?


We would like to keep the users/actors in sync on the two webs. By using backup/restore to create the second instance the sync will be ok from start, but how can we keep the userbases in sync over time - do we need LDAP or can we replicate the user tables from one (master) wiki to the other ?


Thanks in advance. Cb831 (talk) 17:55, 14 January 2023 (UTC)

MediaWiki does not support permanently deleting all data about a page.
For sharing user accounts between two wikis, see Manual:Shared database. Taavi (talk!) 19:33, 14 January 2023 (UTC)
Thanks for the answer. That sounds strange, - I mean what if a person in a page gives the server owner a GPDR inquire or takedown request. Then you need to be able to produce or delete any reference to that person you have in the server no matter how it is stored and how hidden it is.
I tried to do the job directly in SQL but it is very hard to do because the database schema is very poorly described especially for constraints like relations and foreign keys. It should be possible to do something like
- delete page(s)
- delete all revisions, archive etc referring to page that does no longer exist
- delete content where referred revision, archive, ... does not exist
- delete text no longer referenced by content
- delete comment where referred item does not exists
- delete forward and backward links referring to non existing pages
- delete changes referring to non existing pages
- delete tags where referred item does not exists
- delete files and images no longer referenced
- wipe cache
I had hoped that maintenance scripts would exist for these tasks but apparently not. So I guess my best option is to execute the above in SQL and then run the rebuildall.php script afterwards ?!?! Cb831 (talk) 23:18, 14 January 2023 (UTC)
Most of these things have maintenance scripts however they are spread out amongst many scripts and there isn't a convinent all in one.
We generally don't reccomend manually editing SQL as it is easy to make mustakes which will cause issues in mediawiki.
Generally speaking i would reccomend deleting the page normally, then running deleteArchivedRevisions.php. Although it doesn't fully get everything on your list. Bawolff (talk) 00:28, 15 January 2023 (UTC)

Alt code word for 'upright' in images

At least on the English wikiprojects, could we have an alternative word for 'upright' for sizing images? Maybe 'scale'? 'Upright' when used alone is obvious enough (25% narrower for portrait orientation), but when we get to 'upright=1.25' the wording is no longer intuitive. In fact, I was reverted from 'upright' to deprecated absolute pixels by someone who thought that 'upright' should only be used for portrait orientation. It also doesn't have an obvious meaning for newbies. If you could add 'scale' as an alternate code word, I think that would make things easier for people and ease the shift away from absolute pixels. Or perhaps you can think of a better word that 'scale'. Kwamikagami (talk) 20:32, 14 January 2023 (UTC)

I'm not sure i find scale very intuitive either as i would assume it means scaling.
I'm not sure this is the best place to post, i don't think the right people will see it. You could maybe post on https://phabricator.wikimedia.org . You may want to discuss on wikipedia's VP as if lots of users agree with the idea its more likely to get traction. Bawolff (talk) 00:21, 15 January 2023 (UTC)

Translate from other original language than English

Is it possible to use the Translate Extension to create an original page in a language other than English and mark it for translation? PKFP (talk) 10:24, 15 January 2023 (UTC)

SourceEditor

Hi, I need to install the source editor on my wiki. Lomeno 24 (Contact me here) 11:17, 15 January 2023 (UTC)

There are multiple source editor extensions. Which one?
Extension:WikiEditor is probably the most popular one. Follow the instructions on its page. Bawolff (talk) 11:43, 15 January 2023 (UTC)

No text extraction in MW 1.39

When I run this script https://www.tbpedia.org/api.php?action=query&prop=extracts&exchars=1000&titles=%E9%A6%96%E9%A0%81

It show the below extration message

{ "batchcomplete": "", "warnings": { "extracts": { "*": "HTML may be malformed and/or unbalanced and may omit inline images. Use at your own risk. Known problems are listed at https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:TextExtracts#Caveats." } },

"query": { "pages": { "1": { "pageid": 1, "ns": 0, "title": "\u9996\u9801", "extract": "\n"

It seems that no text has been extract .

When I use Popups Extension, it will showed " There was issues displaying this preview:. Lotusccong (talk) 15:18, 15 January 2023 (UTC)

Dark Mode

Hi, I would like to install an extension to change the light mode to dark mode of my wiki, to improve the visibility for new users to navigate and not have problems. Lomeno 24 (Contact me here) 20:33, 15 January 2023 (UTC)

See Manual:Dark mode Malyacko (talk) 20:49, 15 January 2023 (UTC)
There are parts of the wiki that are clear because there is an error, I need a solution. Lomeno 24 (Contact me here) 23:11, 15 January 2023 (UTC)
Please see "Post a new question" in the side bar and be specific. The solution depends on the error and the "parts" and steps you performed that only you know currently. Malyacko (talk) 09:15, 16 January 2023 (UTC)
Many of us have been interested in a dark mode, but it has never really happened. Most of the "solutions", like the CSS add-ons, are kludges with one problem or another. (flashing screens, incompleteness, etc.)
Skin:DarkVector was pretty good but is incompatible with the latest MediaWiki version 1.39.
Skin:Citizen is currently the best solution. It's stable, looks nice, and has an option to autodetect visitors' browser preference. Flounder ceo (talk) 13:55, 16 January 2023 (UTC)

Template expansion only renders parameter correct once

Hi, I am dealing with this issue in a template

<includeonly>DN{{{1}}}<ref name="xample-{{{1}}}">[http://example.com/{{{1}}}/foo DN{{{1}}} link text {{{1}}}</ref>[[Kategorie:HasReference]]</includeonly>

The result looks like this the following. The DN{{{1}}} renders correctly but in the <ref> tag nothing works anymore.

  1. [http://example.com/{{{1}}}/foo DN{{{1}}} link text {{{1}}}

Any ideas? Are parameters only readable once? Hyphantis (talk) 22:05, 15 January 2023 (UTC)

No parameters are readable as many times as you want. This is probably failing because of the ref tags; try using the #tag parser function, e.g.:
<includeonly>DN{{{1}}}{{#tag: ref | [http://example.com/{{{1}}}/foo DN{{{1}}} link text {{{1}}}] | name=xample-{{{1}}} }}[[Kategorie:HasReference]]</includeonly>
Sam Wilson 04:26, 16 January 2023 (UTC)
Thank you, now it works Hyphantis (talk) 08:55, 16 January 2023 (UTC)

Receive email from MedaiWIki when an article has not been updated for 1 year

Hi all, is there a way to receive email from MedaiWIki when an article has not been updated for 1 year? Thanks in advance! 94.191.136.160 (talk) 12:56, 16 January 2023 (UTC)

There is not; you could probably write a bot to notify you. Malyacko (talk) 13:20, 16 January 2023 (UTC)
@Malyacko Do you have a link or similar to if someone has done this before or exemple on the specifik bot? Thanks in advance! Mirha513 (talk) 13:26, 16 January 2023 (UTC)
I once worked at a place where we handled email reminders like this with a custom extension: Extension:SemanticMailMerge. That's no longer maintained, but you are welcome to update it if it's of use to you. Sam Wilson 00:46, 17 January 2023 (UTC)

Uncaught Error: Class "Wikimedia\Rdbms\DatabaseFactory" not found

I have installed mediawiki 1.39.1 and added all the new extension supporting this version but on trying to open the mw-config/index.php.I'm getting this error message Fatal error: Uncaught Error: Class "Wikimedia\Rdbms\DatabaseFactory" not found in E:\inetpub\fmswmcrwiki\includes\ServiceWiring.php:530. Can anyone help to fix this issue?Thanks in Advance 161.69.111.128 (talk) 15:29, 16 January 2023 (UTC)

This might happen if you have a mix of two different versions of mediawiki. Are you sure you uploaded the new version correctly? Bawolff (talk) 15:50, 16 January 2023 (UTC)

How to mark all messages as "read"

Keeps on popping up that I have 1 new message in my inbox. I don't, I have checked and read every single message and its becoming very annoying. Is there a way to either "reset" or "mark all messages as read" option so I can clear out my "new messages"?


TY 2600:1017:B815:B168:7D8A:4B67:588C:E7A (talk) 17:01, 16 January 2023 (UTC)

Hi, please see "Post a new question" in the sidebar. Which "inbox" is this about? Does this refer to the Echo/Notifications extension and its "alerts" and "notices" in the top bar maybe? Malyacko (talk) 20:42, 16 January 2023 (UTC)

Error Dark Mode

There is an error in the bottom left corner of my wiki that has a white part when I am using the dark mode, when there are long pages, this error appears and when there are short pages, as is the case of my user page, this error does not appear
http://localhost/mediawiki/index.php/Usuario:Lomeno_24/Talleres http://localhost/mediawiki/index.php/Usuario:Lomeno_24 Lomeno 24 (Contact me here) 23:50, 16 January 2023 (UTC)

Those links are all to your local computer, so other people are not able to view them. Do you have a wiki online somewhere that's demonstrating the issue you're seeing? Additionally, a screenshot added here could be useful. If this is about Extension:DarkMode then you could add a bug report to its Phabricator board. Sam Wilson 00:40, 17 January 2023 (UTC)
@Samwilson I took a moment to take the screenshot, so you can see the error. Lomeno 24 (Contact me here) 01:41, 17 January 2023 (UTC)
I took a moment to take the screenshot, so you can see the error.
Lomeno 24 (Contact me here) 01:48, 17 January 2023 (UTC)
Is the issue happening with all skins? Have you tried different browsers?
You say that this only happens on long pages. Can you explain that a bit more? Does it happen on long Special pages, or just content pages? Sam Wilson 02:10, 17 January 2023 (UTC)
@Samwilson Happens on content pages, e.g.: user workshop in the wiki or main namespace pages. Lomeno 24 (Contact me here) 02:58, 17 January 2023 (UTC)

Update from 1.32 - 1.35 (eventually 1.39)

I am being forced by my webhosting service to update to PHP 8.0/8.1 and therefore need to updated mediawiki as well. I've read that I should go from 1.32 to 1.35 first then to 1.39. Im not sure why, but that is what I have been trying to do. I have had many errors that I cannot seem to figure out solutions to. Once I have opened $wgShowExceptionDetails = true; I am seeing many errors on the site. It doesn't seem to be seeing my database on the wiki as well.

Here is the site to see the errors http://tekpercussion.com/

Any thoughts on how to proceed


One thing that seems to get me closer is adding $wgServer = false; to the localsettings.php - it seems to get me closer, but opens up a whole new can of worms with the setup.php

I guess I just have a lot of little bits of information, trying to close off one error while opening more.

Thank you Pauken2 (talk) 06:05, 17 January 2023 (UTC)

I went ahead and updated to 1.39. I added $wgServer = ''; to the localsettings.php. Now I don't see anything on the screen, but it is not showing the database. I am now running MW 1.39 and PHP version 8.0.
I appreciate any help. I have had this wiki for over 10 years now and not run into this much trouble when updating. Thank you Pauken2 (talk) 13:26, 17 January 2023 (UTC)
Try to read the documentation about those variables before setting them to invalid or nonsensical values.
I understand... I have used these pages as a guide. Sorry I need to edit my original posts as that was misleading and not exactly what I had put... Was going off memory. I had read a few posts that said to use $wgServer as $wgServer = '//example.com'; or $wgServer = false; (sorry not "true" as I mentioned before), - Tried both (with tekpercussion.com instead of example) and the other with no luck.
I don't think I am finding the correct way to configure this setting.
https://tekpercussion.com/ Pauken2 (talk) 14:48, 17 January 2023 (UTC)
Well, your current problem is MediaWiki not connecting to the database. Check if database settings and credentials are correct. Ciencia Al Poder (talk) 15:46, 17 January 2023 (UTC)
Here is what my host says when I use look at the MySQL - Extension
"The MySQL extension can only be used with earlier PHP versions, up to 5.6. In PHP 7.0, the MySQL extension was removed and MySQLi (or alternatively PDO) must be used instead."
So I tried the MySQLi code and it didnt work... Also tried their PDO-Extension and that only brings of a blank page on my site.
-MySQL Extension-
$host_name = 'db386.db.1and1.com';
$database = 'db386';
$user_name = 'dbo386';
$password = '<Enter your password here.>';
$connect = mysql_connect($host_name, $user_name, $password, $database);
if (mysql_errno()) {
die('<p>Failed to connect to MySQL: '.mysql_error().'</p>');
} else {
echo '<p>Connection to MySQL server successfully established.</p>';
}
As I eliminated the errors in the localsetting, it brings it back to this
$host_name = 'db386.db.1and1.com';
$database = 'db386';
$user_name = 'dbo386';
$password = '<Enter your password here.>';
This now only has a blank screen with no errors.
https://tekpercussion.com/ Pauken2 (talk) 18:24, 17 January 2023 (UTC)
Database server is configured with $wgDBserver and related variables. MediaWiki knows nothing about $host_name, $database, etc Ciencia Al Poder (talk) 18:48, 17 January 2023 (UTC)
I appreciate your help. I had just copied from my webhosting company. Now I see what was wrong in the application of those variables for Mediawiki.
This is what I had in my localsetting.php for version 1.32
$wgDBtype           = "mysql";
$wgDBserver         = "db386.db.1and1.com";
$wgDBname           = "db386";
$wgDBuser           = "dbo386";
$wgDBpassword       = "<Enter your password here.>";
would it help to display contents of my localsetting file?
I have tried these with the new update and I am not getting much further. Still getting a blank screen and no errors popping up. I apologize for my ignorance as I don't do this nearly enough to remember how to do it. I appreciate your help! Pauken2 (talk) 23:37, 17 January 2023 (UTC)
Ok, the error "Unknown column 'rev_actor' in 'field list'" means you need to run update.php to apply database changes.
See Manual:Upgrading#Run the update script. Further down it talks about a web updater, in case you can't have shell access.
However, do not upgrade from 1.32 to 1.39 directly: your data will be destroyed. See https://phabricator.wikimedia.org/T326071
Upgrade to 1.35 first (run update.php on 1.35) and then upgrade to 1.39 Ciencia Al Poder (talk) 08:50, 18 January 2023 (UTC)
Thank you Ciencia. This was very helpful! I was able to install 1.35. Still getting one error, but it seems the database is still intact. Should I try and fix the error before upgrading to 1.39?
the error at the top of the page is as follows:
Warning: Trying to access array offset on value of type bool in /homepages/26/d386183563/htdocs/mediawiki/includes/Setup.php on line 562 Pauken2 (talk) 05:48, 19 January 2023 (UTC)
I have done a lot of searching for a solution online to try and fix the error on my wiki after updating to 1.35 and updating to PHP 8.0, but have yet to be able to figure out what I need to do to get the wiki back up and running. Here is the error that is showing up on the main page and what I think is causing it not to function properly.
Warning: Trying to access array offset on value of type bool in /homepages/26/d386183563/htdocs/mediawiki/includes/Setup.php on line 562
The site is http://tekpercussion.com/index.php?title=Main_Page
Thank you for any help you can offer! Pauken2 (talk) 08:38, 20 January 2023 (UTC)
Just a quick update. I was able to get rid of the warning. I needed to add
$wgServer = 'https://tekpercussion.com/'; to my Localsetting.php file.
The main page however is still not looking correct. Most of the other pages look ok except that images are not loading. Is there a resource that I someone knows about that I could check out to see what needs to be adapted for the updates I have outlined in the previous post. Thank you!
Here are a couple sample pages of what I am referring to.
http://tekpercussion.com/index.php?title=Main_Page - Layout is a mess.
http://tekpercussion.com/index.php?title=Spencer,_Julie - Sample page with missing image Pauken2 (talk) 09:00, 20 January 2023 (UTC)
The main page looks reasonably correct for me.
Missing images means you probably forgot to copy/move images to the new installation, or you changed the configured path of uploads from $wgUploadDirectory
https://tekpercussion.com//index.php?title=File:JulieSpencer.gif Ciencia Al Poder (talk) 10:14, 20 January 2023 (UTC)
Thank you for getting back with me. regarding the layout of the Main Page... to me, the top and left side navigation are below the main information on that page.
on this page, it appears correctly - above and on the left side
https://tekpercussion.com//index.php?title=Spencer,_Julie
The main page its not formatted correctly and is jumbled down below on the page.
Here is another page that is not formatted correctly:
https://tekpercussion.com/index.php?title=Landreth,_Trevor Pauken2 (talk) 17:39, 20 January 2023 (UTC)
I'm not seeing what you're seeing :)
https://snipboard.io/YqBhlQ.jpg Ciencia Al Poder (talk) 11:08, 21 January 2023 (UTC)
Yeah, that is what it should look like. Thank you for responding. I think I just need to clear the cache on my browser then. Thank you... OK, now time for update to 1.39... haha!
I really appreciate your help, thank you! Pauken2 (talk) 17:24, 21 January 2023 (UTC)

Problem after update 1.2.5 to 1.3.9

Hello we are trying to update old Mediawiki to latest available version. Database is with cp1251 collation after update collation get converted binary and all cyrillic information get stripped. The problem happens after 1.3.4 update. Does anyone faced this issue? Vistebg (talk) 10:24, 17 January 2023 (UTC)

Do you really mean "1.2.5" and "1.3.4" and "1.3.9" or are the dots wrong? Malyacko (talk) 13:25, 17 January 2023 (UTC)

Issue in searching Wiki keyword

After installing new version of mediawiki, only while searching 'wiki' word it is giving error message [dd230f356e11476aebbecb5e] /fmswmwiki/index.php?search=Wiki&title=Special%3ASearch&go=Go Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target. Can some one help me on this?Thanks in Advance 161.69.111.128 (talk) 11:24, 17 January 2023 (UTC)

Please provide a stacktrace; see Manual:How_to_debug Malyacko (talk) 13:24, 17 January 2023 (UTC)
[exception] [aef5afaa6dc7919e365b275d] /fmswmwiki/index.php?search=Wiki&title=Special%3ASearch&go=Go   Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target.
#0 E:\inetpub\fmswmwiki\includes\Title.php(4190): Wikimedia\Assert\Assert::precondition(boolean, string)
#1 E:\inetpub\fmswmwiki\includes\Title.php(4171): Title->assertProperPage()
#2 E:\inetpub\fmswmwiki\includes\Revision\RevisionStore.php(1828): Title->getId(boolean)
#3 E:\inetpub\fmswmwiki\includes\Revision\RevisionStore.php(1733): MediaWiki\Revision\RevisionStore->ensureRevisionRowMatchesPage(stdClass, Title)
#4 E:\inetpub\fmswmwiki\includes\Revision\RevisionStore.php(1609): MediaWiki\Revision\RevisionStore->newRevisionFromRowAndSlots(stdClass, NULL, integer, Title, boolean)
#5 E:\inetpub\fmswmwiki\includes\Revision\RevisionStore.php(2348): MediaWiki\Revision\RevisionStore->newRevisionFromRow(stdClass, integer, Title)
#6 E:\inetpub\fmswmwiki\includes\Revision\RevisionStore.php(1286): MediaWiki\Revision\RevisionStore->loadRevisionFromConds(Wikimedia\Rdbms\DBConnRef, array, integer, Title)
#7 E:\inetpub\fmswmwiki\includes\search\RevisionSearchResultTrait.php(52): MediaWiki\Revision\RevisionStore->getRevisionByTitle(Title, boolean, integer)
#8 E:\inetpub\fmswmwiki\includes\search\RevisionSearchResult.php(16): RevisionSearchResult->initFromTitle(Title)
#9 E:\inetpub\fmswmwiki\includes\search\SqlSearchResult.php(36): RevisionSearchResult->__construct(Title)
#10 E:\inetpub\fmswmwiki\includes\search\SqlSearchResultSet.php(60): SqlSearchResult->__construct(Title, array)
#11 E:\inetpub\fmswmwiki\includes\search\SearchResultSet.php(73): SqlSearchResultSet->extractResults()
#12 E:\inetpub\fmswmwiki\includes\search\SearchResultSet.php(184): SearchResultSet->count()
#13 E:\inetpub\fmswmwiki\includes\search\SearchEngine.php(201): SearchResultSet->shrink(integer)
#14 E:\inetpub\fmswmwiki\includes\search\SearchEngine.php(96): SearchEngine->maybePaginate(Closure)
#15 E:\inetpub\fmswmwiki\includes\specials\SpecialSearch.php(448): SearchEngine->searchText(string)
#16 E:\inetpub\fmswmwiki\includes\specials\SpecialSearch.php(229): SpecialSearch->showResults(string)
#17 E:\inetpub\fmswmwiki\includes\specialpage\SpecialPage.php(701): SpecialSearch->execute(NULL)
#18 E:\inetpub\fmswmwiki\includes\specialpage\SpecialPageFactory.php(1428): SpecialPage->run(NULL)
#19 E:\inetpub\fmswmwiki\includes\MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#20 E:\inetpub\fmswmwiki\includes\MediaWiki.php(904): MediaWiki->performRequest()
#21 E:\inetpub\fmswmwiki\includes\MediaWiki.php(562): MediaWiki->main()
#22 E:\inetpub\fmswmwiki\index.php(50): MediaWiki->run()
#23 E:\inetpub\fmswmwiki\index.php(46): wfIndexMain() 161.69.111.128 (talk) 15:47, 17 January 2023 (UTC)
I can reproduce this on two instances (test and production) that have Special:Version:
Product Version
MediaWiki1.39.1
PHP8.1.14 (litespeed)
MySQL5.7.23-23
ICU69.1
Lua5.1.5
Pygments2.11.2
Interestingly enough on another similar wiki running on PHP 7.4.25 I cannot reproduce the error. Peculiar Investor (talk) 17:35, 17 January 2023 (UTC)
I'm still facing this issue while searching some keywords after upgrading mediawiki 1.39.1.Can anyone help me to fix this?Thanks Anisharosethomas (talk) 07:37, 19 January 2023 (UTC)
After commenting $wgExtraNamespaces its working fine. Can someone help me alternative for this? Anisharosethomas (talk) 08:14, 19 January 2023 (UTC)
I found another "word" that causes this issue. Searching for __NOTOC__ also is causing an Internal error and traceback.
I can reproduce this on a localhost testbed that has debug turned on so if further debug details are needed please let me know. Peculiar Investor (talk) 15:26, 5 February 2023 (UTC)
Question for the OP. Are you using the Extension:Widgets?
I think I've tracked down the issue on my wiki, somehow pages in the Widgets namespace are also showing up in the Article namespace (checked via Special:AllPages). I double-checked and the article namespace one is NOT a redirect.
What is weird is looking at the Page information for one, i.e. index.php?title=Widget:Google_Document&action=info shows the article in the Widget namespace.
In our wiki the term 'wiki' and '__NOTOC__' appears in at least one of the Widget namespace articles that also seem to be 'ghosted' into the Article namespace. This seems to confuse the underlying SQL that performs the search, hence the traceback. Peculiar Investor (talk) 00:49, 6 February 2023 (UTC)
I got this Problem since 1.38 at some Search Words i got same error. Also after upgrading 1.39 185.119.34.152 (talk) 07:42, 6 February 2023 (UTC)
The OP might want to look at the solution provided in this topic as it resolved the problems for my wiki.
Thanks to @Bawolff it was fixed by running cleanupTitles.php Peculiar Investor (talk) 11:21, 6 February 2023 (UTC)
Regardless, whatever is going on here sounds like a bug in search that should fail more gracefully, even in the presence of invalid titles. Bawolff (talk) 18:54, 6 February 2023 (UTC)
If someone opens a problem ticket I can supply a debug log that might be helpful in the investigation. Peculiar Investor (talk) 19:26, 6 February 2023 (UTC)

Update from 1.35.0 to mediawiki-1.39.1 MWException: Error: invalid magic word '='

Decided to update today.

After the update comes the following error: MediaWiki internal error.

Original exception: [Y8aJq5S5Xvb6xGwVlR3xjwAACiU] /Hauptseite MWException: Error: invalid magic word '=' Backtrace: from /www/htdocs/w0173121/wiki/includes/MagicWord.php(129)

  1. 0 /www/htdocs/w0173121/wiki/includes/MagicWordFactory.php(231): MagicWord->load(string)
  2. 1 /www/htdocs/w0173121/wiki/includes/MagicWordArray.php(85): MagicWordFactory->get(string)
  3. 2 /www/htdocs/w0173121/wiki/includes/MagicWordArray.php(287): MagicWordArray->getHash()
  4. 3 /www/htdocs/w0173121/wiki/includes/parser/Parser.php(3079): MagicWordArray->matchStartToEnd(string)
  5. 4 /www/htdocs/w0173121/wiki/includes/parser/PPFrame_Hash.php(276): Parser->braceSubstitution(array, PPFrame_Hash)
  6. 5 /www/htdocs/w0173121/wiki/includes/parser/Parser.php(2955): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
  7. 6 /www/htdocs/w0173121/wiki/includes/parser/Parser.php(962): Parser->replaceVariables(string, PPFrame_Hash)
  8. 7 /www/htdocs/w0173121/wiki/includes/parser/Parser.php(4928): Parser->preprocess(string, Title, ParserOptions)
  9. 8 /www/htdocs/w0173121/wiki/includes/language/MessageCache.php(1308): Parser->transformMsg(string, ParserOptions, Title)
  10. 9 /www/htdocs/w0173121/wiki/includes/language/Message.php(1456): MessageCache->transform(string, boolean, Language, Title)
  11. 10 /www/htdocs/w0173121/wiki/includes/language/Message.php(1009): Message->transformText(string)
  12. 11 /www/htdocs/w0173121/wiki/includes/language/Message.php(1053): Message->format(string)
  13. 12 /www/htdocs/w0173121/wiki/includes/OutputPage.php(1048): Message->text()
  14. 13 /www/htdocs/w0173121/wiki/includes/OutputPage.php(1097): OutputPage->setHTMLTitle(Message)
  15. 14 /www/htdocs/w0173121/wiki/includes/page/Article.php(474): OutputPage->setPageTitle(string)
  16. 15 /www/htdocs/w0173121/wiki/includes/actions/ViewAction.php(78): Article->view()
  17. 16 /www/htdocs/w0173121/wiki/includes/MediaWiki.php(542): ViewAction->show()
  18. 17 /www/htdocs/w0173121/wiki/includes/MediaWiki.php(322): MediaWiki->performAction(Article, Title)
  19. 18 /www/htdocs/w0173121/wiki/includes/MediaWiki.php(904): MediaWiki->performRequest()
  20. 19 /www/htdocs/w0173121/wiki/includes/MediaWiki.php(562): MediaWiki->main()
  21. 20 /www/htdocs/w0173121/wiki/index.php(50): MediaWiki->run()
  22. 21 /www/htdocs/w0173121/wiki/index.php(46): wfIndexMain()
  23. 22 {main}

Exception caught inside exception handler: [Y8aJq5S5Xvb6xGwVlR3xjwAACiU] /Hauptseite Error: Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::fetchRow() Backtrace: from /www/htdocs/w0173121/wiki/includes/libs/rdbms/database/DBConnRef.php(103)

  1. 0 /www/htdocs/w0173121/wiki/extensions/PageForms/includes/PF_FormLinker.php(40): Wikimedia\Rdbms\DBConnRef->__call(string, array)
  2. 1 /www/htdocs/w0173121/wiki/extensions/PageForms/includes/PF_FormLinker.php(150): PFFormLinker::getDefaultForm(Title)
  3. 2 /www/htdocs/w0173121/wiki/extensions/PageForms/includes/PF_FormEditAction.php(65): PFFormLinker::getDefaultFormsForPage(Title)
  4. 3 /www/htdocs/w0173121/wiki/includes/HookContainer/HookContainer.php(338): PFFormEditAction::displayTab(MediaWiki\Skins\Vector\SkinVectorLegacy, array)
  5. 4 /www/htdocs/w0173121/wiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
  6. 5 /www/htdocs/w0173121/wiki/includes/HookContainer/HookRunner.php(3523): MediaWiki\HookContainer\HookContainer->run(string, array, array)
  7. 6 /www/htdocs/w0173121/wiki/includes/skins/SkinTemplate.php(1195): MediaWiki\HookContainer\HookRunner->onSkinTemplateNavigation(MediaWiki\Skins\Vector\SkinVectorLegacy, array)
  8. 7 /www/htdocs/w0173121/wiki/skins/Vector/includes/SkinVector.php(346): SkinTemplate->runOnSkinTemplateNavigationHooks(MediaWiki\Skins\Vector\SkinVectorLegacy, array)
  9. 8 /www/htdocs/w0173121/wiki/includes/skins/SkinTemplate.php(1574): MediaWiki\Skins\Vector\SkinVector->runOnSkinTemplateNavigationHooks(MediaWiki\Skins\Vector\SkinVectorLegacy, array)
  10. 9 /www/htdocs/w0173121/wiki/includes/skins/SkinTemplate.php(790): SkinTemplate->buildContentNavigationUrlsInternal()
  11. 10 /www/htdocs/w0173121/wiki/includes/skins/SkinTemplate.php(229): SkinTemplate->getPortletsTemplateData()
  12. 11 /www/htdocs/w0173121/wiki/includes/skins/SkinMustache.php(88): SkinTemplate->getTemplateData()
  13. 12 /www/htdocs/w0173121/wiki/skins/Vector/includes/SkinVector.php(450): SkinMustache->getTemplateData()
  14. 13 /www/htdocs/w0173121/wiki/includes/skins/SkinMustache.php(58): MediaWiki\Skins\Vector\SkinVector->getTemplateData()
  15. 14 /www/htdocs/w0173121/wiki/includes/skins/SkinTemplate.php(177): SkinMustache->generateHTML()
  16. 15 /www/htdocs/w0173121/wiki/includes/OutputPage.php(2874): SkinTemplate->outputPage()
  17. 16 /www/htdocs/w0173121/wiki/includes/exception/MWException.php(181): OutputPage->output()
  18. 17 /www/htdocs/w0173121/wiki/includes/exception/MWException.php(215): MWException->reportHTML()
  19. 18 /www/htdocs/w0173121/wiki/includes/exception/MWExceptionHandler.php(129): MWException->report()
  20. 19 /www/htdocs/w0173121/wiki/includes/exception/MWExceptionHandler.php(248): MWExceptionHandler::report(MWException)
  21. 20 /www/htdocs/w0173121/wiki/includes/MediaWiki.php(581): MWExceptionHandler::handleException(MWException, string)
  22. 21 /www/htdocs/w0173121/wiki/index.php(50): MediaWiki->run()
  23. 22 /www/htdocs/w0173121/wiki/index.php(46): wfIndexMain()
  24. 23 {main} HandrikF (talk) 12:18, 17 January 2023 (UTC)

Java Problem

Hey there,

can someone take a look at my Commons.js? http://www.huskywiki.de/HuskyWiki/index.php?title=MediaWiki:Common.js


I have the problem that all my Navbars / Navboxes show both buttons "einklappen / ausklappen" (show / hide) (i.e. http://www.huskywiki.de/HuskyWiki/index.php?title=Joel_Keussen) TexasR87 (talk) 16:37, 17 January 2023 (UTC)

(Java is not involved at all, only JavaScript) Malyacko (talk) 10:07, 18 January 2023 (UTC)

How do I create a page that gets added on every user's watch list?

I would like to create a general discussion page for my small wiki. It would be best if every user is notified if something is written on the page. For this I have installed the extension Echo. As far as I know, the page must also be on the Watch list in order to get notifications. It would be cumbersome to tell each user to add the page to the watch list. So how can I put the page on the watch list by default (ideally with opt out)?


All informations about my wiki: https://academia.la/wiki/Special:Version


Thanks for any answers! Bildungskind (talk) 17:12, 17 January 2023 (UTC)

Error when browsing Wikipedia?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Made an account just for this. I tried to research something on Wikipedia for class and was met with this error:

"MediaWiki internal error.

Original exception: [79e9f9c4-dc13-4f03-a767-a53d8bbd94c5] 2023-01-17 18:36:42: Fatal exception of type "ConfigException"

Exception caught inside exception handler.

Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information."

How do I fix this? I have tried resetting my PC, opening and exiting Chrome, etc. Nothing works. Heh00222 (talk) 18:40, 17 January 2023 (UTC)

I'm getting the exact same problem as of a few minutes ago. Any help would be appreciated! Thanks Jkaharper (talk) 18:42, 17 January 2023 (UTC)
Same here, is this a server issue? Respublik (talk) 18:43, 17 January 2023 (UTC)
See https://phabricator.wikimedia.org/T327196#8532474 Bawolff (talk) 20:36, 17 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Cannot run update.php

Hello MediaWiki support desk.

I am trying to migrate to a new server.

Source: Centos 6, Mediawiki 1.29.0, PHP 5.6.37 (fpm-fcgi), MySQL 5.5.62

Target: Centos 7, Mediawiki 1.39.1, PHP 7.4.33, MySQL 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1

[root@genoma maintenance]# php update.php

MediaWiki 1.39.1 Updater


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

Wikimedia\Rdbms\DBQueryError from line 1618 of

/var/www/wiki/includes/libs/rd

bms/database/Database.php: Error 1146: Table

'mwiki_database.revision_comment_temp' doesn't exist

Function: MessageCache::loadFromDB(en)-small

Query: SELECT  /*! STRAIGHT_JOIN */

rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text

AS `rev_comment_text`,comment_rev_comment.comment_data AS

`rev_comment_data`,comment_rev_comment.comment_id AS

`rev_comment_cid`,actor_rev_user.actor_user AS

`rev_user`,actor_rev_user.actor_name AS

`rev_user_text`,rev_actor,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len

FROM `page` JOIN `revision` ON ((page_id = rev_page)) JOIN

`revision_comment_temp` `temp_rev_comment` ON ((temp_rev_comment.revcomment_rev

= rev_id)) JOIN `comment` `comment_rev_comment` ON

((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN

`actor` `actor_rev_user` ON ((actor_rev_user.actor_id = rev_actor))   WHERE

page_is_redirect = 0 AND page_namespace = 8 AND (page_title NOT LIKE '%/%'

ESCAPE '`' ) AND (page_len <= 10000) AND (page_latest = rev_id) 


#0 /var/www/wiki/includes/libs/rdbms/database/Database.php(1602):

Wikimedia\Rdbms\Database->getQueryException()

/var/www/wiki/includes/libs/rdbms/database/Database.php(1576):

Wikimedia\Rdbms\Database->getQueryExceptionAndLog()

#2 /var/www/wiki/includes/libs/rdbms/database/Database.php(952):

Wikimedia\Rdbms\Database->reportQueryError()

#3 /var/www/wiki/includes/libs/rdbms/database/Database.php(1708):

Wikimedia\Rdbms\Database->query()

#4 /var/www/wiki/includes/libs/rdbms/database/DBConnRef.php(103):

Wikimedia\Rdbms\Database->select()

#5 /var/www/wiki/includes/libs/rdbms/database/DBConnRef.php(325):

Wikimedia\Rdbms\DBConnRef->__call()

#6 /var/www/wiki/includes/language/MessageCache.php(594):

Wikimedia\Rdbms\DBConnRef->select()

#7 /var/www/wiki/includes/language/MessageCache.php(479):

MessageCache->loadFromDB()

/var/www/wiki/includes/language/MessageCache.php(402):

MessageCache->loadFromDBWithLock()

/var/www/wiki/includes/language/MessageCache.php(318):

MessageCache->loadUnguarded()


/var/www/wiki/includes/language/MessageCache.php(1162): MessageCache->load()

#11 /var/www/wiki/includes/language/MessageCache.php(1089):

MessageCache->getMsgFromNamespace()

#12 /var/www/wiki/includes/language/MessageCache.php(1060):

MessageCache->getMessageForLang()

#13 /var/www/wiki/includes/language/MessageCache.php(1002):

MessageCache->getMessageFromFallbackChain()

#14 /var/www/wiki/includes/language/Message.php(1473): MessageCache->get()

/var/www/wiki/includes/language/Message.php(970): Message->fetchMessage()

/var/www/wiki/includes/language/Message.php(1064): Message->format()

/var/www/wiki/includes/Status.php(202): Message->plain()

/var/www/wiki/maintenance/update.php(159): Status->getWikiText()

/var/www/wiki/maintenance/includes/MaintenanceRunner.php(309):

UpdateMediaWiki->execute()

/var/www/wiki/maintenance/doMaintenance.php(85):

MediaWiki\Maintenance\MaintenanceRunner->run()

/var/www/wiki/maintenance/update.php(312): require_once('/var/www/wiki/m...')

#22 {main}

[root@genoma maintenance]#


Your help to get this running will be much appreciated. Raverdugo (talk) 00:00, 18 January 2023 (UTC)

Do not upgrade from a MediaWiki version older than 1.33 to MediaWiki 1.39, or you may lose data! Upgrade to 1.35 first. See task T326071. Ciencia Al Poder (talk) 12:29, 18 January 2023 (UTC)

How to include some specific title from a page into the other one page

for example,

page_B's content as below.

=title 1=

walking

=title 2=

running


I use below way to try to include page_B's content in page_A.

{{:page_B}}


but actually I get whole page_B into page_a.

if I just want to include only title 1 of page_B into page_A, does anyone know how to get it?


THANK YOU! 61.216.156.247 (talk) 07:47, 18 January 2023 (UTC)

Does Extension:Labeled Section Transclusion help? Bawolff (talk) 08:43, 18 January 2023 (UTC)
Extension:Labeled Section Transclusion seems to need to pre-configure?
Is it possible to dynamically select corresponding title according to something like {{:page_B}}?
THANK YOU!
by reporter 61.216.156.247 (talk) 09:12, 18 January 2023 (UTC)
not really. At most you can use <noinclude> tags to exclude some parts of a page. Bawolff (talk) 09:20, 18 January 2023 (UTC)
I tried it and thank for your advice.
I still have a question that,
source page_B's content as below.
=title 1=
walking
=title 2=
running
=title 3=
sitting
If I want to include page_B's title 1 into page_A, include page_B's title 2 into page_C, page_B's title 3 into page_D......
what syntax should I use in target page?
THANK YOU!
by reporter 61.216.156.247 (talk) 03:11, 19 January 2023 (UTC)

Infoboxes

Hi, I would like to create infoboxes templates for my wiki articles like the wikipedia infoboxes. Lomeno 24 (Contact me here) 10:16, 18 January 2023 (UTC)

HI,
you have to create a specific page name "Template:name of your infobox
As shown in this link (french site but mediawiki code) :
https://wiki.rb-realisations.fr/index.php?title=Mod%C3%A8le:Infobox-page-technique Pacha35 (talk) 10:12, 3 February 2023 (UTC)
Thanks Lomeno 24 (Contact me here) 07:50, 4 February 2023 (UTC)

Can't create User Page

I'm trying to create a user page on mediawiki.org but I keep having this error. Enow97 (talk) 11:17, 18 January 2023 (UTC)

Your link doesnt work. Can you just copy and paste the error here? Bawolff (talk) 12:58, 18 January 2023 (UTC)
FYI, the message is presumably from abuse filter rule 95, which advises creating a user page on meta instead (which seems to have finally been followed). A bit weird that the attempts at a user page have claimed to be two completely different people. Clump (talk) 14:20, 18 January 2023 (UTC)

Revision 0 does not exist

So my wiki has gone through a few decades of upgrades and I would consider its database surely rife for optimization. I noticed this as I am unable to upgrade to the latest LTS, so now I am trying to isolate and fix as many problems with the database as I can.


One is shoddy files and other corruptions. Most maintenance scripts don't seem to really fix this.


One problem I have is similar to this one https://stackoverflow.com/questions/34143056/main-page-error-of-mediawiki

I have a file that displays properly but has no 0 revision registered for some reason and I cannot edit it, either. None of the "fixes" I can find on here and elsewhere on the web really help. I appreciate any pointers to maintenance scripts, hacks and other tips to really (really) fix flawed database structures etc... Rebastion2 (talk) 11:18, 18 January 2023 (UTC)

Can you post the entry in the page table for that page, along with anything in the revision table where rev_page is equal to the page_id for that page?
What version of mediawiki are you using?
Common causes of this are referential integrity errors, either with the page_latest field in page, the rev_comment_id field in revision or rev_actor field in revision (the last being most common as the actor migration upgrade script is fragile) Bawolff (talk) 12:57, 18 January 2023 (UTC)
First of all thanks for your interest in helping me. Ok let's see (would love a maintenance script that just goes through my entire database and either fixes everything or gives me a very detailed report what needs fixing).
"Entry in the page table for that page":
page_namespace 6 pagetitle 4A61636B70616C616E63652E6A7067 is_redirect 0 is_new 1 page_touched 20230118090223 page_latest 5734 page_len page_links_updated 3230313530343032313635383433
"anything in the revision table where rev_page is equal to page_id"
rev_id 5734 rev_page 2524 rev_commend_id 0 rev_actor 0 rev_timestamp 20060208174920 rev_minor_edit 0 rev_deleted 0 rev_len 0 rev_parent_id 0 rev_sha1 70686F6961633968346D383432787134357370377336753231657465657131 (this is not unique, I see a few adjacent revisions that have the same hash, but I could tink of reasons why that may be so, but not sure if it's supposed to be non-unique)
Mediawiki 1.38.2
I may have used delete old revisions many many years ago. And one of the things I have tried very recently is the migrateactors php script which helps in assiging content that has no actor assigned Rebastion2 (talk) 15:24, 18 January 2023 (UTC)
So the rev_actor being 0 and rev_comment_id being 0 indicate that update.php didnt do the migration properly.
The actor migration script generally doesnt work anymore. Its best to run it around 1.33. If you dont have backups to that point you would probably have to manually fix it by updating rev_actor to point to some actor. Bawolff (talk) 18:36, 18 January 2023 (UTC)
what do I point it to? this all means very little to me not being familiar with the product's sql architecture. Going back to 1.33 is not an option of course.... Rebastion2 (talk) 20:23, 18 January 2023 (UTC)
(wondering if this - horribly as usual documented - maintenance script might help? Manual:FindMissingActors.php ) Rebastion2 (talk) 22:33, 18 January 2023 (UTC)
Bawolff, I have a very concrete question, maybe you can point me in the right direction: from all I can gather, once restoring to a pre 1.35 backup state is off the table, there is no real way to "fix" this. However, if it only affects a manageable number of pages/files, I wonder if the following could be achieved: is there a way to manually remove all traces of these pages/files from the database, so that these become "nonexistent" again and can be re-created or re-uploaded (in the case of the files) thereby creating new/fresh and correct database entries for these content items? That would be a manual way of fixing this in order to have the next upgrade to 1.39.2 not throw any errors :) Rebastion2 (talk) 12:45, 15 February 2023 (UTC)
You could delete the entry in the page table i suppose, ymmv. Bawolff (talk) 15:03, 15 February 2023 (UTC)
hm, can't even find it. Nothing in the database seems to be in plain text, as far as I understand it it is all hashed, but can't find one of the files in question even by looking for their hashed value... so weird Rebastion2 (talk) 13:06, 16 February 2023 (UTC)
They aren't hashed. Some db tools will display page titles in hexadecimal form Bawolff (talk) 16:38, 16 February 2023 (UTC)
How weird, but indeed the sql query the db tool shows on top of the screen when opening the pages table says "
SELECT *, HEX(`page_title`) AS `page_title`, HEX(`page_content_model`) AS `page_content_model`, HEX(`page_links_updated`) AS `page_links_updated`, HEX(`page_lang`) AS `page_lang` FROM `swdb_page`LIMIT 50 Rebastion2 (talk) 11:58, 17 February 2023 (UTC)
talking to my hoster now why that is the database wide default, so weird Rebastion2 (talk) 12:46, 17 February 2023 (UTC)
it seems to be default behavior for "Adminer" to show as Hex if the column type is binary. Now of course it sucks the hoster uses Adminer, but before I go into further trouble I just want to make sure and ask this: binary is the correct format for the table column(s), right? Rebastion2 (talk) 09:26, 18 February 2023 (UTC)
Yes. We basically use it to tell the DB to be hands off about the value. Bawolff (talk) 22:53, 20 February 2023 (UTC)
Hello,
I found the same problem. I can nothing do with 1 page. I don't need this page. Deleting doesn't work. https://simpsonspedia.net/index.php?title=Homer&redirect=no
I found a experimental php-script. https://fossies.org/dox/mediawiki-1.39.1/DeletePage_8php_source.html
My first idea is a DB backup and than delete the entry in the table "page". But I think this isn't a clean way.
Next idea is using this experimental script after DB backup.
-/
Best regards Simpsonspedia.net (talk) 19:26, 18 February 2023 (UTC)
Hi Bawolf. Appreciate your input. If my problem is limited to just a handful pages/files, you mentioned they could be pointed to to "some actor". Any advice as to which?
The alternative would be to delete all mention of this content and create it anew (thereby correctly establishing that content and its relationships in the database like any new content created) Rebastion2 (talk) 11:45, 20 February 2023 (UTC)
it doesn't really matter which actor. You could create a new user for that purpose. Bawolff (talk) 22:54, 20 February 2023 (UTC)
I could just assign all these to me, but what values doe rev_actor and rev_comment_id etc. get? forgive me but it's all a bit overwhelming without prior in depth knowledge of the database structure. My goal would be for none of these to be 0, right? ev_minor_edit 0 rev_deleted 0 rev_len 0 rev_parent_id 0 isn't a problem? Rebastion2 (talk) 07:55, 21 February 2023 (UTC)
sorry to be a bother, still looking for a step by step sort of instruction how to possibly "fix" this manually (at least as a "hack" - I don't care who these revisions are assigned to as long as the database is no longer practically corrupted and these files uneditable) Rebastion2 (talk) 12:06, 13 March 2023 (UTC)
Still wondering how to solve this. There's something in phabricator that's not developed yet about re-calculating the content blobs and thus restoring the lost connections between the tables. If I know the handful of content items affected, could I do it manually? I wonder if I attempt another upgrade now will it work or is https://phabricator.wikimedia.org/T328169 the thing that needs to be done first. Rebastion2 (talk) 10:51, 16 January 2024 (UTC)
At your current state, most you can get is assigning all those xx_actor and xx_commend_id an existing id from the actor and comment table respectively. For example, choose a system user like "maintenance script" or create a new user just for this purpose, and a comment that's empty or has a meaningful text like "imported revision" or "restored revision" (you can create a new page and use this edit summary to create it. That should make your revisions accessible again if they're broken due to inconsitencies in those fields. Ciencia Al Poder (talk) 10:14, 8 December 2024 (UTC)
My SQL skills are rather basic, I may need a more detailed instruction on how to do it. 1) is there a systematic way to catch all the cases that are corrupted, I keep finding wiki content by accident that is affected 2) which fields in the database do I change to which variables/numbers/ids etc without causing further breakage? And I don't think I understand what you mean by creating an empty comment etc. To be clear: affect content is entirely non-editable from the front end... Thanks for you help! Rebastion2 (talk) 12:49, 11 December 2024 (UTC)

wikipedia popups don't show when logged in

When hover / retain mouse pointer over a link (word with a page in wikipedia), a popup normally appears, showing the beginning of the text of the respective page.

However, when I'm logged in as an editor, it now longer shows up.

Is this a bug or intended feature?

Vic 70.67.124.152 (talk) 00:37, 19 January 2023 (UTC)

You might have to enable it in special:preferences Bawolff (talk) 08:18, 19 January 2023 (UTC)

How to delete or disable the history in the summary field of the visual editor

In the visual editor, when entering a summary field, the content previously entered into the summary field is automatically filled in, how can this be removed or disabled?

I looked for Extension:VisualEditor parameters, etc. but could not find any such thing. Ryoya3 (talk) 09:27, 19 January 2023 (UTC)

@Ryoya3 I suspect that would be your browsers Autofill (or similarly named) feature as opposed to VisualEditor itself (Although code could be developed to stop that, I suspect) P858snake (talk) 03:37, 21 January 2023 (UTC)
Probably not, since the same content appears in all browsers. Ryoya3 (talk) 05:44, 21 January 2023 (UTC)

PageImages issue

I get this error on every page when i try and use PageImages extension, everything works fine without it, any idea whats going on?

https://pastebin.com/FpMfveAX PadawanAmy (talk) 13:45, 19 January 2023 (UTC)

Your version of extension:PortableInfobox is too old. You need to update it. Bawolff (talk) 14:01, 19 January 2023 (UTC)
I updated PortableInfobox to the latest version and it gives the exact same error PadawanAmy (talk) 14:44, 19 January 2023 (UTC)
are you sure?
The error message says the error is on line 112. The most recent version of the extension doesn't even have that many lines in that file https://github.com/Universal-Omega/PortableInfobox/blob/master/includes/services/Parser/MediaWikiParserService.php Bawolff (talk) 14:54, 19 January 2023 (UTC)
I updated a 2nd time and now I still get an error just a different one
https://pastebin.com/xpMNZ8yD PadawanAmy (talk) 14:57, 19 January 2023 (UTC)
Hmm. Still seems to be an issue with the portableinfobox extension. You may want to ask the maintainers of that extension. Bawolff (talk) 19:03, 19 January 2023 (UTC)

DumpBackup.php - Working Example of "pagelist" flag

Hi, does anyone have a working example of the DumpBackup.php maintenance script that references a list of pages to include in the import?

I'm running mediawiki on a Windows server, so I'm running the following command through powershell:

c:\php\php.exe e:\techwiki\HTL\maintenance\dumpBackup.php --current --pagelist=e:\Scripts\tmp_pagelist.txt > e:\Scripts\filedump.xml


where e:\Scripts\tmp_pagelist.txt contains a list of page titles that I've obtained by running a sql query on the pages table in the database (the page_title field)


I get a dump file, but it doesn't contain any pages data, just some site info.


When I switch on $wgShowExceptionDetails, I get the following error:

Exception from line 177 of E:\TechWiki\HTL\includes\Export.php: Can't export invalid title


Does anyone have any suggestions at all?


Thanks

Darren Dshinks (talk) 10:01, 20 January 2023 (UTC)

Based on the error, sounds like there is something wrong with the contents of your file containing the pagelist.
Does it work if you just use one specific page you know is good? Bawolff (talk) 11:59, 20 January 2023 (UTC)
Hi Bawolff, thanks for your response. Yeah, I was leaning towards that, too - I suspected the pagelistfile. I can't prove it though.
I've tried running this command on its own with none of the rest of my script running:
c:\php\php.exe e:\techwiki\HTL\maintenance\dumpBackup.php --current --pagelist=e:\Scripts\tmp_pagelist.txt > e:\Scripts\filedump.xml
The contents of the .txt file is just this:
Test1
Which the name of a vert simple page in my wiki.
/mywiki/index.php?title=Test1
Same error though.
Exception from line 177 of E:\TechWiki\HTL\includes\Export.php: Can't export invalid title
I'm thinking either:
  • I'm doing something wrong in the pagelist file (can't think what though)
  • Maybe some windows-specific weirdness? Like it's choking on unexpected line endings or something?
Both seem a bit implausible though. Dshinks (talk) 13:00, 20 January 2023 (UTC)
btw, it sounds like you are using a really old version of mediawiki. includes\Export.php hasn't existed since 1.26.
I would suggest trying it with unix line endings, but it really shouldn't make a difference.
You could try changing line 177 of E:\TechWiki\HTL\includes\Export.php to include $name in the error message to see what the name in question is Bawolff (talk) 13:33, 20 January 2023 (UTC)
Interesting result...
Exception from line 177 of E:\TechWiki\HTL\includes\Export.php: Can't export invalid title - ��T e s t 1
(pagename should be Test1)
Definitely some junk getting into the file somehow Dshinks (talk) 13:52, 20 January 2023 (UTC)
Is the file maybe being saved as utf-16 with a BOM or something like that. The spaces after each letter makes me think null bytes that somehow got converted to spaces. Bawolff (talk) 16:53, 20 January 2023 (UTC)
Lol you got me :)
We're running 1.24! Yeah, I know :D
Ok, I'll start by getting that variable in - I'll report back here if I find anything useful. Dshinks (talk) 13:48, 20 January 2023 (UTC)
Cracked it!
It works as expected if I use this command to construct my text file:
Out-File -Append -Encoding ascii -InputObject $pagename -FilePath e:\Scripts\tmp_pagelist.txt;
where $pagename contains a string with a valid name of a MediaWiki page.
Thanks Bawolff for your advice :) Dshinks (talk) 14:23, 20 January 2023 (UTC)

User page

I'm trying to create a userpage. I'm not being allowed to. Whenever I try to add text, I get this message:

It appears you are attempting to create a user page on this wiki, Did you know that you can create a Global user page on MetaWiki?, which will be available on all the Wikimedia Foundation wikis where you have a visited and activated your account.

I don't care about MetaWiki, I just want to make a userpage here. How do I make this go away so I can just make a normal user page? WikEdits5 (talk) 17:05, 20 January 2023 (UTC)

@WikEdits5 Due to the amount spam user page creations, We only support Global user pages created at metawiki for brand new accounts, If you create the userpage on meta, It will become available on all projects that you have a local account at (see Special:CentralAuth/WikEdits5) and that you haven't created a user page at P858snake (talk) 00:44, 21 January 2023 (UTC)
Thanks. How can I create one? WikEdits5 (talk) 09:11, 21 January 2023 (UTC)
Same as other wikis---go to the meta wiki, click on your username and create the page. Clump (talk) 14:38, 21 January 2023 (UTC)

WIKIMarkdown

Hello,

I'd like to know if this extentions is still supported, I mean the WIKIMarkdown that I found at this URL Extension:WikiMarkdown#Install Dependencies .

I have some trouble installing it because I can't find the GITHUB repository for the WIKIMarkdown packages.

Thanks you all Lura.Rosadini (talk) 17:55, 20 January 2023 (UTC)

Github repo seems still there https://github.com/kuenzign/WikiMarkdown
Please keep in mind extensions can be created by anyone, and there is nobody officially deciding what is "supported" Bawolff (talk) 22:01, 20 January 2023 (UTC)

Underscores at the end of Reddit usernames

Twice so far on my Miraheze site, there's been a quirk in which Reddit usernames ending with underscores always leave them out when processed via interwiki. For example, "NoUterusNoOpinion_" (today's fan-work guest of mine) is interpreted as the nonexistent "rdtu:NoUterusNoOpinion". (And yes, I read Manual:Page title a few minutes before press time.) How else to preserve the ending underscore without resorting to external linkage? --Slgrandson (talk) 20:55, 20 January 2023 (UTC)

Interwikis generally assume mediawiki style page titles, which aren't allowed to end in spaces/underscores. I am not sure it is possible. Bawolff (talk) 22:00, 20 January 2023 (UTC)

Why is MediaWiki removing the endline in some cells and not in other cells?

correct format

I have a table with lot of cells. For some reason, the mediawiki removes the endline in some fields and keeps it in others. I need this endline to stay. I don't even know why it's automatically deleting it. Can someone help me fix this problem?

MediaWiki removing endline automatically after saving

Cptalpdeniz (talk) 04:59, 21 January 2023 (UTC)

Please include the wikitext in question Bawolff (talk) 11:09, 21 January 2023 (UTC)
Are you asking for the link sorry? Cptalpdeniz (talk) 05:11, 22 January 2023 (UTC)
That or the markup code of the page in question. Bawolff (talk) 11:27, 22 January 2023 (UTC)

delete account

I want to delete my wikialpha account. https://en.wikialpha.org/wiki/File:Raymond_Roberts.jpg 103.239.254.91 (talk) 08:51, 21 January 2023 (UTC)

WikiAlpha is not run by the WikiMedia Foundation, You will need to talk to the relevant admins on WikiAlpha. P858snake (talk) 09:37, 21 January 2023 (UTC)

After update to 1.39.1: content of pages not shown ("page does not contain content at the moment")

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello,

after I updated to version 1.39.1 the content of pages is not shown anymore. The pages are all there (I can see them under special pages). But the content is not shown, Only message: the page does not have content at the moment). When I click on Edit the message appears that version 0 of the page can not be found. Does this have something to to with the index? Can I rebuild an index after update? I am thankful for any help or hint. Thanks! Markus Lowadk (talk) 14:08, 21 January 2023 (UTC)

Sometimes this happens if the actor migration script didn't run properly. If possible, try restoring from backup, upgrading first to 1.32, running cleanupUsersWithNoId.php and migrateActors.php and then upgrading the rest of the way. Bawolff (talk) 14:56, 21 January 2023 (UTC)
Thanks a lot for the quick answer. I have no command line access to the server (hosted server). Is there a way to do this via browser or ftp access? Lowadk (talk) 10:15, 22 January 2023 (UTC)
Solved it by exporting the pages from the old wiki and imported it to the new. Had to upload all images again and adapt css and skins, but at least it works now. Thanks Lowadk (talk) 20:31, 22 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Broke wiki with unresolvable syntax error in LocalSettings.php

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I was trying to set up the $wgSMTP part of my LocalSettings.php file and I started to get syntax errors that crashed my site. So I kept poking away at it until the file cleared a syntax checker, and yet my site wouldn't come back online. I keep getting something like this.

Parse error: syntax error, unexpected '=', expecting ')' in /home/customer/www/mydomainname.net/public_html/wiki/LocalSettings.php on line 56

Alright. So. I tried a bunch of stuff. I tried deleting all of the code I had added that caused this error to appear. Syntax error still appears in the same place. I tried swapping in an earlier version of the php file. Syntax error still appears in the same place. Eventually I deleted the file altogether and swapped in a clean one from another wiki installation I have.

The website went back up briefly. I seemed to have a version of LocalSettings.php that worked again. So I made a backup copy of this which I could maybe revert to, and then tried to carefully edit it to reinstate a bunch of alterations I had previously made. Alterations that HADN'T crashed the site. Well, guess what? The same syntax error came back. This time, reverting to the backup LocalSettings didn't work.

(As a side note, I have been testing the site with multiple browsers and clearing the caches again and again.)

I'm honestly at my wit's end here. I have no idea what I'm doing wrong. How in the world can I still have this error when I'm dialing back to a version of LocalSettings.php from before the error first happened? Did something weird get corrupted somewhere? This is a pretty new wiki installation; would it be easier to just wipe it out completely and start over? Even if I do that, how do I make sure this doesn't happen again when I try to get SMTP set up?

Please help! ManicPhalarope (talk) 23:30, 21 January 2023 (UTC)

If you check the file for syntax errors with the php -l command from the commandline, does it report no syntax errors even when the webserver is still complaining?
If so, some possibilities:
  • php opcache issue. Normally php clears that everytime the file's mtime is updated. Maybe in some weird setup that isn't happening properly.
  • browser caching. Normally not an issue as 500 errors are generally not cached, but try adding ?123 at the end of the url just to make sure
  • some sort of frontend cache (varnish, cloudflare, etc). Similar to browser cache. Bawolff (talk) 00:51, 22 January 2023 (UTC)
It did end up being the frontend cache! I was able to get into the SiteGround settings and purge it, which fixed the problem. Thank you! ManicPhalarope (talk) 02:29, 22 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Trying to change email via Special:ChangeEmail results in timeout

In the process of trying to troubleshoot a bigger issue (getting the wiki to send confirmation emails and password resets to users via SMTP), I saw in another topic that I might use Special:EmailUser to test some of the functionality. Doing this, I received the No Send Address error -- my sysop account apparently has no email attached to it (even though, bizarrely, I remember associating an email with the account when prompted to do so when installing the wiki via SiteGround). So I went to Special:ChangeEmail and tried to fix the problem. However, submitting an e-mail address via the form only results in a timeout. What in the world could be causing this?

In possible connection to the problem I was originally trying to troubleshoot, I also get a timeout whenever I try to create a new user account that has a randomly generated password sent to it. (The account itself does exist afterward, but the password is never sent.) Just in case there is some connection, here's the potentially relevant parts of my LocalSettings.php:

$wgEnableEmail = true;
   $wgEnableUserEmail = true; # UPO
   
   $wgSMTP = [
       'host'      => 'mail.mydomain.net', 
       'IDHost'    => 'mydomain.net',     
       'localhost' => 'mydomain.net',    
       'port'      => 465,                
       'auth'      => true,             
       'username'  => 'webmaster@mydomain.net',  
       'password'  => 'PASSWORD'    
    ];
   
   $wgEmergencyContact = "manicphalarope@mydomain.net";
   $wgPasswordSender = "webmaster@mydomain.net";
   
   $wgEnotifUserTalk = false; # UPO
   $wgEnotifWatchlist = false; # UPO
   $wgEmailAuthentication = true;

Many thanks in advance! ManicPhalarope (talk) 02:43, 22 January 2023 (UTC)

Potentially the smtp server you have configured isn't responding properly. Bawolff (talk) 11:26, 22 January 2023 (UTC)

Difficulty with enabling Google Adsense on Mediawiki

I'm running Mediawiki 1.37.2 with the 'Medik' skin. I'm having a lot of difficulty with running Google Adsense. This is what I have done so far:

- Used Google_Adsense extension: this didn't work

- Used the SiteNoticeAfter web hook: $wgHooks['SiteNoticeAfter'][] = function(&$siteNotice, $skin) - this hasn't worked

- Used the HeaderExtension extension: this didn't work either


In all the above methods, I included both Google's "Connect your site to AdSense" and the header scripts (to format ads), to the "LocalSettings.php" file.


Any other suggestions? The.machine.preacher (talk) 03:17, 22 January 2023 (UTC)

Cannot upload

Getting this error even when logged in:

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

The action you have requested is limited to users in the group: emailconfirmed."

Advice? 2600:8803:A900:BE00:FC0E:DD62:12FF:84FD (talk) 04:24, 22 January 2023 (UTC)

You need to confirm your email address. Go to Special:Preferences#mw-prefsection-personal-email and make sure your account has an email address and that it's confirmed.
If this is your own wiki, you could also change the user-group requirements for uploading. Sam Wilson 09:51, 22 January 2023 (UTC)

List of articles

I updated the wiki on my site.after the update, the list of each article was removed from the bottom of lead and moved to the left side of skin.

What should I do so that vector is updated but the list is the same as the previous vector? ~ Safequestion (talk) 12:21, 22 January 2023 (UTC)

There are two vector skins - vector and vector-2022 (yes it is confusing and annoying that they are named like that). You could try switching the skin back to the old vector ($wgDefaultSkin in LocalSettings.php) Bawolff (talk) 16:59, 22 January 2023 (UTC)

Images not shown - "you don't have permission to access this resource"

I am not seeing the images I am uploading into my wiki.

I am getting the following message when clicking on an image.

"you don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe"

So, it's about permissions, but where can I change them?


I am using MediaWiki 1.39.1. FipsStel (talk) 15:24, 22 January 2023 (UTC)

So it sounds like the permissions of a .htaccess file. You should be able to change it from the command line with chmod (e.g. chmod a+r /var/www/html/w/images/.htaccess assuming your wiki is installed in /var/www/html/w/ ). Bawolff (talk) 16:30, 22 January 2023 (UTC)
This needs to be inputed into the .htacess? FipsStel (talk) 18:10, 3 February 2023 (UTC)
No. The permissions on the .htaccess file need to be changed. Bawolff (talk) 19:23, 3 February 2023 (UTC)
Dear Community,
I have exactly the same problem. I can upload images to wikimedia, but when I try to access them, it says "You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe"
The permissions for htaccess are set correctly though(either 664 or 775 doesn't work). Can anyone help me further with this`?
kind regards,
Stefan 77.0.27.3 (talk) 10:29, 7 November 2023 (UTC)
Has anyone figured this issue out? I am able to upload images - but get the same error above - Am also able to change permissions on the .htaccess file but no combination seems to work.
Thanks in advance,
Dean DAChristiansen (talk) 18:08, 15 May 2024 (UTC)
If its not file permissions, it could be some other access control technique, like selinux or ACLs. Also be sure you are changing permissions on the correct .htaccess file as well as the .htaccess in all parent directories if they exist. Bawolff (talk) 22:30, 15 May 2024 (UTC)
I deleted the image directory .htaccess file; and my image directory permission is set to 755 - my images now seem to be showing normally.
thanks,
Dean DAChristiansen (talk) 16:30, 16 May 2024 (UTC)

Error loading articles after upgrading to MW 1.39

I've got a wiki on my workstation (localhost) and had to upgrade PHP to 8.2 (which in turn meant I had to switch to a different Apache build) for a different application to work, which in turn meant I had to upgrade MW to 1.39 from 1.28. I used the old LocalSettings and edited it according to what the errors complained about.


The upgrade resulted in a plethora of errors while running the update scripts, namely missing fields and tables, which I manually added after looking up what they're supposed to look like. After a lot of fiddling I finally got the wiki to load, but it's not happy. I have no idea if I'm still missing any tables and/or fields since it doesn't tell me. I enabled all the extensions in PHP it demanded and was able to fix the user table so I can log in, but beyond that I can't figure out why it doesn't work.


None of the articles will load and I simply get


Error: There is currently no text in this page. You can search for this page title in other pages, [ search the related logs], or [ create this page].


This goes for ALL articles and category pages, with no exception, including image file pages. Through Special:AllPages it will list all articles in the wiki, but it gives the same error no matter which one I try to read. All categories are also still listed, and the category pages show subcategory and article listing, but again an error for the body. It also fails to show what category any page is in.


When I attempt to edit any page it goes

The revision #0 of the page named "Main Page" does not exist.

This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the [ deletion log].


It also fails to load the "toolbar" on the edit page, but then that may be an extra extension I can't recall the name of.


Another thing is that 1.39 doesn't seem to function correctly on localhost, and I can't tell if this is what causes it to not load correctly. That is, my wiki is called "P32" and it does load correctly, but when it does redirects, like after logging in, it will point to www.P32.com which doesn't exist, and thus I get more errors, and I can't figure out what causes that or how to stop it. Never had any issues with that in previous versions.


Tech part in short:

MW 1.39.1

PHP 8.2.1

Apache 2.4.55 (Win64)

MySQL 8.2.1 Community Server

all running locally on Windows 10


There's no internet access or domain for this machine (meaning the httpd is not reachable from outside my LAN) SteelRodent (talk) 16:12, 22 January 2023 (UTC)

For the first part. What you describe sounds like referential integrity issues, particularly with the actor migration.
A lot of people have luck by first upgrading to 1.32. Then running cleanupUsersWithNoId.php and migrateActors.php. Followed by updating the rest of the way
> Another thing is that 1.39 doesn't seem to function correctly on localhost, and I can't tell if this is what causes it to not load correctly. That is, my wiki is called "P32" and it does load correctly, but when it does redirects, like after logging in, it will point to www.P32.com which doesn't exist, and thus I get more errors, and I can't figure out what causes that or how to stop it. Never had any issues with that in previous versions.
What is $wgServer set to in LocalSettings.php ? Bawolff (talk) 16:27, 22 January 2023 (UTC)
I guess I need to download 1.32 first and see if it'll fix things.
EDIT: This has turned out to be a bigger challenge than I thought. The 1.32 scripts are spitting out fatal PHP errors despite downgrading PHP to 7.4 so I've gotten no further.
As for the settings:
$wgServer           = "/localhost/P32/";
$wgServerName       = "P32";
$wgSitename         = "P32";
It's not clear in the documentation if it needs all three and it's obviously not designed to run without a domain, so this is what I came up with after some trial and error SteelRodent (talk) 08:59, 23 January 2023 (UTC)
$wgServer needs to have a protocol and host only. So it can be 'http://localhost' or '//localhost' or 'https://localhost' it cannot have a path. The path part of the url comes from $wgScriptPath and (optionally) $wgArticlePath.
$wgServerName should not be set (It is detected automatically), and that is also the wrong value for it. Bawolff (talk) 17:45, 24 January 2023 (UTC)
Instead of 1.32, use 1.35, which may have some bugs fixed for the migration. However, if you've upgraded your database already, you may have lost data already. See phab:T326071. There's no way to downgrade the database. Preferably you should restore from backup. Ciencia Al Poder (talk) 09:42, 23 January 2023 (UTC)
Got the 1.32 update scripts to work by disabling some error checks PHP disagreed with in versionchecker.php (assume because I couldn't find the correct PHP version for that MW). Then I did the whole thing again with 1.35, and then again with 1.39. Used the --force option on update.php in the hope it'd rebuild all the references.
Unfortunately it hasn't solved the problem. I have checked that everything is still there in the page and text tables, so the primary content isn't lost per se, and all the category and file tables are intact (or at least have their content) as well. I assume that means it's a matter of lost/missing references somewhere, only I don't know enough about how MW uses the enormous amount of tables to tell what's missing or wrong. SteelRodent (talk) 12:32, 23 January 2023 (UTC)
this is similar to a few other support requests on here and more and more appears to be quite an enormous problem for many legacy wikis in the way mediwiki handled the upgrades. It's just really not understandable how these upgrade scripts seem to have not worked in certain version bumps and once you're past some version and unable to restore to some earlier point (which is quite impossible for active wikis) then these reference tables are somehow "lost" forever. What this needs is a fix that would restore certain references, maybe by re-inserting mock revion 0s so these pages are accessible and editable again... Rebastion2 (talk) 10:11, 24 January 2023 (UTC)
Been reading through the manual about the structure of the primary tables and believe I've found why my wiki is broken:
Page.page_latest has matching entries in Revision.rev_id, and Revision.rev_page correctly points back to Page.page_id, but...
Revisions.rev_text_id is not present, and was likely removed by the update scripts since it was apparently discontinued with 1.32 as part of the MCR project, and the manual states it was replaced by content.content_address which references the latest revision tracked by the slots table, and that is where it breaks.
The content and slots tables only have 71 rows (which appear to match) while there are 7689 rows in the page table and over 25000 rows in the text table. Meanwhile the revision table has roughly the same amount of rows as the text table. This means the content of the revision.rev_text_id was not correctly converted into the slot and content tables before the field was removed.
Another problem is that slots.slot_revision_id is supposed to match revision.rev_id, but for every single one of the 71 rows in slots table the rev_id has no matching entry in the revision table.
As there is no back reference from the text table to any of the other tables, and the rev_text_id field is missing, there does not appear to be any way to rebuild the wiki database from this state.
Unfortunately I messed up and didn't back up the database before I started upgrading, so I don't have a recent dump with the revision table intact, and thus the only way for me to rebuild is to make a new DB for the wiki, pull the blobs from the old, and paste them into the wiki. Only without a proper reference from the revision table there's no way to tell which entries in the text table is the latest revision.
I will say that if the update script is going to completely delete parts of the database it absolutely must verify that all the data of those fields is copied correctly before deleting them. The fact the row count of the new tables don't match the one they're meant to replace is pretty damn bad when it's the only reference to the actual content. I understand that we're trying to avoid duplicating data throughout the database, but if the text table had a back reference to the revision table we'd be able to rebuild most of the database from that one table. SteelRodent (talk) 13:46, 24 January 2023 (UTC)
yeah this all appears to be a major clusterf***, luckily in my case so far I seem to have (anecdotal) incidents in the lower double digits of pages/files that are actually causing trouble, so if I knew how to approach it, I could even fix some things manually, but you must be going insane with the entire database affected like this.... in my case I noticed way too late that there was a problem in the first place - precisely because just a handful of content pages are affected so it took me a while to stumble across these and noticed there was a corruption in the database dating back to who knows which update over the last 10 years.... Rebastion2 (talk) 16:45, 24 January 2023 (UTC)
If every single page is broken, that's probably T326071. Sorry :( You will have to restore the old wiki from a dump, and then either wait for 1.39.2 to be released, or upgrade to 1.35 and from there to 1.39.
If only a few pages are broken, that's probably a different issue. Tgr (WMF) (talk) 03:29, 26 January 2023 (UTC)
I didn't check the actor field, but there is part in the MW manual (forgot exactly where, but on one of the pages about the content, slots, or revision tables) where it states something like "if this reference is invalid you'll see 'Error..." and lists the exact error I got.
Either way that database is utterly hosed. As I said before, I screwed up and don't have a recent backup because I forgot to do it before running the update (note to self: figure out how to automate the dumps), so the only backup I got is 3 years old and missing a good chunk of the content because much of what is in the wiki was imported from other sources during covid lockdown. This is entirely on me, but luckily this is not an online wiki - I mostly use it for documentation, prototype articles, and keeping track of various stuff.
So, anyway, I stuck with 1.39 and let it build a new database. And then I'm stuck with the arduous task of manually recreating all the content. To do this I've thrown together a PHP script that pulls the blobs from the old text table so I can paste them into the new database. This is a slow process, but I can't see any way of automating it in a meaningful way SteelRodent (talk) 11:07, 26 January 2023 (UTC)
I would still be interested in knowing how this could be "fixed" somewhat if it really just concerns a very low number of pages. In my case I think (I can't say for sure) only about 20 or so pages may be affected (pages and files, mostly files though). I would love a step by step guide as to 1) how to sure-fire identify all the pages/tables impacted 2) locate what is missing and 3) how to fill up the actors/rev ID with something bogus in a way that even though it might be hackish, it would allow me to access this content again and possibly delete them from the wiki interface or overwrite them with a newer revision etc. One of the reasons I noticed these things in the first place was upgrades to 1.39 making half the website unusable. But just like SteelRodent, I don't have any backups that are pre-1.35 and with current content at the same time. I am somewhere stuck at 1.38 nomansland with a partially corrupt database... Rebastion2 (talk) 15:52, 26 January 2023 (UTC)
It's hard to provide a guide for DB corruption because the DB can get corrupted in an infinite number of ways. You might be able to use findMissingActors.php --field rev_actor --overwrite-with 'Unknown user' to reassign missing users. I don't know if there is anything similar for revisions. Tgr (WMF) (talk) 22:28, 26 January 2023 (UTC)
When it comes to automatically restoring the revisions, I really don't see how it can be done in a meaningful way once you lose all references to the text table and that table doesn't refer to anything else. The problem is once the reference to the text table is lost there's nothing to identify which row in that table belongs to what article and thus that entire table is effectively orphaned. The files are indexed in a different table and at least in my case that seemed to be working fine, but then revisions for files are done in a completely different way.
The revision table is apparently the only one that refers to the title of pages, so it would require a very intelligent parser to read through the text table and figure out what goes where, and I've never seen a wiki where every article contains the title in the body in a consistent format. The alternative I can see is to create all new dummy entries for every entry in the text table (and let's not forget that not everything in a wiki has a body), but then - depending on the wiki in question - you'll end up with potentially thousands of redundant articles that you'll then have to identify, move, delete, and so on, and then you're effectively back to doing the whole thing manually anyway, which makes it much faster to just manually restore it to begin with. SteelRodent (talk) 09:27, 27 January 2023 (UTC)
Since revision ids and text ids are incremental, you may be able to guess the text id from a revision id by sorting both and assigning them in order. There are several causes for text ids not matching, those are the ones that come to my mind:
  • Some extensions, like AbuseFilter, insert text records for their filters and other data, which may add more text ids without creating revision ids.
  • When reverting edits, I think MediaWiki reuses the same text ID of the original revision being reverted to for the new revision.
You may do an initial assignment, and then see how it generally looks. If you see revisions with text that doesn't belong to the page, try again from the revision where it starts to differ, by adding some offset, and so on.
For the abusefilter records, you may get those text ids from the abuse filter tables and discard them directly. You'll have to dig yourself on which tables are they stored, though. Ciencia Al Poder (talk) 09:39, 27 January 2023 (UTC)
SteelRodent, good point. However, if I could move, delete, and so on, that would already be a huge progress. At the moment, I can't, because that throws errors. I'd rather have some bogus content in the wiki that I can then move, delete, edit, etc, than have corrupted content that can't be used or fixed on an editorial level.... Rebastion2 (talk) 12:00, 27 January 2023 (UTC)
You can probably reconnect text entries with revisions by recomputing the sha1 hash, as long as the DB got corrupted in such a way that the sha1 is still present. Filed T328169 about that. Tgr (WMF) (talk) 20:28, 27 January 2023 (UTC)
First of all happy new year. What are the chances of https://phabricator.wikimedia.org/T328169 becoming reality? Rebastion2 (talk) 10:51, 16 January 2024 (UTC)
Not too much unfortunately, most developers tend to focus on tasks that are relevant for Wikipedia & co, and this one isn't. Maybe if you can produce a sample of exactly how your DB is corrupted, someone can suggest a query or snippet for fixing it. (Also do you want to recover the data? Or just get rid of the affected pages? Deleting them from the page table and deleting relevant revisions from the revision table should accomplish that.) Tgr (WMF) (talk) 03:20, 17 January 2024 (UTC)
Thanks for the reply. The second option may also work for me, unless I discover loads more pages affected. It would be great (for clueless non-IT guys like me) to have a thorough guide as to 1) how to precisely detect all affected content in the database 2) how and where to delete without doing additional damage and 3) how to identify the files and thumbs from the file system if it's about files (in my case some are files) Rebastion2 (talk) 16:23, 18 January 2024 (UTC)
Same thing happened to me and I went from 1.35.14 to 1.39.8. I was thinking I was following exactly what docs suggested, but still I ended with no articles in my wiki. Damn. 81.2.249.137 (talk) 13:40, 11 July 2024 (UTC)

This script must be run from the command line (PuTTY)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I wanted to prepare for the kernel update process (V 1.37 --> 1.39) according to Handbuch:Aktualisierung - MediaWiki .

PHP: 7.4.33

MySQL: 5.7.38

With PuTTY i tried to manually force the job queue to run with the following command:

"php maintenance/runJobs.php"

PuTTY says: "This script must be run from the command line"


Any ideas? Ufnbg (talk) 17:07, 22 January 2023 (UTC)

This is caused if the php binary is the cgi version instead of the cli version. Sometimes the php binary is named something else like php-cli or it might be in a nonstandard path. Contact your hosting provider for help. Bawolff (talk) 19:27, 22 January 2023 (UTC)
Thanks, that was the solution! PHP Cli mode must be used. Ufnbg (talk) 21:19, 22 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Guide/tutorial on making the main page look good

Hello, is there any guide or tutorial on making the front main look good? I currently only have a plain markdown main page, but wikis like en.wikipedia.org have really nice main pages. Is there some sort of guide to achieve this? I understand you require CSS, but is there something more indepth than just that?

Thanks Wassermelon (talk) 20:10, 22 January 2023 (UTC)

What does "good" mean? :) You could copy templates etc. Maybe https://meta.wikimedia.org/wiki/Small_wiki_toolkits/Starter_kit/Mainpage_customization also touches a few aspects, though that's for Wikimedia websites and not MediaWiki in general. Malyacko (talk) 22:42, 22 January 2023 (UTC)
I followed this guide completely. Didn't work. When I include the template to my main page it doesn't actually appear as CSS, only as regular markdown... Wassermelon (talk) 11:08, 25 January 2023 (UTC)
Might require using Special:ChangeContentModel to set the content type to CSS. Malyacko (talk) 12:53, 25 January 2023 (UTC)

[no req] Error: Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::numRows()

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


After Update from 1.37 to 1.39 i got the following message on the main site (where the extension "Newest Pages" is in use.

[no req] Error: Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::numRows()


The update seems to be successful. What does the error message tells me?

The message does not appear, if i comment the line in the LocalSetings.php out. Ufnbg (talk) 22:36, 22 January 2023 (UTC)

Release notes/1.39#Breaking changes in 1.39 - it means that someone needs to update the code of that extension. Malyacko (talk) 22:41, 22 January 2023 (UTC)
I was confused by the latest version 1.22 (see here: Extension:Newest Pages - MediaWiki )
which was installed before the update.
But with download of this version Download MediaWiki extension - MediaWiki here, the extension works again (obviously also 1.22 - but for 1.39?). Ufnbg (talk) 22:52, 22 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Special:Notifications

I need help to activate Special:Notifications on my wiki, the special page does not exist.

the special page does not exist.

Lomeno 24 (Contact me here) 04:13, 23 January 2023 (UTC)

You seem to be missing Extension:EchoTheDJ (Not WMF) (talkcontribs) 10:35, 23 January 2023 (UTC)
Thanks Lomeno 24 (Contact me here) 00:17, 24 January 2023 (UTC)

новичок в теме

Доброго здравия! Подскажите как мне добавить инфу в раздел https://bikeswiki.ru/ - я отрисовываю схемы в хорошем качестве, векторное изображение и готов быть полезным для технической литературы. Kuftin13 (talk) 04:15, 23 January 2023 (UTC)

You will need to ask https://bikeswiki.ru/ - we do not run that website. Malyacko (talk) 12:57, 23 January 2023 (UTC)

"What happened to my reply re. mediawiki?"

Hi, can someone help answer this user? Thank you. Patafisik (WMF) (talk) 08:00, 23 January 2023 (UTC)

It's unclear what the question is... https://meta.wikimedia.org/wiki/Special:CentralAuth?target=Steue implies they have a global account, so on mediawiki.org it will be the same username and password. User:Steue does exist (the account, not as a page). In case that a password policy was an issue, then folks are welcome to update their password. Malyacko (talk) 13:02, 23 January 2023 (UTC)
Reading from the description. It sounds like the user never tried to login with their username and password. They tried to create an account, but their account already exists. They should try and login via Special:Userlogin.
Due to increased privacy controls in web browsers, automatic login doesn't work between sites as much anymore. You have to login separately, but its the same username and password. Bawolff (talk) 14:09, 23 January 2023 (UTC)
@Malyacko
Thanks for your answer. The "Log in" problem is solved: I could not see the button [More options] due to my own colours. More details on my talk page:
https://en.wikipedia.org/wiki/User_talk:Steue#What_happened_to_my_reply_re._mediawiki?
Ping welcome, ~ Steue (talk) 10:38, 24 January 2023 (UTC)

My 1.38 Mediawiki acts as if it is old

Dear experts

I tried to install Semantic-Mediawiki on my Mediawiki. It went as it should Now I get an

Error: This version of Bootstrap is only compatible with MediaWiki 1.22 or above. You need to upgrade MediaWiki first.

When I upgrade, and I try to revert to my old database, it says it is too old.


Kim Andersen, Denmark 87.54.33.241 (talk) 08:50, 23 January 2023 (UTC)

Replace talk pages with forum link?

Is it possible to redirect the link to a page's talk page to an external site, like a discussion forum?


Wishful daydreaming: Wouldn't it be cool to completely replace the talk pages with a wiki's own Discourse forum without separate login? PKFP (talk) 16:00, 23 January 2023 (UTC)

They experimented with Discourse at one point. From memory, it was abandoned because it wasn't used enough. However, for instance, I regularly read this Support Desk page but never knew about the Discourse forum until it was gone.
Likely if it had been promoted more (or even if the experiment had been temporarily to replace this page) then would still be in existence and this page would not.
See Discourse. Jonathan3 (talk) 22:40, 23 January 2023 (UTC)

Update from 1.30 to 1.35

Hi,


I wanted to update my MediaWiki. The update was carried out successfully, but I get an error message when I call it up. Unfortunately I can't get any further. Can someone help me?



MediaWiki internal error.


Original exception: [Y87iww4SN9yTrAEJFF9mzgAAChw] /mediawiki-1.24.1/index.php?title=Hauptseite ConfigException: GlobalVarConfig::get: undefined option: 'ResourceLoaderLESSVars'

Backtrace:

from /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/config/GlobalVarConfig.php(59)

#0 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/extensions/MobileFrontend/includes/MobileFrontend.hooks.php(691): GlobalVarConfig->get(string)

#1 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/HookContainer/HookContainer.php(338): MobileFrontendHooks::onBeforePageDisplay(OutputPage, MediaWiki\Skins\Vector\SkinVectorLegacy)

#2 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

#3 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/HookContainer/HookRunner.php(945): MediaWiki\HookContainer\HookContainer->run(string, array, array)

#4 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/OutputPage.php(2869): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay(OutputPage, MediaWiki\Skins\Vector\SkinVectorLegacy)

#5 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/MediaWiki.php(922): OutputPage->output(boolean)

#6 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/MediaWiki.php(562): MediaWiki->main()

#7 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/index.php(50): MediaWiki->run()

#8 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/index.php(46): wfIndexMain()

#9 {main}


Exception caught inside exception handler: [Y87iww4SN9yTrAEJFF9mzgAAChw] /mediawiki-1.24.1/index.php?title=Hauptseite ConfigException: GlobalVarConfig::get: undefined option: 'ResourceLoaderLESSVars'

Backtrace:

from /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/config/GlobalVarConfig.php(59)

#0 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/extensions/MobileFrontend/includes/MobileFrontend.hooks.php(691): GlobalVarConfig->get(string)

#1 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/HookContainer/HookContainer.php(338): MobileFrontendHooks::onBeforePageDisplay(OutputPage, MediaWiki\Skins\Vector\SkinVectorLegacy)

#2 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

#3 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/HookContainer/HookRunner.php(945): MediaWiki\HookContainer\HookContainer->run(string, array, array)

#4 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/OutputPage.php(2869): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay(OutputPage, MediaWiki\Skins\Vector\SkinVectorLegacy)

#5 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/exception/MWExceptionRenderer.php(183): OutputPage->output()

#6 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/exception/MWExceptionRenderer.php(102): MWExceptionRenderer::reportHTML(ConfigException)

#7 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/exception/MWExceptionHandler.php(131): MWExceptionRenderer::output(ConfigException, integer)

#8 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/exception/MWExceptionHandler.php(248): MWExceptionHandler::report(ConfigException)

#9 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/includes/MediaWiki.php(581): MWExceptionHandler::handleException(ConfigException, string)

#10 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/index.php(50): MediaWiki->run()

#11 /mnt/web403/b0/31/56960431/htdocs/mediawiki-1.24.1/index.php(46): wfIndexMain()

#12 {main} Brender86 (talk) 19:49, 23 January 2023 (UTC)

Strange that it says 1.24 in your error messages. Are you using the right mediawiki files and updated extensions and skins? Flounder ceo (talk) 19:55, 23 January 2023 (UTC)
1.24.1 is just the path to the wiki. Unfortunately I didn't rename the path then and now I don't want to do it anymore if some users have created favorites in your browser or something like that. It was definitely running 1.30 before. I uploaded the complete MediaWiki and replaced except for localsettings and images. The update installed normally Brender86 (talk) 20:01, 23 January 2023 (UTC)
Ah, it's my settings in the LocalSettings. I deleted all the additions, now it works. Does anyone notice an error right away? Otherwise I'll go through everything one by one
ini_set( 'post_max_size', '10M' );
ini_set( 'upload_max_filesize', '5M' );
require_once "$IP/extensions/Nuke/Nuke.php";
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgConfirmAccountContact = 'brxxxxxl.com';
wfLoadExtension( 'MultiUpload' );
$wgEnableUploads = true; # Enable uploads
wfLoadExtension( 'MultiUpload' );
wfLoadExtension( 'MobileFrontend' );
$wgMFAutodetectMobileView = true;
wfLoadExtension( 'WikiEditor' );
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgHiddenPrefs[] = 'usebetatoolbar';
$wgFileExtensions = array_merge( $wgFileExtensions,
   array( 'doc', 'xls', 'mpp', 'pdf', 'ppt', 'xlsx', 'jpg',
       'tiff', 'odt', 'odg', 'ods', 'odp'
   )
);
$wgMFDefaultSkinClass = 'SkinVector';
$wgLogo = "http://www.opel66-72.de/mediawiki-1.24.1/Unbenannt1.png";
$wgShowExceptionDetails = true; Brender86 (talk) 20:48, 23 January 2023 (UTC)
Nuke and ConfirmAccount now use wfLoadExtension instead of require_once. Flounder ceo (talk) 20:58, 23 January 2023 (UTC)
Ah, thanks a Lot! I will try it... Brender86 (talk) 21:11, 23 January 2023 (UTC)
The error sounds like you are using the wrong version of MobileFrontend for your version of MediaWiki. Bawolff (talk) 23:56, 23 January 2023 (UTC)
isn't that also updated with the update? Brender86 (talk) 04:57, 24 January 2023 (UTC)
It can depend on what method you used to update mediawiki, but probably not. Bawolff (talk) 18:55, 24 January 2023 (UTC)
Try commenting out $wgMFDefaultSkinClass = 'SkinVector';. There was a problem between Vector and MobileFrontend in 1.35 (phab:T262233). Many people just let MobileFrontend default to MinervaNeue. Flounder ceo (talk) 14:42, 24 January 2023 (UTC)

RevisionAccessException after host migration

I have a mediawiki 1.35 with a lot of content (10 years' worth) that I really don't want to lose. For various reasons*, I have no choice but to migrate it to a new host. I did the bare minimum (copied files using tar, export db as sql and import) and was immediately hit with error "Fatal exception of type "MediaWiki\Revision\RevisionAccessException"
Faffed about with things**, then deleted it all and created a new folder with the latest MediaWiki (1.39), and my original database (re-imported from the old one). Ran the update.php script. No errors reported. All *seems* fine but still get the same error above.
I researched and ran findBadBlobs.php, which was ok until...
! Found bad blob on revision 22368 from 20130524223136 (main slot): content_id=18275, address=<tt:22047>, error='Unable to fetch blob at tt:22047. Use findBadBlobs.php to remedy.', type='MediaWiki\Storage\BlobAccessException'. ID:        22368
After which, it's bad blobs all the way down.
I have no idea what to do about this, or what to do next. Can anyone help?
*Hosting provider is going out of business
**Faffed about = normy speak for doing all the regular troubleshooting steps we go through. Too much to list here, and irrelevant to this issue. Gobberwart (talk) 05:21, 24 January 2023 (UTC)
UPDATE: The issue has been resolved. I started again from scratch (no upgrade, just straight restore from tar/sql files) and discovered that the backup SQL was missing several thousand rows from the text table. It looks like mysqldump timed out/lost connection silently and didn't actually dump the entire table.
I restored the database from the server backup, and exported JUST the text table using a different method, imported that to the new database, and all is now well.
I don't actually NEED to upgrade, but I probably will at some stage once I know there are no further errors.
Thanks to @Bawolff for pointing me in the right direction. Gobberwart (talk) 23:07, 24 January 2023 (UTC)
Perhaps first updating to 1.37 and then to 1.39?
Manual:Upgrading - MediaWiki Ufnbg (talk) 09:30, 24 January 2023 (UTC)
So personally i would suggest doing the upgrade and the move separately to minimize the things that can go wrong (i.e. move to the new host using the same version, make sure it all works then do the upgrade).
I think the first thing i would check is that the sql dump/import worked correctly.
Does the text table have a row where old_id=22047? Does it look the same on both your original wiki and your new one after importing? Bawolff (talk) 12:41, 24 January 2023 (UTC)
I did originally try to perform a simple migration without upgrade, and it failed with the same error.
I decided to try the upgrade just in case it would fix things, but it did not. I can easily roll back (and in fact I will do that in a few minutes).
I just checked the text table and the new one does not have a row 22047. In fact, the maximum row id is 21806.
Maximum id in the old database is 25221.
Rows 21806 match in both databases.
This suggests to me that the sql import (or export) failed, although I didn't see any errors. Any thoughts? Gobberwart (talk) 20:40, 24 January 2023 (UTC)
Good hint! text table didn't fully export from the original using mysqldump. Not sure why, but I exported just that table manually and got the full content. Restored successfully. All good now. Thanks! Gobberwart (talk) 23:08, 24 January 2023 (UTC)

Math input error with €

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Math seems not to work with €:


<math>5990\ € - 5000\ € = 990\ €</math><br>


comes with a yellow coloured and red written "Math input error".

Any ideas?


MW: 1.39, PHP 8.0.27

SimpleMathJax 0.8.2 Ufnbg (talk) 09:16, 24 January 2023 (UTC)

Replacing "€" with "\textup{€}" solves the rendering problem Ufnbg (talk) 11:09, 25 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

update 1.39.1 from 1.35.1

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hallo All,

actually i have updated my wiki version 1.39.1 from 1.35.1.

after update wiki version extension "Lockdown" is not working properly..


Please any ideas..


Thank you Satyaps2251 (talk) 11:11, 24 January 2023 (UTC)

Hi, please provide sufficient information what "not working properly" means. Malyacko (talk) 11:24, 24 January 2023 (UTC)
Hi ,
Thak you for your reply..
MediaWiki internal error.
Original exception: [ca45d13184cbf10c64769f11] /index.php?title=shiftmanager:Leitung_des_Operation Error: Call to undefined method User::getEffectiveGroups()
Backtrace:
from /srv/www/mediawiki-1.39.1/extensions/Lockdown/src/Hooks.php(120)
#0 /srv/www/mediawiki-1.39.1/includes/HookContainer/HookContainer.php(338): MediaWiki\Extensions\Lockdown\Hooks::onGetUserPermissionsErrors()
#1 /srv/www/mediawiki-1.39.1/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#2 /srv/www/mediawiki-1.39.1/includes/HookContainer/HookRunner.php(1965): MediaWiki\HookContainer\HookContainer->run()
#3 /srv/www/mediawiki-1.39.1/includes/Permissions/PermissionManager.php(583): MediaWiki\HookContainer\HookRunner->onGetUserPermissionsErrors()
#4 /srv/www/mediawiki-1.39.1/includes/Permissions/PermissionManager.php(538): MediaWiki\Permissions\PermissionManager->checkPermissionHooks()
#5 /srv/www/mediawiki-1.39.1/includes/Permissions/PermissionManager.php(345): MediaWiki\Permissions\PermissionManager->getPermissionErrorsInternal()
#6 /srv/www/mediawiki-1.39.1/includes/Permissions/UserAuthority.php(259): MediaWiki\Permissions\PermissionManager->getPermissionErrors()
#7 /srv/www/mediawiki-1.39.1/includes/Permissions/UserAuthority.php(205): MediaWiki\Permissions\UserAuthority->internalCan()
#8 /srv/www/mediawiki-1.39.1/includes/user/User.php(3494): MediaWiki\Permissions\UserAuthority->authorizeRead()
#9 /srv/www/mediawiki-1.39.1/includes/MediaWiki.php(227): User->authorizeRead()
#10 /srv/www/mediawiki-1.39.1/includes/MediaWiki.php(904): MediaWiki->performRequest()
#11 /srv/www/mediawiki-1.39.1/includes/MediaWiki.php(562): MediaWiki->main()
#12 /srv/www/mediawiki-1.39.1/index.php(50): MediaWiki->run()
#13 /srv/www/mediawiki-1.39.1/index.php(46): wfIndexMain()
#14 {main}
Exception caught inside exception handler: [ca45d13184cbf10c64769f11] /index.php?title=shiftmanager:Leitung_des_Operation Error: Call to undefined method User::getEffectiveGroups()
Backtrace:
from /srv/www/mediawiki-1.39.1/extensions/Lockdown/src/Hooks.php(120)
#0 /srv/www/mediawiki-1.39.1/includes/HookContainer/HookContainer.php(338): MediaWiki\Extensions\Lockdown\Hooks::onGetUserPermissionsErrors()
#1 /srv/www/mediawiki-1.39.1/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#2 /srv/www/mediawiki-1.39.1/includes/HookContainer/HookRunner.php(1965): MediaWiki\HookContainer\HookContainer->run()
#3 /srv/www/mediawiki-1.39.1/includes/Permissions/PermissionManager.php(583): MediaWiki\HookContainer\HookRunner->onGetUserPermissionsErrors()
#4 /srv/www/mediawiki-1.39.1/includes/Permissions/PermissionManager.php(538): MediaWiki\Permissions\PermissionManager->checkPermissionHooks()
#5 /srv/www/mediawiki-1.39.1/includes/Permissions/PermissionManager.php(299): MediaWiki\Permissions\PermissionManager->getPermissionErrorsInternal()
#6 /srv/www/mediawiki-1.39.1/includes/Permissions/UserAuthority.php(286): MediaWiki\Permissions\PermissionManager->userCan()
#7 /srv/www/mediawiki-1.39.1/includes/Permissions/UserAuthority.php(153): MediaWiki\Permissions\UserAuthority->internalCan()
#8 /srv/www/mediawiki-1.39.1/includes/user/User.php(3471): MediaWiki\Permissions\UserAuthority->probablyCan()
#9 /srv/www/mediawiki-1.39.1/includes/skins/SkinTemplate.php(1274): User->probablyCan()
#10 /srv/www/mediawiki-1.39.1/includes/skins/SkinTemplate.php(790): SkinTemplate->buildContentNavigationUrlsInternal()
#11 /srv/www/mediawiki-1.39.1/includes/skins/SkinTemplate.php(229): SkinTemplate->getPortletsTemplateData()
#12 /srv/www/mediawiki-1.39.1/includes/skins/SkinMustache.php(88): SkinTemplate->getTemplateData()
#13 /srv/www/mediawiki-1.39.1/skins/Vector/includes/SkinVector.php(450): SkinMustache->getTemplateData()
#14 /srv/www/mediawiki-1.39.1/includes/skins/SkinMustache.php(58): MediaWiki\Skins\Vector\SkinVector->getTemplateData()
#15 /srv/www/mediawiki-1.39.1/includes/skins/SkinTemplate.php(177): SkinMustache->generateHTML()
#16 /srv/www/mediawiki-1.39.1/includes/OutputPage.php(2874): SkinTemplate->outputPage()
#17 /srv/www/mediawiki-1.39.1/includes/exception/MWExceptionRenderer.php(183): OutputPage->output()
#18 /srv/www/mediawiki-1.39.1/includes/exception/MWExceptionRenderer.php(102): MWExceptionRenderer::reportHTML()
#19 /srv/www/mediawiki-1.39.1/includes/exception/MWExceptionHandler.php(131): MWExceptionRenderer::output()
#20 /srv/www/mediawiki-1.39.1/includes/exception/MWExceptionHandler.php(248): MWExceptionHandler::report()
#21 /srv/www/mediawiki-1.39.1/includes/MediaWiki.php(584): MWExceptionHandler::handleException()
#22 /srv/www/mediawiki-1.39.1/index.php(50): MediaWiki->run()
#23 /srv/www/mediawiki-1.39.1/index.php(46): wfIndexMain()
#24 {main} Satyaps2251 (talk) 12:21, 24 January 2023 (UTC)
Did you upgrade Lockdown to the new version? Bawolff (talk) 12:35, 24 January 2023 (UTC)
Hi,
Promblem Solved...
Thank you Satyaps2251 (talk) 13:05, 24 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Preferences tabs not working; stuck with only User tab

I just installed MediaWiki on my web server and found out that when going to Preferences, the tabs were not working and stuck with only the User tab.

I've tried EVERYTHING I CAN.

I've switched the skins to MonoBook and Timeless through LocalSettings.php by changing the $wgDefaultSkin, I've tried using different browsers: IE, Edge, Chrome, Firefox but it doesn't work even if JavaScript is enabled.

I've uninstalled WikiEditor (which in other posts said it's a permissions error) but it still does doesn't work.

Please, please help me. FarmerCars789 (talk) 13:42, 24 January 2023 (UTC)

When you go to the browser debug console are there any error messages? Bawolff (talk) 16:16, 24 January 2023 (UTC)
Yes, there's an error saying that a script couldn't be loaded. Just found out about this now. FarmerCars789 (talk) 18:42, 24 January 2023 (UTC)

Mediawiki 1.35, LDAP - Active Directory no group memberships

I've set it up (I think) all correctly, AD user accounts can log into the wiki but cannot edit, create new pages etc.


my ldap.json file looks like this:

{

       "mydomain": {

               "connection": {

                       "server": "dc.domain.ca",

                       "port": "389",

                       "user": "bindhq",

                       "pass": "XXXXXXXXXXXX",

                       "enctype": "clear",

                       "options": {

                               "LDAP_OPT_DEREF": 1

                       },

                       "basedn": "dc=mydomain,dc=ca",

                       "userbasedn": "OU=Ottawa,DC=mydomain,DC=ca",

                       "groupbasedn": "OU=Builtin,dc=mydomain,dc=ca",

                       "searchattribute": "samaccountname",

                       "usernameattribute": "samaccountname",

                       "realnameattribute": "cn",

                       "emailattribute": "mail",

                       "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",

                       "presearchusernamemodifiers": [ "spacestounderscores", "lowercase" ]

               },

               "userinfo": {

                       "attributes-map": {

                               "email": "mail",

                               "realname": "displayname",

                               "nickname": "cn",

                               "language": "preferredlanguage"

                       }

       },

               "authorization": [],

               "groupsync": {

                       "mapping": {

                                "engineering": "CN=EngineeringCoreTeam,OU=Builtin,dc=mydomain,dc=ca",

                                "bureaucrat": "CN=wikibureaucrats,OU=Builtin,dc=mydomain,dc=ca",

                                "interface-admin": "CN=wikibureaucrats,OU=Builtin,dc=mydomain,dc=ca",

                                "sysop": "CN=wikiadmins,OU=Builtin,dc=mydomain,dc=ca"

                       

               }

       }

}

}


++++++++++++++++++++++++++++++++++++++

LDAP configuration portion of LocalSettings.php +

++++++++++++++++++++++++++++++++++++++


// Safe IP or not (for bypassing external login via AD)

$safeIPs = array('127.0.0.1','localhost');

$ipsVars = array('HTTP_X_FORWARDED_FOR','HTTP_X_REAL_IP','REMOTE_ADDR');

foreach ($ipsVars as $ipsVar) {

if (isset($_SERVER[$ipsVar]) && mb_strlen($_SERVER[$ipsVar]) > 3 ) { $wikiRequestIP = $_SERVER[$ipsVar]; break; }

}

$wikiRequestSafe = (isset($wikiRequestIP) && ( in_array($wikiRequestIP,$safeIPs) ));


// Create Wiki-Group 'engineering' from default user group

$wgGroupPermissions['engineering'] = $wgGroupPermissions['user'];


// Private Wiki. External LDAP login. Default NS requires login.

$wgEmailConfirmToEdit = false;

$wgGroupPermissions['Users']['edit'] = false;

$wgGroupPermissions['*']['read'] = false;

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['sysop']['createaccount'] = true;

$wgGroupPermissions['bureaucrat']['edit'] = true;

$wgGroupPermissions['Autoconfirmed users']['edit'] = true;

$wgGroupPermissions['*']['autocreateaccount'] = true;

$wgBlockDisablesLogin = true;


// Load LDAP Config from JSON

$ldapJsonFile = "$IP/ldap.json";

$ldapConfig = false;

if (is_file($ldapJsonFile) && is_dir("$IP/extensions/LDAPProvider")) {

 $testJson = @json_decode(file_get_contents($ldapJsonFile),true);

 if (is_array($testJson)) {

   $ldapConfig = true;

 } else {

   error_log("Found invalid JSON in file: $IP/ldap.json");

 }

}


// Activate Extension

if ( $ldapConfig ) {


 wfLoadExtension( 'PluggableAuth' );

 wfLoadExtension( 'LDAPProvider' );

 wfLoadExtension( 'LDAPAuthentication2' );

 wfLoadExtension( 'LDAPAuthorization' );

 wfLoadExtension( 'LDAPUserInfo' );

 wfLoadExtension( 'LDAPGroups' );


 $LDAPProviderDomainConfigs = $ldapJsonFile;

 $wgPluggableAuth_ButtonLabel = "Log In";


 if ($wikiRequestSafe) { $LDAPAuthentication2AllowLocalLogin = true; }

}


$wgLDAPDebug = 1;

$wgDebugLogGroups['ldap'] = '/var/log/wiki/log/debug.log';

$wgShowExceptionDetails = true;


I've been working on this for a couple days now and I've hit a wall. at first I couldn't get it to work with LDAPGroups so I kept it commented out, otherwise the page would just fail with internal error 500. Finally I found that I had to downgrade the extension to v.1.35 and now the page works again with LDAPGroups enabled. the Version page also shows all the extensions enabled, yet I log in with my domain account (logging in works) but nothing else. Please help! What am I missing?


thanks in advance

Jerome Jeromesantos66 (talk) 19:52, 24 January 2023 (UTC)

Hide Minerva Page Actions Menu And Tab Container

Hi, I just installed Minerva. While logged out, how do I hide the areas that display Page & Discussion (Tab Container) and Language Watch History Edit More (Page Actions Menu)?


Thanks for your help. Newuser2023 (talk) 02:08, 25 January 2023 (UTC)

Manual:FAQ#How do I remove the article/edit etc tabs? Malyacko (talk) 10:28, 25 January 2023 (UTC)
Thanks for the link. I followed the instructions and nothing changed. I did hard refresh and tried with different browser to make sure it wasn't the cached version. Any other ideas? Newuser2023 (talk) 04:52, 26 January 2023 (UTC)

I need to hide my unlogged edit... Oversight request.

Just one edit. Viu54071 (talk) 14:16, 25 January 2023 (UTC)

See meta:Oversight policy/Requests for oversight Bawolff (talk) 14:29, 25 January 2023 (UTC)
I don't see mediawiki.org here... Viu54071 (talk) 14:55, 25 January 2023 (UTC)
I've revison deleted it as that is as much as i can do as someone who is only an admin. There are no local oversighters on mediawiki.org, so you have to ask a steward to actually oversight. Follow the instructions for "all wikimedia wikis" on that page. Bawolff (talk) 15:45, 25 January 2023 (UTC)

Too many requests?

When I try to open a lot of pages at once on my Wiki the first several in the list of links open fine, but later ones have this error:

Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)


The problem cannot be the database as such, because several pages open fine.

Is this something to do with the database receiving too many requests at once. This only started happening to me once I move my wiki and upgraded to 1.39


I open a lot of links using Snap Links in Firefox (great when you wish to edit a lot of pages one after another.


help! 131.111.241.110 (talk) 16:47, 25 January 2023 (UTC)

Your database might be configured to only accept a max number of connections at once.
If using mysql look through your mysqld.cnf file.
Alternatively you could reduce the number of webserver threads (in apache or whatever web server you are using) which would make things wait in line when a lot of requests come in. Bawolff (talk) 17:18, 25 January 2023 (UTC)

DataDump - no way to back up images?

Hi,

I've been using DataDump to generate an xml file to back up a wiki. However, there doesn't seem to be an option to back up images. Is this an error? If not, how do you go about backing up the images in a mediawiki? Mohlri (talk) 03:47, 26 January 2023 (UTC)

Generally, it's a matter of just copying the images/ directory in whatever way you do backups. There is more detail at Manual:Backing_up_a_wiki#Uploaded_files. Sam Wilson 06:15, 26 January 2023 (UTC)
I agree, though if you really want to use XML you could try something like:
php dumpBackup.php --full --uploads --include-files > ~/filename.xml
See Manual:DumpBackup.php. Jonathan3 (talk) 09:32, 26 January 2023 (UTC)

Configuration of new wiki: Editing field, font size

Hello everyone,

wishing to establish an own public wiki, I have rented webspace and installed Mediawiki. With the help of manuals on mediawiki.org, I succeeded to make basic settings such as name, default language, skin, logo and icon of the wiki. However, there are some challenges and questions which I either cannot find on mediawiki.org or I do not understand the explanation. Furthermore, my programming and webdesign proficiency is very limited. These are the most pressing issues:

  • In other wikis, including but not limited to wikipedia, articles appear as topleveldomain.org/wiki/articlename. In my wiki however, when I create a new article, it appears as topleveldomain.org/index.php?title=articlename. There is obviously an error. What is the reason and how can I change that?
  • The font size of normal text in articles in my wiki is quite small. Can I set a default font size? Or is it determined by the selected skin (Monobook in my case)?
  • When creating or editing an article in wikipedia or other wikis, there is a field similar to the one I am now typing this post in. Below that field, there are buttons for inserting common wiki markup characters such as [[]], {{}}, and |. This aids users to edit the text. In my wiki, it does not appear below an article editing field. How can I make my wiki show these buttons by default?

I would be grateful if you give me helpful hints. Thank you very much in advance! Beliam (talk) 10:44, 26 January 2023 (UTC)

For the first point, see manual:Short URL
Font size is controlled by skin but you can override with CSS
For the last point, i think you are referring to extension:charinsert. See also extension:WikiEditor Bawolff (talk) 14:49, 26 January 2023 (UTC)
Good morning everyone,
Many thanks to Bawolff for your helpful reply. I could solve all issues, except the last one. Besides that, I have further queries:
  • Having entered a <charinsert> tag into MediaWiki:Edittools of my wiki, it appears below all editing fields as wished. But the characters are not clickable; they are rather exactly shown as within the tag. In combinations such as [[+]], the + character remains unchanged. What is the reason? You could visit my wiki knowledgereference.org for better understanding.
  • In the Sidebar appearing at the left side of each page, how can I add single links for creating a pdf version and a printable version of the displayed page (like in some Wikipedia versions, such as Italian and German)? I didn't find a hint atManual:Interface/Sidebar. * TOOLBOX does create a link for printable version, but along with many other links which I wish to omit. Thus, I would just like to add the two links (pdf, print) individually into an existing box of customised links at the Sidebar.
  • Does Mediawiki have a manual for customising the bar at the bottom of each page? I mean the bar showing Privacy Policy, About, Disclaimer etc. by default.
  • Is there a standard function for administrators or everyone to make backup copies of the wiki's entire contents? I know that Wikipedia offers a function to download its text contents, but this may be a specifically added function.
Thank you in advance for your help! Beliam (talk) 09:10, 5 July 2023 (UTC)

Gaining access to an account with an inactive email address

Hi all,

I created an account 12 years ago and it is still up, but I no longer have access to the email that it was created with. I don't remember the password and would need the email to reset it. Ideally I wouldn't have to create another account, but I'm not sure if there's anything I can do to gain access to the existing one. Any advice?


Thanks

-Maggie 151.200.23.143 (talk) 13:58, 26 January 2023 (UTC)

Only if you can prove beyond a shadow of a doubt that it really is your account. Bawolff (talk) 21:08, 26 January 2023 (UTC)

Create Account redirect to Special:UserLogin

I am working on a project in which I manually installed mediawiki 1.39.1 on an Ubuntu 20 server. When users click on 'Create Account' I would like to have the Username, Password, YOUR DOMAIN' Confirm password, as the only option.


I have disabled Email field so the only thing I need to add is the YOUR DOMAIN.

Not sure if its something I need to add in the LocalSetting.php file or have a hook to where the user clicks on "Create Account" and have the page relocate to Special:UserLogin that shows the fields mentioned above.


Any feedback would be greatly appreciated. TYIA. Ggonz1 (talk) 19:10, 26 January 2023 (UTC)

I imagine you intend to do something with this field after they create an account?
Anyways AuthManager is the relavent docs although they are a bit dense. Bawolff (talk) 21:07, 26 January 2023 (UTC)
It really is a whole lot of dense lol.
Anything you can provide within the LocalSetting.php file just to create a field with the domain listed on it? A possible work around? Ggonz1 (talk) 17:52, 27 January 2023 (UTC)
There are extensions like extension:LegalLogin which might be helpful as an example to base something on. Bawolff (talk) 20:35, 27 January 2023 (UTC)

mw-config/index.php session data lost (session.save_path_

Hello MediaWiki,

I followed the direction on Manual:Installing MediaWiki on Windows Server 2019 https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki_on_Windows_Server_2019) and have gotten to the very end where I open http://[server]/mediawiki/mw-config/index.php and click next on the language, but get the error: "Your session data was lost! Check your php.ini and make sure session.save_path is set to an appropriate directory." I see that every time it click "continue->" it creates a file in C:\Windows\Temp. I did check phpinfo() and it says "no value" next to session.save_path. I edited the php.ini and tried several different paths. They give a different error and does not even load he index.php webpage (even when using a dir that has IUSR read/write access): "Error starting session: session_start(): open(/tmp\sess_thl0flhn6p0cf4b51d8mj7o492, O_RDWR) failed: No such file or directory (2)." that tmp obviously does not exist so it cannot write the "sess_*" files. I can put C:\Windows\Temp but it gives the same session.save_path error, even though there is a path now. I've googled a ton, created a new database with user and password. (I know the root password). Just can't get past the language selection step to finish the setup.

mysql 8.0.32

php 8.2.1

medawiki 1.39.1

Server 2019

(all 64bit)

Any help would be appreciated! Thanks Alchle (talk) 22:39, 26 January 2023 (UTC)

Check to make sure you are editing the correct php.ini file. PHP often installs multiple for different situations. Bawolff (talk) 00:39, 27 January 2023 (UTC)
Found the issue. Does not work with the Internet Explorer browser that came with Server 2019. Used Chrome browser and no issue getting past the language selection screen. Alchle (talk) 14:28, 27 January 2023 (UTC)
This should be entirely server side so web browser shouldnt matter Bawolff (talk) 20:34, 27 January 2023 (UTC)

MW page update fails

When editing a page from "edit source":

https://domain.com/w/index.php?title=WOWS_Legends&action=edit

Browser URL icon shows "lock" for "connection is secure" with valid SSL Cert

When submitting the page edits:

https://domain.com/w/index.php?title=WOWS_Legends&action=submit

Browser show generic error "Hmmm… can't reach this page.  It looks like domain.com closed the connection"

Browser URL icon shows "Warning triangle" for "your connection to this site isn't secure. The site does not have a cert".

  • Occurs on all browser types:  Chrome, Edge, Safari, Opera, Firefox.
  • Occurs from different systems on different networks:  Mac, iPhone, Windows desktop VDI on AWS
  • Occurs intermittently:  First page edit is successful, following edits fail consecutively for hours, then one edit will be successful.
  • Clearing browser cache has no effect.
  • Browser inspect shows the api.php failing after making the first character change in edit mode before the submit.
  • This only occurs on several MW pages, all other pages update with no problem.
  • https is forced from DNS at the server hosting provider.
  • Adding $wgForceHTTPS = true; in MW has no impact.

MW: 1.39.1

PHP: 8.1

MySQL: 5.7.40-cll-lve Community Server


Is there a MW internal redirect that may not be using https?

Is there a cookie setting that would cause this behavior? Pajenson (talk) 02:17, 27 January 2023 (UTC)

An error of "X closed the connection" seems a webserver problem or PHP problem. You should look at webserver logs (apache/nginx/whatever you use, php logs, and even syslog/journalctl) to get more information about the error and possible causes. Ciencia Al Poder (talk) 09:59, 27 January 2023 (UTC)
Server logs are clean. Although this update failure occurs when updating from different networks, if I update from one network and it fails, the site is available from another network. I have ruled out any source IP blocking issues, WAF policy (no WAF at all) etc. Pajenson (talk) 15:59, 27 January 2023 (UTC)
How is different networks relevant? I mean, if it fails on your current connection, does opening a new tab (same network) and browse the site work, or is the site also unavailable for reading pages on the same network? Ciencia Al Poder (talk) 11:49, 28 January 2023 (UTC)
When it fails, the site fails from all browsers/devices from my network for 60 sec. The site is available from a different network (ie iphone over cellular connection) which validates the server/app is available and serving content. If I edit from the iphone, the site becomes unavailable to the phone, but is available from my network. Pajenson (talk) 20:50, 29 January 2023 (UTC)
Even if you say you have ruled out any source IP blocking issues, WAF policy, etc., it looks like a WAF blocking your IP for a small amount of time. Ciencia Al Poder (talk) 22:13, 29 January 2023 (UTC)
It definitely sounds like a network problem, and some sort of middlebox sounds plausible. I wouldn't neccesarily assume that it is a WAF. Could be some other type of firewall.
anyways, my next suggested debugging step would probably be to use wireshark on both ends of the connection to figure out what is going on at a packet level. However this is kind of getting beyond the scope of mediawiki help.
i would also check if maybe its a time issue (edits generally take longer than views. Maybe the trigger is how long the connection is open)
> Browser URL icon shows "Warning triangle" for "your connection to this site isn't secure. The site does not have a cert".
Probably just means the error page doesn't have a cert because its not part of your website but just an error page. Bawolff (talk) 19:39, 2 February 2023 (UTC)

how do I delete my editor account

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Dear Support, I'd either like to change my username or delete my editing account and create another with my new desired user name. Thanks, Terry. Thenewurbanshaman (talk) 13:50, 27 January 2023 (UTC)

Please follow instructions at meta:Changing username Ciencia Al Poder (talk) 14:07, 27 January 2023 (UTC)
Dear Ciencia AI Poder, I'll follow the link, thank you very much. Kind regards, Terry ;-) Thenewurbanshaman (talk) 13:58, 4 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Which file should I use when running the installation?

I have MediaWiki already. I was wondering which file should I use when running the installation. Can someone tell me? Thanks! 2600:1700:6180:6290:195F:E3A1:C35A:605C (talk) 00:25, 28 January 2023 (UTC)

Use to do what? Bawolff (talk) 00:31, 28 January 2023 (UTC)
Running the installer 2600:1700:6180:6290:195F:E3A1:C35A:605C (talk) 20:55, 28 January 2023 (UTC)
From a web interface, you should browse to /mw-config/index.php the main directory will also direct you there. Bawolff (talk) 21:05, 28 January 2023 (UTC)
There is documentation: Manual:Config_script Malyacko (talk) 09:08, 1 February 2023 (UTC)

MediaWiki internal error.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi, I'm getting an error in the wiki, I need help to fix it.


MediaWiki internal error.

Original exception: [b48ab4ed7f9db151f5254945] 2023-01-28 06:38:54: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

Exception caught inside exception handler.

Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information. Lomeno 24 (Contact me here) 06:43, 28 January 2023 (UTC)

The last sentence tells you what you should do first. Have you tried that? – Ammarpad (talk) 07:24, 28 January 2023 (UTC)
No, I haven't tried, but I'm going to try. Lomeno 24 (Contact me here) 07:34, 28 January 2023 (UTC)
I get this error message
MediaWiki internal error.
Original exception: [7c6baa7b213db3ca727ccb0b] /mediawiki/index.php?search=Las%20Actuales%20Channel&title=Especial%3ABuscar&fulltext=1 Wikimedia\Rdbms\DBQueryError from line 1713 of C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Error 1146: Table 'mediawiki.wikiecho_notification' doesn't exist (localhost)
Function: EchoUserNotificationGateway::getCappedNotificationCount
Query: SELECT COUNT(*) AS `rowcount` FROM (SELECT 1 FROM `wikiecho_notification` LEFT JOIN `wikiecho_event` ON ((notification_event=event_id)) WHERE notification_user = 1 AND notification_read_timestamp IS NULL AND event_deleted = 0 AND event_type IN ('edit-user-talk','reverted','minor-watchlist-change','watchlist-change','mention','mention-summary','mention-failure','mention-failure-too-many','mention-success','user-rights','emailuser','foreign') LIMIT 100 ) `tmp_count`
Backtrace:
  1. 0 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(1697): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
  2. 1 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(1672): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
  3. 2 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(1241): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  4. 3 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(1921): Wikimedia\Rdbms\Database->query(string, string, integer)
  5. 4 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(2063): Wikimedia\Rdbms\Database->select(array, array, array, string)
  6. 5 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\gateway\UserNotificationGateway.php(168): Wikimedia\Rdbms\Database->selectRowCount(array, string, array, string, array, array)
  7. 6 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(571): EchoUserNotificationGateway->getCappedNotificationCount(integer, array, integer)
  8. 7 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(526): MWEchoNotifUser->computeLocalCountsAndTimestamps()
  9. 8 C:\xampp\htdocs\mediawiki\includes\libs\objectcache\wancache\WANObjectCache.php(1528): MWEchoNotifUser->{closure}(boolean, integer, array, NULL, array)
  10. 9 C:\xampp\htdocs\mediawiki\includes\libs\objectcache\wancache\WANObjectCache.php(1376): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)
  11. 10 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(520): WANObjectCache->getWithSetCallback(string, integer, Closure)
  12. 11 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(187): MWEchoNotifUser->getCountsAndTimestamps(boolean)
  13. 12 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(138): MWEchoNotifUser->getNotificationCount(string)
  14. 13 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\EchoHooks.php(1057): MWEchoNotifUser->getMessageCount()
  15. 14 C:\xampp\htdocs\mediawiki\includes\HookContainer\HookContainer.php(329): EchoHooks::onPersonalUrls(array, Title, SkinVector)
  16. 15 C:\xampp\htdocs\mediawiki\includes\HookContainer\HookContainer.php(132): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
  17. 16 C:\xampp\htdocs\mediawiki\includes\HookContainer\HookRunner.php(3081): MediaWiki\HookContainer\HookContainer->run(string, array, array)
  18. 17 C:\xampp\htdocs\mediawiki\includes\skins\SkinTemplate.php(656): MediaWiki\HookContainer\HookRunner->onPersonalUrls(array, Title, SkinVector)
  19. 18 C:\xampp\htdocs\mediawiki\includes\skins\SkinTemplate.php(392): SkinTemplate->buildPersonalUrls()
  20. 19 C:\xampp\htdocs\mediawiki\includes\skins\SkinTemplate.php(127): SkinTemplate->prepareQuickTemplate()
  21. 20 C:\xampp\htdocs\mediawiki\includes\skins\SkinTemplate.php(144): SkinTemplate->generateHTML()
  22. 21 C:\xampp\htdocs\mediawiki\includes\OutputPage.php(2622): SkinTemplate->outputPage()
  23. 22 C:\xampp\htdocs\mediawiki\includes\MediaWiki.php(954): OutputPage->output(boolean)
  24. 23 C:\xampp\htdocs\mediawiki\includes\MediaWiki.php(967): MediaWiki->{closure}()
  25. 24 C:\xampp\htdocs\mediawiki\includes\MediaWiki.php(547): MediaWiki->main()
  26. 25 C:\xampp\htdocs\mediawiki\index.php(53): MediaWiki->run()
  27. 26 C:\xampp\htdocs\mediawiki\index.php(46): wfIndexMain()
  28. 27 {main}
Exception caught inside exception handler: [7c6baa7b213db3ca727ccb0b] /mediawiki/index.php?search=Las%20Actuales%20Channel&title=Especial%3ABuscar&fulltext=1 Wikimedia\Rdbms\DBQueryError from line 1713 of C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Error 1146: Table 'mediawiki.wikiecho_notification' doesn't exist (localhost)
Function: EchoUserNotificationGateway::getCappedNotificationCount
Query: SELECT COUNT(*) AS `rowcount` FROM (SELECT 1 FROM `wikiecho_notification` LEFT JOIN `wikiecho_event` ON ((notification_event=event_id)) WHERE notification_user = 1 AND notification_read_timestamp IS NULL AND event_deleted = 0 AND event_type IN ('edit-user-talk','reverted','minor-watchlist-change','watchlist-change','mention','mention-summary','mention-failure','mention-failure-too-many','mention-success','user-rights','emailuser','foreign') LIMIT 100 ) `tmp_count`
Backtrace:
  1. 0 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(1697): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
  2. 1 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(1672): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
  3. 2 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(1241): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  4. 3 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(1921): Wikimedia\Rdbms\Database->query(string, string, integer)
  5. 4 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\database\Database.php(2063): Wikimedia\Rdbms\Database->select(array, array, array, string)
  6. 5 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\gateway\UserNotificationGateway.php(168): Wikimedia\Rdbms\Database->selectRowCount(array, string, array, string, array, array)
  7. 6 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(571): EchoUserNotificationGateway->getCappedNotificationCount(integer, array, integer)
  8. 7 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(526): MWEchoNotifUser->computeLocalCountsAndTimestamps()
  9. 8 C:\xampp\htdocs\mediawiki\includes\libs\objectcache\wancache\WANObjectCache.php(1528): MWEchoNotifUser->{closure}(boolean, integer, array, NULL, array)
  10. 9 C:\xampp\htdocs\mediawiki\includes\libs\objectcache\wancache\WANObjectCache.php(1376): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)
  11. 10 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(520): WANObjectCache->getWithSetCallback(string, integer, Closure)
  12. 11 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(187): MWEchoNotifUser->getCountsAndTimestamps(boolean)
  13. 12 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\NotifUser.php(138): MWEchoNotifUser->getNotificationCount(string)
  14. 13 C:\xampp\htdocs\mediawiki\extensions\Echo\includes\EchoHooks.php(1057): MWEchoNotifUser->getMessageCount()
  15. 14 C:\xampp\htdocs\mediawiki\includes\HookContainer\HookContainer.php(329): EchoHooks::onPersonalUrls(array, Title, SkinVector)
  16. 15 C:\xampp\htdocs\mediawiki\includes\HookContainer\HookContainer.php(132): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
  17. 16 C:\xampp\htdocs\mediawiki\includes\HookContainer\HookRunner.php(3081): MediaWiki\HookContainer\HookContainer->run(string, array, array)
  18. 17 C:\xampp\htdocs\mediawiki\includes\skins\SkinTemplate.php(656): MediaWiki\HookContainer\HookRunner->onPersonalUrls(array, Title, SkinVector)
  19. 18 C:\xampp\htdocs\mediawiki\includes\skins\SkinTemplate.php(392): SkinTemplate->buildPersonalUrls()
  20. 19 C:\xampp\htdocs\mediawiki\includes\skins\SkinTemplate.php(127): SkinTemplate->prepareQuickTemplate()
  21. 20 C:\xampp\htdocs\mediawiki\includes\skins\SkinTemplate.php(144): SkinTemplate->generateHTML()
  22. 21 C:\xampp\htdocs\mediawiki\includes\OutputPage.php(2622): SkinTemplate->outputPage()
  23. 22 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionRenderer.php(153): OutputPage->output()
  24. 23 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionRenderer.php(65): MWExceptionRenderer::reportHTML(Wikimedia\Rdbms\DBQueryError)
  25. 24 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionHandler.php(106): MWExceptionRenderer::output(Wikimedia\Rdbms\DBQueryError, integer)
  26. 25 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionHandler.php(185): MWExceptionHandler::report(Wikimedia\Rdbms\DBQueryError)
  27. 26 C:\xampp\htdocs\mediawiki\includes\MediaWiki.php(580): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBQueryError, string)
  28. 27 C:\xampp\htdocs\mediawiki\index.php(53): MediaWiki->run()
  29. 28 C:\xampp\htdocs\mediawiki\index.php(46): wfIndexMain()
  30. 29 {main} Lomeno 24 (Contact me here) 07:38, 28 January 2023 (UTC)
Run update.php Bawolff (talk) 13:49, 28 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can't register an account for the life of me

Here's my code:


token = action("query", {"meta": "tokens", "type": "createaccount"}, {}, domain="test.wikipedia.org") token = token.json()["query"]["tokens"]["createaccounttoken"] response = action("createaccount", {}, {"createtoken": token, "username": "exthuioplusrnmlk", "password": "TestTest1", "retype": "TestTest1", "email": "gbrierre@nawa.lol", "createreturnurl": "https://test.wikipedia.org/"}, domain="test.wikipedia.org")


I have been trying for two days and have run out of ideas. 61.220.170.133 (talk) 11:17, 28 January 2023 (UTC)

@User:Ciencia Al Poder @User:Bawolff @User:Ammarpad PLEASE HELLPPPPPP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 61.220.170.133 (talk) 11:56, 28 January 2023 (UTC)
Pleae dont ping people.
Is your code giving an error message? Did you remember to keep track of and send cookies? Bawolff (talk) 13:48, 28 January 2023 (UTC)
@Bawolff
" Is your code giving an error message?"
no because im using test.Wikipedia.org
“ Did you remember to keep track of and send cookies?”
how do you do that? I never saw that in docs or api 61.220.170.133 (talk) 14:48, 28 January 2023 (UTC)
Test.wikipedia.org will give you an error message if you do something wrong. Check what the response to your api requests are.
> how do you do that [cookies]? I never saw that in docs or api
It is part of whatever http library/programming language you are using. Bawolff (talk) 21:03, 28 January 2023 (UTC)
@Bawolff:
The error I get is that the CSRF token is invalid. I have tried every way of fetching and encoding it, but still get the error. 61.220.170.133 (talk) 21:27, 28 January 2023 (UTC)
That error usually means cookies are not being sent with the request. Bawolff (talk) 21:55, 28 January 2023 (UTC)
@Bawolff:
  1. Where do get the cookies from?
  2. How do I send them with my request? 61.220.170.133 (talk) 21:58, 28 January 2023 (UTC)
You should consult the documentation for whatever programming language you are using. I don't know what language you are using so cannot direct you further. Bawolff (talk) 03:25, 29 January 2023 (UTC)

"Recent changes" on mobile

Is there a way to remove the yellow message "Unfortunately, grouping results by page is not available on mobile. If you would like...."? It looks like an error message and doesn't really add much value. It appears when using phone, MobileFrontend, MinervaNeue. Flounder ceo (talk) 13:19, 28 January 2023 (UTC)

Hmm. That error message seems unfortunate given that enhanced RC is currently the mediawiki default. Bawolff (talk) 14:28, 28 January 2023 (UTC)

Why is onParserFirstCallInit called thrice in a single edit?

I am working on a tag extension and have registered onParserFirstCallInit as hook.

Now I realize that during a single edit cycle this function is called three times. During this edit cycle I am using the source editor, not a visual kind of editor.

The first time it is called when the system fills in the textarea with the wikitext.

Then I make a change and press save.

Then it is called twice. In the stack trace the top level initiator is first wfApiMain and then for the next time it is wfIndexMain.

Since my extension does a rather time consuming task in onParserFirstCallInit I need to understand why the parser call is required THREE time.

Actually I would have expected a SINGLE call (for parsing the new content).

The situation described takes place with $wgParserCacheType = CACHE_DB as well as with $wgParserCacheType = CACHE_NONE. 87.163.201.1 (talk) 16:08, 28 January 2023 (UTC)

onParserFirstCallInit is probably not a great place to do expensive things. What are you doing there that is expensive? There might be a different way you should do it. Parser is also used to render parts of the interface so its not just page content.
Based on your description, it sounds like - first request to render the edit page, second request for api stashedit to do preemptive caching, third for save page. This sounds fairly normal. ParserCache config wont affect this as (probably) none of these events are related to a cached page. Bawolff (talk) 21:01, 28 January 2023 (UTC)
Actually I am just setting a tag hook handler and the tag hook handler is called twice, doing some document processing (Latex & stuff; expensive). I probably need to a a bit of my own caching here. When I tried to understand the process here I was just **VERY MUCH** surprised of the three parser runs. But if the parser is involved in building up the interface it makes perfect sense. THNX. 87.163.204.225 (talk) 12:07, 29 January 2023 (UTC)
It often makes sense to do expensive initialization on the first time the hook is called instead of onParserFirstCallInit, because onParserFirstCallInit will get called regardless of if your hook is actually used.
You might already be aware of this, but if you need to implement caching, check out WANObjectCache service (e.g. \MediaWiki\MediaWikiServices::getInstance()->getMainWANObjectCache() ). Bawolff (talk) 16:37, 29 January 2023 (UTC)

docker: the mediawiki container can't connect to the maria db database which is on my host(server)

I try to connect when installing mediawiki on my database (mariadb) installed on my host.

I tested with the command "sudo docker run --name some-mediawiki -p 8080:80 -d mediawiki --add-host=host.docker.internal:host-gateway" but whatever address I put it doesn't work. I also tested with the address 172.17.0.1.

Can you help me?


my config :

          "Gateway": "172.17.0.1",

           "IPv6Gateway": "",

                   "Gateway": "172.17.0.1",

                   "IPv6Gateway": "",

[lli@vps-356d03eb mediawiki]$ ZoltAzel (talk) 01:19, 29 January 2023 (UTC)

Your problem sounds familiar. You give *way* too less information for a full debugging. I solved a similar issue I had for myself starting with tiny working examples with Dockerfiles and only then moved on to docker compose and then from simpler examples to mysql, php, memchaed etc. In the process I did write some 15 or so Dockerfiles and shell files. Takes a bit of time but worked for me. Yes, learning curve is step there. 87.163.204.225 (talk) 12:12, 29 January 2023 (UTC)
mariadb by default is configured to listen only on loopback address 127.0.0.1. Be sure mysql is listening on all interfaces (listen 0.0.0.0). Also check your host firewall, as it may be blocking connections from external hosts to mariadb port.
Having mariadb server on another docker, for example with docker compose, may be also a good idea. Ciencia Al Poder (talk) 09:33, 1 February 2023 (UTC)

ConfirmEmail on behalf of users

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Is there a way for sysadmins, or an API call, to ConfirmEmail on behalf of a user? Or is there a way to grant users ConfirmEmail rights without granting change name or change email rights? HadleySo (talk) 04:27, 29 January 2023 (UTC)

Yes, you can use resetUserEmail.php script. – Ammarpad (talk) 17:52, 29 January 2023 (UTC)
Ooh thanks for that, don't know how I missed that
Doesn't seem to work fully though, I can set the address but the email is not confirmed. However, if the user is granted 'editmyprivateinfo' rights the email changes to confirmed without user intervention.
Any ideas on why its not being marked as confirmed? HadleySo (talk) 18:49, 29 January 2023 (UTC)
The email is automatically confirmed when set through that script. This confirmation route does not depend on any userright.
But how do you know, the email is not confirmed? – Ammarpad (talk) 21:12, 29 January 2023 (UTC)
The Special:Preferences shows the email as to be confirmed. HadleySo (talk) 21:44, 29 January 2023 (UTC)
Wait, just double checked and the Special:Preferences page changed, odd. I guess it takes time, maybe? Thanks for the help! HadleySo (talk) 21:46, 29 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

API call with resetpassword action returns with badaccess

Tried making an API call to send a password reset email, but got an error code with "badaccess". Tried giving the bot account full permissions and I'm still encountering that error.


My post request parameters are:

PARAMS_1 = {

'action': "resetpassword",

'email': "email@example.com",

'token': csrf_token,

'format':"json"

} HadleySo (talk) 03:05, 30 January 2023 (UTC)

How do I create more wikis?

I am thinking of creating more wikis to make known thousands of projects with relevant information and that all users can edit in my wikis, they are encyclopedias that can hold coherent information. Lomeno 24 (Contact me here) 08:24, 30 January 2023 (UTC)

What stops you from doing so? Malyacko (talk) 11:09, 30 January 2023 (UTC)
Nothing, I'm going to try Lomeno 24 (Contact me here) 19:49, 30 January 2023 (UTC)

Modifier page protégée

Bonjour, je travaille pour une ville française qui souhaiterait mettre à jour ses informations, notamment le logo qui n'est pas le bon et qui est récupéré par des tiers. La page est protégée, comment puis-je procéder ? https://fr.wikipedia.org/wiki/Lambersart Maureendelettre (talk) 10:26, 30 January 2023 (UTC)

Please ask on French Wikipedia about editing French Wikipedia - thanks a lot! Malyacko (talk) 11:10, 30 January 2023 (UTC)

I can't find anything in Special:AllPages

Hello, when I go into Special:AllPages and search for anything the namespace is 'stuck' in (Main). For example I put the namespace Template and when it loads it goes back to (Main) and only shows only the Main pages. Thanks in advance

MediaWiki 1.39.1
PHP 7.4.33 (fpm-fcgi)
MariaDB 10.5.18-MariaDB-0+deb11u1

Kaabinoo (talk) 12:43, 30 January 2023 (UTC)

Can you link to your wiki? Bawolff (talk) 19:30, 30 January 2023 (UTC)

MediaWiki getting internal error

Hello folks;

While things were working yesterday, suddenly today all pages on my wiki are getting an error:

[Y9g0YUAfXxr5YDFlLNqydQAAAVs] 2023-01-30 21:19:29: Fatal exception of type "Error"


Turning on extended errors gets:

[Y9g1MssCw5jIMtDuOqQfTAAAALI] /index.php?title=Michelino_di_Gino_Martini&action=edit Error from line 197 of /home2/antirwiki/public_html/includes/MagicWordArray.php: Call to undefined function each()

Backtrace:

#0 /home2/antirwiki/public_html/includes/MagicWordArray.php(231): MagicWordArray->parseMatch(array)

#1 /home2/antirwiki/public_html/includes/parser/Parser.php(5233): MagicWordArray->matchVariableStartToEnd(string)

#2 /home2/antirwiki/public_html/includes/parser/Parser.php(2342): Parser->makeImage(Title, array, LinkHolderArray)

#3 /home2/antirwiki/public_html/includes/parser/Parser.php(2094): Parser->replaceInternalLinks2(string)

#4 /home2/antirwiki/public_html/includes/parser/Parser.php(1322): Parser->replaceInternalLinks(string)

#5 /home2/antirwiki/public_html/includes/parser/Parser.php(451): Parser->internalParse(string)

#6 /home2/antirwiki/public_html/includes/content/WikitextContent.php(330): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)

#7 /home2/antirwiki/public_html/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)

#8 /home2/antirwiki/public_html/includes/EditPage.php(3945): AbstractContent->getParserOutput(Title, NULL, ParserOptions)

#9 /home2/antirwiki/public_html/includes/EditPage.php(3873): EditPage->doPreviewParse(WikitextContent)

#10 /home2/antirwiki/public_html/includes/EditPage.php(2611): EditPage->getPreviewText()

#11 /home2/antirwiki/public_html/includes/EditPage.php(659): EditPage->showEditForm()

#12 /home2/antirwiki/public_html/includes/actions/EditAction.php(59): EditPage->edit()

#13 /home2/antirwiki/public_html/includes/MediaWiki.php(499): EditAction->show()

#14 /home2/antirwiki/public_html/includes/MediaWiki.php(293): MediaWiki->performAction(Article, Title)

#15 /home2/antirwiki/public_html/includes/MediaWiki.php(862): MediaWiki->performRequest()

#16 /home2/antirwiki/public_html/includes/MediaWiki.php(523): MediaWiki->main()

#17 /home2/antirwiki/public_html/index.php(43): MediaWiki->run()

#18 {main}


I don't show any edits since last night, when I believe I made the last edit, only some text.


I believe I'm running 1.29.


Any ideas on what might be going on, or what to try?

Wiki is http://antir.sca.wiki//index.php?title=Main_Page Medwards98020 (talk) 21:25, 30 January 2023 (UTC)

Probably means your version of mediawiki is too old for your version of php. If you are using PHP8 I suggest using mediawiki 1.39 or later Bawolff (talk) 21:57, 30 January 2023 (UTC)
Hmm, looks like that may be it - I see somehow the environment updated to 8.1.14. Medwards98020 (talk) 23:13, 30 January 2023 (UTC)

Display bug with Cyrillic on ukwiki

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi, I'm not sure where is the best place to pose this question, but please redirect me if necessary.

Google Chrome Version 109.0.5414.75 (Official Build) (64-bit) on Windows 10 Professional, all current updates as of today.


Today I was working on ukwiki in the Ukrainian language (Cyrillic) and I came across some sort of display/Unicode bug. Here's an example from the article: uk:Elvis Costello


File:Declan Patrick MacManus in Ukrainian Wikipedia.png


As you can see, the second word in the article "Patrick" is rendered as "Pamrick" in Cyrillic. It is not "Pamrick" in the wikitext source. It is not "Pamrick" in the underlying Unicode, because when I copy and paste it into a Notepad window, it is rendered thus: Патрік.


But if I copy-paste it into this edit window, it renders: Патрік


Am I going crazy, or remaining ignorant of some quirk of Cyrillic? It's clearly picking up the wrong letter. It did this to me before on another article. It's not isolated. Elizium23 (talk) 10:38, 31 January 2023 (UTC)

I do not see a bug and this is not a "wrong letter". It is up to the font used how it renders Cyrillic italic (!) characters. See https://en.wikipedia.org/wiki/Cyrillic_script#Italic_and_cursive_forms Malyacko (talk) 11:39, 31 January 2023 (UTC)
@Malyacko, ah, it is an italic difference! That is very unusual to me, so thank you for showing up my ignorance. I never expected such a letterform to be completely different, but there you have it. Thanks! Elizium23 (talk) 12:32, 31 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Upcoming event

The Tech Department at Wikimedia Foundation [1] invites you to a special event on February 09, 2023, at 1600 UTC [2].

Richard Evans, Electronics & Data Systems Engineer At NASA Glenn Research Center [3], will be presenting on how MediaWiki is being used within NASA to help manage the testing of very large spacecraft to prove they can survive the harsh conditions of launch, orbit, and re-entry.

The management platform is built from MediaWiki and several key extensions that provide workflow support. This evolving platform plans to incorporate the extensions that form the MediaWiki-powered Open CSP platform [4].

This talk will explain the architecture and benefits of the NASA platform and motivate the need for Open CSP. We’ll also be recording the event to share with those who can’t make it. You can join the event through YouTube [5].

Looking forward to seeing you there,

--on behalf of the Tech Department, Wikimedia Foundation.

(For follow-ups, please reach out to lnguyen@wikimedia.org.)


[1] https://www.mediawiki.org/wiki/Wikimedia_Technology

[2] https://zonestamp.toolforge.org/1675958415

[3] https://www.wikidata.org/wiki/Q618728#sitelinks-wikipedia

[4] https://www.open-csp.org/Main_Page

[5] https://youtube.com/live/kBkiNRJPLM8 Elitre (WMF) (talk) 12:59, 31 January 2023 (UTC)

Please note event link has changed. Elitre (WMF) (talk) 12:26, 1 February 2023 (UTC)

Markup has quit working

We are using Mediawiki 1.19.20+dfsg-2.3


Just in the last couple of days, markup has quit working. For example, if I use a word enclosed in 2 single quotes, when I save that page it gets converted into the html entities for single quotes and then display is the quotation marks instead of the italics that I wanted. HOW DO I FIX THIS? Jthiesen-bethel (talk) 16:28, 31 January 2023 (UTC)

That's strange. Maybe your host updated PHP or something else. You can check with them and also look at Special:Version. It might be time for Manual:Upgrading. Flounder ceo (talk) 16:44, 31 January 2023 (UTC)
PHP is 5.6.24-0+deb8u1 (apache2handler)
I don't think it's been updated lately.
Are there any settings that control how the markup works?
I've found also that I can't use any html, like headings or emphasis, etc. in angle brackets. Jthiesen-bethel (talk) 16:51, 31 January 2023 (UTC)
Are you using any editor related extensions (e.g. visual editor)?
If possible, can you link to your wiki? Bawolff (talk) 17:04, 31 January 2023 (UTC)
No editor related extensions.
Here's a link to one of the screwed up pages Jthiesen-bethel (talk) 17:14, 31 January 2023 (UTC)
That is super weird.
After testing with via the api where it seems like </nowiki>< and ' are escaped but { and [ are fine, my best guess is that some sort of WAF has been installed that is escaping input parameters before they get to mediawiki.
If this is the case, it would be on a layer above mediawiki. Try asking your hosting provider if they use any sort of WAF (sometimes these systems are called "security filters"). Also check your web server configuration for anything like a WAF or mod_security. Bawolff (talk) 17:30, 31 January 2023 (UTC)
Thanks for this clue. I'll try to check on the WAF idea. Jthiesen-bethel (talk) 17:46, 31 January 2023 (UTC)
Category:Support desk archives Category:Support desk archives with syntax highlighting errors