Jump to content

Talk:MediaWiki 1.39

Add topic
From mediawiki.org
Latest comment: 2 years ago by 125.16.1.202 in topic Does medawiki 1.39.6 fix the cve issue ?

PHP requirement

[edit]

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 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! Tacsipacsi (talk) 12:45, 31 October 2022 (UTC)Reply

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. Jdforrester (WMF) (talk) 15:33, 31 October 2022 (UTC)Reply
This is now done: https://www.mediawiki.org/w/index.php?diff=5642316&oldid=5641259&title=MediaWiki_1.39 Jdforrester (WMF) (talk) 23:13, 6 December 2022 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Changes to import

[edit]

"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. Proactive programming (talk) 01:10, 9 December 2022 (UTC)Reply

Hey there,
I'd recommend you submit this feature request to Phabricator; the relevant project is "MediaWiki-Core-Snapshots". Jdforrester (WMF) (talk) 14:20, 12 December 2022 (UTC)Reply

Add option to import to allow prepend, and appending

[edit]

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. Proactive programming (talk) 01:12, 9 December 2022 (UTC)Reply

Hey there,
I'd recommend you submit this feature request to Phabricator; the relevant project is "MediaWiki-Core-Snapshots". Jdforrester (WMF) (talk) 14:20, 12 December 2022 (UTC)Reply

PHP error while editing pages

[edit]

@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 123.136.150.182 (talk) 05:17, 21 December 2022 (UTC)Reply

Main slot of revision not found in database. See T212428

[edit]

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. 147.235.195.179 (talk) 12:48, 14 June 2023 (UTC)Reply

I believe that running php maintenance/findBadBlobs.php should still help, but that advice might be out of date as you say. Jdforrester (WMF) (talk) 16:01, 21 June 2023 (UTC)Reply

update.php fails

[edit]

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? בקש (talk) 05:50, 21 July 2023 (UTC)Reply

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. Prod (talk) 17:51, 21 July 2023 (UTC)Reply
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 Pipsteer (talk) 13:32, 9 August 2023 (UTC)Reply
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' Pipsteer (talk) 13:51, 9 August 2023 (UTC)Reply
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. Pipsteer (talk) 15:09, 9 August 2023 (UTC)Reply
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 בקש (talk) 04:34, 13 August 2023 (UTC)Reply

MW 1.39.6 full of null warnings

[edit]

"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? Jakeriper1 (talk) 23:31, 4 January 2024 (UTC)Reply

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? Tacsipacsi (talk) 10:43, 6 January 2024 (UTC)Reply
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 Jakeriper1 (talk) 15:31, 6 January 2024 (UTC)Reply
all these "nulls" have to do with getrusage() or something in that function;
got to dig deeper Jakeriper1 (talk) 18:17, 6 January 2024 (UTC)Reply
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 } Jakeriper1 (talk) 16:11, 7 January 2024 (UTC)Reply

Does medawiki 1.39.6 fix the cve issue ?

[edit]

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 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. Luciferindcok (talk) 05:06, 23 January 2024 (UTC)Reply

As of now, 1.39 is LTS, so it should get proper treatment in terms of security updates. The release notes are available. Matěj Suchánek (talk) 07:20, 23 January 2024 (UTC)Reply
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? Luciferindcok (talk) 09:24, 23 January 2024 (UTC)Reply
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. Matěj Suchánek (talk) 10:01, 23 January 2024 (UTC)Reply
thank you 125.16.1.202 (talk) 06:19, 24 January 2024 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.