we are currently using mediawiki 1.39.4, going to update to 1.39.6 . Please let me know if there are any bugs with this version or is it safe to update.
Talk:MediaWiki 1.39
As of now, 1.39 is LTS, so it should get proper treatment in terms of security updates. The release notes are available.
I understand that 1.39.6 contains a security update,
Should it be installed the same way we upgrade mediawiki version ?? Is there any easy method to install just the patches?
In theory, it is possible to download just the files that were changed. There is quite a lot of them, though you probably don't need all of them. Otherwise use your version control system and/or follow Manual:Upgrading.
thank you
"Trying to access array offset on value of type null" is the type of warning i'm getting of several pages.
sooo, why am i getting so many warnings on a LTS, fresh install of MediaWiki?
i installed the wiki on a server with php 8.2. is the LTS not tested on this version of php?
MediaWiki 1.39 was released on 30 November 2022, PHP 8.2 eight days later, so no one could test MW 1.39 on PHP 8.2 before the release, and probably no one tested it after the release either.
On the other hand, I don’t know about any changes in PHP 8.2 that could cause these warnings, so it’s likely that it would affect older PHP versions as well. Which file/line do these warnings refer to? Do you have any extensions installed?
EDIT: finding more as i work on the wiki:
vendor/wikimedia/wait-condition-loop/src/WaitConditionLoop.php on line 169 (on the main page)
vendor\wikimedia/request-timeout/src/Detail/BasicRequestTimeout.php on line 35
includes/parser/ParserOutput.php on line 1786 (on multiple special pages)
includes/profiler/SectionProfiler.php on line 297
(not sure if there's more - i've seen more, but i've also been installing different MediaWiki versions, and switching PHP versions on my local installation, ir order to upgrade the database of an old wiki to 1.39.6 - maybe i'd have to go through more of the wiki's pages, but these two are quite common on a fresh 1.39.6 MW install with PHP 8.2)
as for extensions i have just a few: JSBreadCrumbs, LinkTitles, WikiEditor and YouTube
all these "nulls" have to do with getrusage() or something in that function;
got to dig deeper
dunno why the code isn't setting the expected variable as an array here, but the wiki seems working fine, so i'll wait until the next LTS and upgrade, hopefully this will be fixed by then.
i just hid the error, if anyone's interested, with isset and is_array.
if (isset($ru) || is_array($ru)) { run whatever the function has to run that uses $ru }
I updated from 1.38.4 to 1.39.4 and raned the update script, the script exits withe the following error:
Modifying tl_namespace field of table templatelinks...Wikimedia\Rdbms\DBQueryError from line 1618 of /var/www/html/w/includes/libs/rdbms/database/Database.php: Error 1091: Can't DROP INDEX `PRIMARY`; check that it exists Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/w/maintenance/archives/patch-templatelinks-tl_title-nullable.sql ) Query: ALTER TABLE `mw_templatelinks` DROP PRIMARY KEY
# 0 /var/www/html/w/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException('Can't DROP INDE...', 1091, 'ALTER TABLE `m...', 'Wikimedia\\Rdbms...') # 1 /var/www/html/w/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Can't DROP INDE...', 1091, 'ALTER TABLE `m...', 'Wikimedia\\Rdbms...') # 2 /var/www/html/w/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError('Can't DROP INDE...', 1091, 'ALTER TABLE `m...', 'Wikimedia\\Rdbms...', false) # 3 /var/www/html/w/includes/libs/rdbms/database/Database.php(3302): Wikimedia\Rdbms\Database->query('ALTER TABLE `m...', 'Wikimedia\\Rdbms...') # 4 /var/www/html/w/includes/libs/rdbms/database/Database.php(3241): Wikimedia\Rdbms\Database->sourceStream(Resource id #1341, NULL, NULL, 'Wikimedia\\Rdbms...', NULL) # 5 /var/www/html/w/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->sourceFile('/var/www/html/w...') # 6 /var/www/html/w/includes/libs/rdbms/database/DBConnRef.php(807): Wikimedia\Rdbms\DBConnRef->__call('sourceFile', Array) # 7 /var/www/html/w/includes/installer/DatabaseUpdater.php(718): Wikimedia\Rdbms\DBConnRef->sourceFile('/var/www/html/w...') # 8 /var/www/html/w/includes/installer/DatabaseUpdater.php(1000): DatabaseUpdater->applyPatch('/var/www/html/w...', false, 'Modifying tl_na...') # 9 /var/www/html/w/includes/installer/DatabaseUpdater.php(547): DatabaseUpdater->modifyField('templatelinks', 'tl_namespace', 'patch-templatel...') # 10 /var/www/html/w/includes/installer/DatabaseUpdater.php(511): DatabaseUpdater->runUpdates(Array, false) # 11 /var/www/html/w/maintenance/update.php(202): DatabaseUpdater->doUpdates(Array) # 12 /var/www/html/w/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute() # 13 /var/www/html/w/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run() # 14 /var/www/html/w/maintenance/update.php(312): require_once('/var/www/html/w...') # 15 {main}
what can i do to fix it?
Did you run the updater twice? I think I had a similar problem. The first time I ran it, it errored half way through the script, and then the second time it couldn't drop the index.
You might be able to get past this by recreating the index.
We're running into the same issue on our wiki, updating to 1.39.3. Oddly enough most of the wiki funcionality is still without problems. I'll let you know what happens after recreating the index
I found the relevant SQL commands in
~/public_html/maintenance/archives/patch-templatelinks-tl_title-nullable.sql
I tried to recreate the primary key like they did there, but got the following response:
Duplicate entry '568-1' for key 'PRIMARY'
update: I found a similar problem described in https://phabricator.wikimedia.org/T332333 . After following the steps of this user to resolve the issue, update.php worked for me as well. It seems that some old templatelink entries were created with empty title fields, which make the primary key assignment impossible due to duplicates.
After clearing the duplicate entries with empty titles in the database, my issue was resolved.
On the mean time i downgraded back to 1.38.4 because my whole website crashed (the db refused the server connection) and lost 1500 edits of my users. I gonna try what you did here hope this helps me. Thanks
I updated from version 1.33.0 to version 1.39.3 and I have this error:
Original exception: [21dbfcdc763b93fdb3cf967d] /index.php/Accueil MediaWiki\Revision\RevisionAccessException: Main slot of revision not found in database. See T212428.
Backtrace:
from D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\Revision\RevisionStore.php(1518)
#0 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\Revision\RevisionStore.php(1377): MediaWiki\Revision\RevisionStore->constructSlotRecords(integer, array, integer, Title)
#1 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\Revision\RevisionStore.php(1554): MediaWiki\Revision\RevisionStore->loadSlotRecords(integer, integer, Title)
#2 [internal function]: MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}()
#3 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\Revision\RevisionSlots.php(170): call_user_func(Closure)
#4 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\Revision\RevisionSlots.php(109): MediaWiki\Revision\RevisionSlots->getSlots()
#5 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\Revision\RevisionRecord.php(181): MediaWiki\Revision\RevisionSlots->getSlot(string)
#6 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\page\WikiPage.php(673): MediaWiki\Revision\RevisionRecord->getSlot(string, integer)
#7 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\libs\objectcache\wancache\WANObjectCache.php(1689): WikiPage->{closure}(boolean, integer, array, NULL, array)
#8 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\libs\objectcache\wancache\WANObjectCache.php(1522): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)
#9 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\page\WikiPage.php(687): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#10 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\page\WikiPage.php(296): WikiPage->getContentModel()
#11 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\MediaWiki.php(437): WikiPage->getContentHandler()
#12 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\MediaWiki.php(320): MediaWiki->initializeArticle()
#13 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\MediaWiki.php(904): MediaWiki->performRequest()
#14 D:\wamp64.3.3.0\www\mediawiki-1.39.3\includes\MediaWiki.php(562): MediaWiki->main()
#15 D:\wamp64.3.3.0\www\mediawiki-1.39.3\index.php(50): MediaWiki->run()
#16 D:\wamp64.3.3.0\www\mediawiki-1.39.3\index.php(46): wfIndexMain()
#17 {main}
What can I do to fix it? All clues found on the web are for older versions.
I believe that running php maintenance/findBadBlobs.php
should still help, but that advice might be out of date as you say.
@Jdforrester (WMF) Hi, I upgraded my wiki to 1.39 but when I'm using PHP 8.0 I'm getting the following error while editing the pages "Fatal exception of type "TypeError"" I looked at the error log and found "TypeError: Cannot access offset of type string on string" is there a bug or something? if not then is there a solution?
Thank you
Can the option be added to import that will allow the option to prepend or append a record instead of overwriting? And allow the option to skip a record if there is a duplicate? Similar to the functionality of the "data transfer" extension". Also having the option to import to an existing section (by name) or a new section would also be great.
Hey there,
I'd recommend you submit this feature request to Phabricator; the relevant project is "MediaWiki-Core-Snapshots".
"When importing revision with same timestamp as latest revision, treat it as the new latest." -- this is going to cause problems when trying to import large files and there is an error, so the file needs to be imported. That means if you already successfully imported 3000 records, and 3001 had the error, all the successful 3000 records will be imported. This should be an option.
Hey there,
I'd recommend you submit this feature request to Phabricator; the relevant project is "MediaWiki-Core-Snapshots".
I think this page should note that now PHP 7.4 is required (and probably the level of PHP 8.0/8.1 support; where are we yet?). I don’t know where to put and how to formulate this piece of information, though, so if anyone can include it, thanks in advance!
Yeah, this page and the main release notes page have both been filled out prematurely, and miss out on the wording. We'll probably re-sync them when we're pushing the actual release.
There are no older topics