Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
BBC RussianHomePhabricator
Log In
Maniphest T338480

Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent an existing page: 1
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent an existing page: 1
error.stack_trace
from /srv/mediawiki/php-1.41.0-wmf.12/vendor/wikimedia/assert/src/Assert.php(49)
#0 /srv/mediawiki/php-1.41.0-wmf.12/includes/title/Title.php(4128): Wikimedia\Assert\Assert::precondition(boolean, string)
#1 /srv/mediawiki/php-1.41.0-wmf.12/extensions/DiscussionTools/includes/SpecialDiscussionToolsDebug.php(82): MediaWiki\Title\Title->toPageRecord()
#2 /srv/mediawiki/php-1.41.0-wmf.12/includes/htmlform/HTMLForm.php(746): MediaWiki\Extension\DiscussionTools\SpecialDiscussionToolsDebug->onSubmit(array, OOUIHTMLForm)
#3 /srv/mediawiki/php-1.41.0-wmf.12/includes/htmlform/HTMLForm.php(626): HTMLForm->trySubmit()
#4 /srv/mediawiki/php-1.41.0-wmf.12/includes/htmlform/HTMLForm.php(642): HTMLForm->tryAuthorizedSubmit()
#5 /srv/mediawiki/php-1.41.0-wmf.12/includes/specialpage/FormSpecialPage.php(224): HTMLForm->show()
#6 /srv/mediawiki/php-1.41.0-wmf.12/includes/specialpage/SpecialPage.php(701): FormSpecialPage->execute(NULL)
#7 /srv/mediawiki/php-1.41.0-wmf.12/includes/specialpage/SpecialPageFactory.php(1554): SpecialPage->run(NULL)
#8 /srv/mediawiki/php-1.41.0-wmf.12/includes/MediaWiki.php(328): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#9 /srv/mediawiki/php-1.41.0-wmf.12/includes/MediaWiki.php(925): MediaWiki->performRequest()
#10 /srv/mediawiki/php-1.41.0-wmf.12/includes/MediaWiki.php(579): MediaWiki->main()
#11 /srv/mediawiki/php-1.41.0-wmf.12/index.php(50): MediaWiki->run()
#12 /srv/mediawiki/php-1.41.0-wmf.12/index.php(46): wfIndexMain()
#13 /srv/mediawiki/w/index.php(3): require(string)
#14 {main}
Notes

Reproducible with a GET request on many wikis

Details

Request URL
https://foundation.wikimedia.org/wiki/Special:DiscussionToolsDebug?pagetitle=*

Event Timeline

matmarex subscribed.

Looks like Special:DiscussionToolsDebug doesn't check whether the page title given to it exists. Should be a simple fix. The bug has minimal user impact (if you type in such a title on the page, you get an ugly error message instead of a pretty one – that's all).

Hi,
Could you please clarify, what message should be displayed, if the page title doesn't exist?
Should it be:
"nopagetitle": "No such target page"
"nopagetext": "The target page you have specified does not exist."
?

Thanks,
Rajashree

Change 952480 had a related patch set uploaded (by RajashreeTalukdar; author: RajashreeTalukdar):

[mediawiki/extensions/DiscussionTools@master] DiscussionToolsDebug modified to check whether the page title given, exists or not

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

Change 952480 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] DiscussionToolsDebug: check whether the given page exists

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

matmarex assigned this task to RajashreeTalukdar.