Page MenuHomePhabricator

Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target.
Open, Needs TriagePublicPRODUCTION ERROR

Description

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

What happens?:

I see an "Internal error" like the follwing (two different attempts):

[7734c05e-3f9c-4f6a-aad0-de4c2ef66db2] 2024-06-23 05:09:03: Fatal exception of type "Wikimedia\Assert\PreconditionException"

[15940db0-62ac-4cdf-9b2d-15cb19f665ce] 2024-06-23 05:16:56: Fatal exception of type "Wikimedia\Assert\PreconditionException"

What should have happened instead?:

Should have seen the user's contributions.

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

I see the error using both Vector 2022 and Legacy Vector, so presumably not a skin-related issue. Also, I get the error using both the English (canonical) version of the page name, "Special:Contributions/Kanjy", and the Japanese version, "特別:投稿記録/Kanjy" (i.e., following a "contribs" link on the wiki itself).

Note that the user is an admin on the wiki. I don't see the error for any other admin or normal user I've tried on the wiki. No problem with Kanjy's user page or user talk page, either, nor with Special:Log/Kanjy.

Error
normalized_message
[{reqId}] {exception_url}   Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target.
exception.trace
from /srv/mediawiki/php-1.43.0-wmf.10/vendor/wikimedia/assert/src/Assert.php(49)
#0 /srv/mediawiki/php-1.43.0-wmf.10/includes/title/Title.php(3834): Wikimedia\Assert\Assert::precondition(boolean, string)
#1 /srv/mediawiki/php-1.43.0-wmf.10/includes/title/Title.php(3815): MediaWiki\Title\Title->assertProperPage()
#2 /srv/mediawiki/php-1.43.0-wmf.10/includes/Revision/RevisionStore.php(1839): MediaWiki\Title\Title->getId(boolean)
#3 /srv/mediawiki/php-1.43.0-wmf.10/includes/Revision/RevisionStore.php(1744): MediaWiki\Revision\RevisionStore->ensureRevisionRowMatchesPage(stdClass, MediaWiki\Title\Title)
#4 /srv/mediawiki/php-1.43.0-wmf.10/includes/Revision/RevisionStore.php(1622): MediaWiki\Revision\RevisionStore->newRevisionFromRowAndSlots(stdClass, NULL, integer, MediaWiki\Title\Title, boolean)
#5 /srv/mediawiki/php-1.43.0-wmf.10/includes/pager/ContributionsPager.php(581): MediaWiki\Revision\RevisionStore->newRevisionFromRow(stdClass, integer, MediaWiki\Title\Title)
#6 /srv/mediawiki/php-1.43.0-wmf.10/includes/pager/ContributionsPager.php(617): MediaWiki\Pager\ContributionsPager->createRevisionRecord(stdClass, MediaWiki\Title\Title)
#7 /srv/mediawiki/php-1.43.0-wmf.10/includes/pager/ReverseChronologicalPager.php(134): MediaWiki\Pager\ContributionsPager->formatRow(stdClass)
#8 /srv/mediawiki/php-1.43.0-wmf.10/includes/pager/IndexPager.php(601): MediaWiki\Pager\ReverseChronologicalPager->getRow(stdClass)
#9 /srv/mediawiki/php-1.43.0-wmf.10/includes/specialpage/ContributionsSpecialPage.php(336): MediaWiki\Pager\IndexPager->getBody()
#10 /srv/mediawiki/php-1.43.0-wmf.10/includes/poolcounter/PoolCounterWorkViaCallback.php(73): MediaWiki\SpecialPage\ContributionsSpecialPage->MediaWiki\SpecialPage\{closure}()
#11 /srv/mediawiki/php-1.43.0-wmf.10/includes/poolcounter/PoolCounterWork.php(171): MediaWiki\PoolCounter\PoolCounterWorkViaCallback->doWork()
#12 /srv/mediawiki/php-1.43.0-wmf.10/includes/specialpage/ContributionsSpecialPage.php(356): MediaWiki\PoolCounter\PoolCounterWork->execute()
#13 /srv/mediawiki/php-1.43.0-wmf.10/includes/specialpage/SpecialPage.php(719): MediaWiki\SpecialPage\ContributionsSpecialPage->execute(string)
#14 /srv/mediawiki/php-1.43.0-wmf.10/includes/specialpage/SpecialPageFactory.php(1694): MediaWiki\SpecialPage\SpecialPage->run(string)
#15 /srv/mediawiki/php-1.43.0-wmf.10/includes/actions/ActionEntryPoint.php(502): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#16 /srv/mediawiki/php-1.43.0-wmf.10/includes/actions/ActionEntryPoint.php(145): MediaWiki\Actions\ActionEntryPoint->performRequest()
#17 /srv/mediawiki/php-1.43.0-wmf.10/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()
#18 /srv/mediawiki/php-1.43.0-wmf.10/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#19 /srv/mediawiki/w/index.php(3): require(string)
#20 {main}
Impact
Notes

Details

MediaWiki Version
1.43.0-wmf.10
Request URL
https://ja.wikibooks.org/wiki/%E7%89%B9%E5%88%A5:%E6%8A%95%E7%A8%BF%E8%A8%98%E9%8C%B2/Kanjy

Event Timeline

Dcljr renamed this task from Internal error: Fatal exception of type "Wikimedia\Assert\PreconditionException to Internal error on jawikibooks: Fatal exception of type "Wikimedia\Assert\PreconditionException".Jun 23 2024, 5:31 AM

(For the benefit of future readers, the "Related Objects" item above is because I originally cited the software version in my report, which referred to that particular software change. I removed that information when I noticed that verison info is not necessary for reports about Wikimedia-hosted wikis.)

Aklapper changed the subtype of this task from "Bug Report" to "Production Error".Jun 23 2024, 8:08 AM

This seems to (only) happen with ?limit=500 on the aforementioned Special:Contributions page.

It's hard to say anything else without a full stack trace or access to one, but codesearching for PreconditionException suggests that it's a case of either "wiki ID mismatch" (don't ask me how that could ever happen...) oder an invalid title of some sort that cannot be properly represented via a Titel object (which seems to me like the more likely case here, sometimes weird stuff gets stored in the DB for whatever reason(s) and that ends up causing issues later on).

Aklapper renamed this task from Internal error on jawikibooks: Fatal exception of type "Wikimedia\Assert\PreconditionException" to Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target..Jun 23 2024, 8:12 AM
Aklapper set Request URL to https://ja.wikibooks.org/wiki/%E7%89%B9%E5%88%A5:%E6%8A%95%E7%A8%BF%E8%A8%98%E9%8C%B2/Kanjy.
Aklapper updated the task description. (Show Details)
Aklapper set Release Version to 1.43.0-wmf.10.
Bugreporter subscribed.

This can be fixed by running namespaceDupes.php

This can be fixed by running namespaceDupes.php

Umm… so do we want to do this?

Running namespaceDupes.php does not fix this since "WB:" is an invalid title.

zabe@mwmaint1002:~$ mwscript namespaceDupes.php jawikibooks
id=12628 ns=0 dbk=WB: *** invalid title and --add-prefix not specified
1 pages to fix, 0 were resolvable.

0 links to fix, 0 were resolvable, 0 were deleted.

Oh noeees
zabe@mwmaint1002:~$