Page MenuHomePhabricator

Conversion table pages are inaccessible for some language variants
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.18

message
The supplied ParserOptions are not safe to cache. Use NO_CACHE.

Impact

Conversion table pages are inaccessible for some language variants

Notes

The new ParserOutputAccess class will complain if asked to produce non-cacheable ParserOutput unless the NO_CACHE flag is given. This behavior was taken from the old code in WikiPage::getParserOutput(). It is now also being applied when coming from Article::view(), which seems to fail in the case of the conversion tables.

See https://gerrit.wikimedia.org/r/c/mediawiki/core/+/631264

Details

Request ID
04b986ed-0db8-4796-a814-dd3d55c4518d
Request URL
https://gan.wikipedia.org/wiki/MediaWiki:Conversiontable/gan-hant
Stack Trace
exception.trace
#0 /srv/mediawiki/php-1.36.0-wmf.18/includes/page/ParserOutputAccess.php(184): MediaWiki\Page\ParserOutputAccess->checkPreconditions(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, integer)
#1 /srv/mediawiki/php-1.36.0-wmf.18/includes/page/Article.php(732): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, integer)
#2 /srv/mediawiki/php-1.36.0-wmf.18/includes/actions/ViewAction.php(74): Article->view()
#3 /srv/mediawiki/php-1.36.0-wmf.18/includes/MediaWiki.php(532): ViewAction->show()
#4 /srv/mediawiki/php-1.36.0-wmf.18/includes/MediaWiki.php(316): MediaWiki->performAction(Article, Title)
#5 /srv/mediawiki/php-1.36.0-wmf.18/includes/MediaWiki.php(945): MediaWiki->performRequest()
#6 /srv/mediawiki/php-1.36.0-wmf.18/includes/MediaWiki.php(548): MediaWiki->main()
#7 /srv/mediawiki/php-1.36.0-wmf.18/index.php(53): MediaWiki->run()
#8 /srv/mediawiki/php-1.36.0-wmf.18/index.php(46): wfIndexMain()
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}

Event Timeline

daniel triaged this task as High priority.Dec 1 2020, 6:20 PM

Change 644605 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] Don't cache output that i9s not safe to cache

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

The full solution:

Move the ParserOptions::isSafeToCache check into ParserCache::save and in case it's not safe, increment a metric and log a debug log.

Addon1:

Make ParserOptions::isSafeToCache receive userOptions so that we don't skip the cache in case the non-cache-key non-canonical option is not even used

Addon2:

Make ParserOptions::isSafeToCache private and call it from ParserOptions::optionsHash, return null if non-cacheable. Needs preparing the extensions to receiving the null.

Change 644629 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Make ParserCache respect ParserOptions::isSafeToCache

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

Change 644665 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@wmf/1.36.0-wmf.20] Don't cache output that is not safe to cache

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

Change 644629 merged by jenkins-bot:
[mediawiki/core@master] Make ParserCache respect ParserOptions::isSafeToCache

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

Change 644665 abandoned by Jforrester:
[mediawiki/core@wmf/1.36.0-wmf.20] Don't cache output that is not safe to cache

Reason:
wmf.21 is everywhere now.

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

Change 644605 abandoned by Ppchelko:
[mediawiki/core@master] Don't cache output that is not safe to cache

Reason:
Fixed generically in PArserCache

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

Pchelolo claimed this task.

Please reopen if reoccurs