Page MenuHomePhabricator

Mediawiki 1.46.1 - Unable to edit pages
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

The page edit is not saved.

PHP error_log

[Fri Oct 02 13:45:27.288330 2026] [proxy_fcgi:error] [pid 13984:tid 14090] [client x.x.x.x:61355] AH01071: Got error 'PHP message: PHP Warning: Undefined property: MediaWiki\\EditPage\\EditPage::$inputs in /home/wiki/public_html/wiki.xxxx.it/includes/EditPage/EditPage.php on line 2521', referer: https://wiki.xxxx.it/index.php?title=Pagina_principale&action=edit

Stack Strace

[ar-ZV-F47_bL4CkA1EWelgAAAEs] /index.php?title=Pagina_principale&action=submit Error: Call to a member function getPage() on null

Backtrace:

from /home/wiki/public_html/wiki.xxxx.it/includes/EditPage/EditPage.php(2521)
#0 /home/wiki/public_html/wiki.xxxx.it/includes/EditPage/EditPage.php(2291): MediaWiki\EditPage\EditPage->getPostMergeChecksRunner()
#1 /home/wiki/public_html/wiki.xxxx.it/includes/EditPage/EditPage.php(1736): MediaWiki\EditPage\EditPage->internalAttemptSave()
#2 /home/wiki/public_html/wiki.xxxx.it/includes/EditPage/EditPage.php(661): MediaWiki\EditPage\EditPage->attemptSave()
#3 /home/wiki/public_html/wiki.xxxx.it/includes/Actions/EditAction.php(55): MediaWiki\EditPage\EditPage->edit()
#4 /home/wiki/public_html/wiki.xxxx.it/includes/Actions/SubmitAction.php(29): MediaWiki\Actions\EditAction->show()
#5 /home/wiki/public_html/wiki.xxxx.it/includes/Actions/ActionEntryPoint.php(753): MediaWiki\Actions\SubmitAction->show()
#6 /home/wiki/public_html/wiki.xxxx.it/includes/Actions/ActionEntryPoint.php(511): MediaWiki\Actions\ActionEntryPoint->performAction()
#7 /home/wiki/public_html/wiki.xxxx.it/includes/Actions/ActionEntryPoint.php(145): MediaWiki\Actions\ActionEntryPoint->performRequest()
#8 /home/wiki/public_html/wiki.xxxx.it/includes/MediaWikiEntryPoint.php(180): MediaWiki\Actions\ActionEntryPoint->execute()
#9 /home/wiki/public_html/wiki.xxxx.it/index.php(44): MediaWiki\MediaWikiEntryPoint->run()
#10 {main}

What should have happened instead?:

Save the page edits

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Almalinux 9
apache 2.4
PHP 8.3 (tried with 8.4 too, same issue)
MariaDB 10.11.19
mediawiki 1.46.1
Vector template

Other information (browser name/version, screenshots, etc.):

On the same server/account mediawiki works fine until 1.45.5

Checking this issue on IRC support channel looks like that the zip for 1.46.1 differ from REL1_46 branch:

<ashley> hm, yes, it definitely looks like the code shipped in mediawiki-core-1.46.1.zip (from https://releases.wikimedia.org/mediawiki/1.46/) differs from git REL1_46 branch
<ashley> https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/REL1_46/includes/EditPage/EditPage.php#2521 -- here the 2nd param to the ImageRedirectConstraint constructor is $this->getTitle() and the 3rd param is $authority, but in the release .zip they are $this->inputs->getPage() and $this->inputs->getAuthority(), respectively; but the "inputs" stuff seems related to the includes/PageEdit/ dir which exists on master but not on REL1_46

Event Timeline

Restricted Application added subscribers: hubaishan, Aklapper. · View Herald Transcript
Restricted Application added a subscriber: alaa. · View Herald TranscriptFri, Oct 2, 1:38 PM
ashley triaged this task as Unbreak Now! priority.Fri, Oct 2, 4:11 PM
ashley subscribed.

Being bold and triaging this as UBN because editing is kinda a crucial feature, the very point as to why one might want to set up a wiki.

As I mentioned on IRC, this issue "only" seems to affect the published releases, the REL1_46 git branch appears to be OK and doesn't reference the undefined $this->inputs variable (which seems to be a 1.47+ thing, and even then, the relevant code which does define that variable lives in includes/PageEdit/, a directory not present on 1.46 or older releases).

But if I'm a new user reading https://www.mediawiki.org/wiki/Download , of course I'll grab the latest release advertised as "stable"...

A patch file for those in a hurry.

Umherirrender claimed this task.
Umherirrender added subscribers: Reedy, Umherirrender.

There is now 1.46.2, assume the tarball is now correct.

Just tried MW 1.46.2, everything looks fine now.

Thanks