Page MenuHomePhabricator

Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target.
Closed, ResolvedPublicBUG REPORT

Description

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

Search for "delete" (https://wiki.multitheftauto.com/index.php?search=delete&title=Special%3ASearch&go=Go)

What happens?:

A precondition error occurs.

[42c22edac2d30455d7e89bdf] /index.php?search=delete&title=Special%3ASearch&go=Go Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target.

Backtrace:

from /data/vendor/wikimedia/assert/src/Assert.php(49)
#0 /data/includes/Title.php(4209): Wikimedia\Assert\Assert::precondition()
#1 /data/includes/Title.php(4190): Title->assertProperPage()
#2 /data/includes/Revision/RevisionStore.php(1828): Title->getId()
#3 /data/includes/Revision/RevisionStore.php(1733): MediaWiki\Revision\RevisionStore->ensureRevisionRowMatchesPage()
#4 /data/includes/Revision/RevisionStore.php(1609): MediaWiki\Revision\RevisionStore->newRevisionFromRowAndSlots()
#5 /data/includes/Revision/RevisionStore.php(2347): MediaWiki\Revision\RevisionStore->newRevisionFromRow()
#6 /data/includes/Revision/RevisionStore.php(1286): MediaWiki\Revision\RevisionStore->loadRevisionFromConds()
#7 /data/includes/search/RevisionSearchResultTrait.php(52): MediaWiki\Revision\RevisionStore->getRevisionByTitle()
#8 /data/includes/search/RevisionSearchResult.php(16): RevisionSearchResult->initFromTitle()
#9 /data/includes/search/SqlSearchResult.php(35): RevisionSearchResult->__construct()
#10 /data/includes/search/SqlSearchResultSet.php(60): SqlSearchResult->__construct()
#11 /data/includes/search/SearchResultSet.php(73): SqlSearchResultSet->extractResults()
#12 /data/includes/search/SearchResultSet.php(184): SearchResultSet->count()
#13 /data/includes/search/SearchEngine.php(201): SearchResultSet->shrink()
#14 /data/includes/search/SearchEngine.php(96): SearchEngine->maybePaginate()
#15 /data/includes/specials/SpecialSearch.php(447): SearchEngine->searchText()
#16 /data/includes/specials/SpecialSearch.php(228): SpecialSearch->showResults()
#17 /data/includes/specialpage/SpecialPage.php(671): SpecialSearch->execute()
#18 /data/includes/specialpage/SpecialPageFactory.php(1378): SpecialPage->run()
#19 /data/includes/MediaWiki.php(315): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#20 /data/includes/MediaWiki.php(912): MediaWiki->performRequest()
#21 /data/includes/MediaWiki.php(563): MediaWiki->main()
#22 /data/index.php(53): MediaWiki->run()
#23 /data/index.php(46): wfIndexMain()
#24 {main}

What should have happened instead?:

The search should return a result.

Software version (skip for WMF-hosted wikis like Wikipedia):

1.38.2

https://wiki.multitheftauto.com/wiki/Special:Version

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

Similar errors seems to have been occurring a few times in the past, with different search parameters:

Event Timeline

Gehel subscribed.

This does not seem related to Search itself but to article rendering (which is indirectly used by Search). There has been some work semi-recently around that area. Maybe Platform Engineering knows more...

The failure has happen when building the search result. There must be a invalid title on the wiki which is part of the search result for that word.

Try to run cleanupTitles.php (first with --dry-run) to find that bad title. Or namespaceDupes.php if the namespace config was changed in the past.

It could be possible there is a page_id in revision, which is no longer part of the wiki (broken delete etc.), not sure if deleteOrphanedRevisions.php helps for that (run with --report first)

myonlake claimed this task.

The failure has happen when building the search result. There must be a invalid title on the wiki which is part of the search result for that word.

Try to run cleanupTitles.php (first with --dry-run) to find that bad title. Or namespaceDupes.php if the namespace config was changed in the past.

It could be possible there is a page_id in revision, which is no longer part of the wiki (broken delete etc.), not sure if deleteOrphanedRevisions.php helps for that (run with --report first)

Thank you very much! Running cleanupTitles.php seems to have fixed this problem. I believe no further action is required.