Page MenuHomePhabricator

"Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent an existing page" when trying to move page into main namespace
Closed, ResolvedPublicPRODUCTION ERROR

Description

Recently on Polish Wikipedia there have been reported a few instances of PreconditionException being thrown when a user tried to move a page from their user namespace to the main namespace. The issue is not specific to the given page (eg. after asking for help, other user was able to move it), the same user was also able to move the page to a different title than the original.

Error message (on Special:Move, after submitting):

image.png (321×1 px, 216 KB)

Other noted request ids:

  • [caf1fd60-e78d-4d54-bab3-506c7ca9b705] 2025-04-04 14:48:06: Krytyczny wyjątek typu „Wikimedia\Assert\PreconditionException”
  • [2b2dd43b-bb6e-4a4c-8fa7-2a4531c670cd] 2025-04-06 09:29:15: Krytyczny wyjątek typu „Wikimedia\Assert\PreconditionException”
  • [38001a3a-856e-455c-874b-106b27201508] 2025-04-06 18:58:20: Krytyczny wyjątek typu „Wikimedia\Assert\PreconditionException”

The above three have been reported on plwiki's new user helpdesk.

Error
normalized_message
[{reqId}] {exception_url}   Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent an existing page: Anastole
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.23/vendor/wikimedia/assert/src/Assert.php(49)
#0/srv/mediawiki/php-1.44.0-wmf.23/includes/title/Title.php(3873)Wikimedia\Assert\Assert::precondition(bool, string)
#1/srv/mediawiki/php-1.44.0-wmf.23/includes/page/MovePage.php(747)MediaWiki\Title\Title->toPageRecord()
#2/srv/mediawiki/php-1.44.0-wmf.23/includes/page/MovePage.php(495)MediaWiki\Page\MovePage->moveUnsafe(MediaWiki\User\User, string, bool, array)
#3/srv/mediawiki/php-1.44.0-wmf.23/includes/specials/SpecialMovePage.php(786)MediaWiki\Page\MovePage->moveIfAllowed(MediaWiki\User\User, string, bool)
#4/srv/mediawiki/php-1.44.0-wmf.23/includes/specials/SpecialMovePage.php(225)MediaWiki\Specials\SpecialMovePage->doSubmit()
#5/srv/mediawiki/php-1.44.0-wmf.23/includes/specialpage/SpecialPage.php(729)MediaWiki\Specials\SpecialMovePage->execute(null)
#6/srv/mediawiki/php-1.44.0-wmf.23/includes/specialpage/SpecialPageFactory.php(1737)MediaWiki\SpecialPage\SpecialPage->run(null)
#7/srv/mediawiki/php-1.44.0-wmf.23/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#8/srv/mediawiki/php-1.44.0-wmf.23/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#9/srv/mediawiki/php-1.44.0-wmf.23/includes/MediaWikiEntryPoint.php(202)MediaWiki\Actions\ActionEntryPoint->execute()
#10/srv/mediawiki/php-1.44.0-wmf.23/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#11/srv/mediawiki/w/index.php(3)require(string)
#12{main}
Impact
Notes

See also https://phabricator.wikimedia.org/maniphest/query/eFFPZrZp2IVA/#R

Details

Event Timeline

Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptApr 6 2025, 7:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper renamed this task from Wikimedia\Assert\PreconditionException when trying to move page into main namespace to "Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent an existing page" when trying to move page into main namespace.Apr 6 2025, 7:45 PM
Aklapper updated the task description. (Show Details)

Change #1134386 had a related patch set uploaded (by Wargo; author: Wargo):

[mediawiki/core@master] READ_LATEST for toPageRecord in eventDispatcher

https://gerrit.wikimedia.org/r/1134386

Change #1134386 merged by jenkins-bot:

[mediawiki/core@master] READ_LATEST for toPageRecord in eventDispatcher

https://gerrit.wikimedia.org/r/1134386

thcipriani subscribed.

Tagging in MediaWiki-Engineering if this is incorrect, please help direct to the appropriate team or use Unstewarded-production-error if no such team exists.

BPirkle triaged this task as Medium priority.Dec 1 2025, 5:22 PM
BPirkle moved this task from Incoming (Needs Triage) to Bugs & Chores on the MW-Interfaces-Team board.
BPirkle subscribed.

The attached patch is merged. Is this fixed?

AGhirelli-WMF claimed this task.
AGhirelli-WMF subscribed.

I mark this as resolved since we don't have any new logs related to this error