ErrorException: PHP Notice: Undefined index: math
This seems to have started happening in .28. It's infrequent so far (.28 is rolled out to group0) but worth a look.
dancy | |
Jan 27 2021, 10:18 PM |
F34049047: image.png | |
Jan 27 2021, 10:27 PM |
ErrorException: PHP Notice: Undefined index: math
This seems to have started happening in .28. It's infrequent so far (.28 is rolled out to group0) but worth a look.
from /srv/mediawiki/php-1.36.0-wmf.28/includes/parser/ParserOptions.php(1475) #0 /srv/mediawiki/php-1.36.0-wmf.28/includes/parser/ParserOptions.php(1475): MWExceptionHandler::handleError(integer, string, string, integer, array) #1 /srv/mediawiki/php-1.36.0-wmf.28/includes/parser/ParserCache.php(376): ParserOptions->isSafeToCache(array) #2 /srv/mediawiki/php-1.36.0-wmf.28/includes/page/ParserOutputAccess.php(190): ParserCache->get(WikiPage, ParserOptions) #3 /srv/mediawiki/php-1.36.0-wmf.28/includes/page/Article.php(664): MediaWiki\Page\ParserOutputAccess->getCachedParserOutput(WikiPage, ParserOptions, NULL, integer) #4 /srv/mediawiki/php-1.36.0-wmf.28/includes/page/Article.php(575): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array) #5 /srv/mediawiki/php-1.36.0-wmf.28/includes/actions/ViewAction.php(74): Article->view() #6 /srv/mediawiki/php-1.36.0-wmf.28/includes/MediaWiki.php(532): ViewAction->show() #7 /srv/mediawiki/php-1.36.0-wmf.28/includes/MediaWiki.php(316): MediaWiki->performAction(Article, Title) #8 /srv/mediawiki/php-1.36.0-wmf.28/includes/MediaWiki.php(944): MediaWiki->performRequest() #9 /srv/mediawiki/php-1.36.0-wmf.28/includes/MediaWiki.php(548): MediaWiki->main() #10 /srv/mediawiki/php-1.36.0-wmf.28/index.php(53): MediaWiki->run() #11 /srv/mediawiki/php-1.36.0-wmf.28/index.php(46): wfIndexMain() #12 /srv/mediawiki/w/index.php(3): require(string) #13 {main}
I refreshed the request URL a couple of times, and this is the result.
It appears to happen at every pageview of that page when logged in. Sounds to be a blocker to me => UBN'ing.
Might have been caused by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/649719. Adding @Pchelolo. and @daniel
Change 659103 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Make ParserOptions::isSafeToCache more robust
The patch above should avoid the crash, but it's more of a workaround. Seems like 'Math' extension is using an unregistered parser option math, thus breaking the ParserOptions. This is a bug that needs to be fixed, Math should implement a ParserOptionsRegister hook and register its option.
Sorry, I was not aware of this. The registration has been removed in 2017
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/393650
There's not some very suspicious code left in Math, which records a 'math' option, which doesn't exist as far as ParserOptions are concerned, and then appends it to a rendering hash. Math should either use standard cache split mechanism (please ping me if you decide to do so) or not split the cache at all. Right now there's some backdoor magic going on.
Change 659103 merged by jenkins-bot:
[mediawiki/core@master] Make ParserOptions::isSafeToCache more robust
Change 659277 had a related patch set uploaded (by Brennen Bearnes; owner: Ppchelko):
[mediawiki/core@wmf/1.36.0-wmf.28] Make ParserOptions::isSafeToCache more robust
Change 659277 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.28] Make ParserOptions::isSafeToCache more robust
Mentioned in SAL (#wikimedia-operations) [2021-01-28T20:46:00Z] <brennen@deploy1001> Synchronized php-1.36.0-wmf.28/includes/parser/ParserOptions.php: Backport: [[gerrit:659103|Make ParserOptions::isSafeToCache more robust (T273120)]] (duration: 01m 08s)
Mentioned in SAL (#wikimedia-operations) [2021-01-28T20:49:32Z] <brennen@deploy1001> Synchronized php-1.36.0-wmf.28/tests/phpunit/includes/parser/ParserOptionsTest.php: Backport: [[gerrit:659103|Make ParserOptions::isSafeToCache more robust (T273120)]] (duration: 01m 07s)