Since this bug appeared while implementing the lead paragraph moving there is concern the number of errors may escalate upon rolling this out everywhere.
logstash is complaining:
Warning: Invalid State Error in /srv/mediawiki/php-1.29.0-wmf.3/extensions/MobileFrontend/includes/MobileFormatter.php on line 667 Warning: Invalid State Error in /srv/mediawiki/php-1.29.0-wmf.3/extensions/MobileFrontend/includes/MobileFormatter.php on line 673
This seems to relate to code in MobileFormatter::makeHeadingsEditable where we call setAttribute
Stack trace:
0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.29.0-wmf.18/extensions/MobileFrontend/includes/MobileFormatter.php(672): DOMElement->setAttribute(string, string)
#2 /srv/mediawiki/php-1.29.0-wmf.18/extensions/MobileFrontend/includes/MobileFormatter.php(178): MobileFormatter->makeHeadingsEditable(array)
#3 /srv/mediawiki/php-1.29.0-wmf.18/extensions/MobileFrontend/includes/MobileFrontend.body.php(72): MobileFormatter->filterContent(boolean, boolean, boolean, boolean)
#4 /srv/mediawiki/php-1.29.0-wmf.18/extensions/MobileFrontend/includes/MobileFrontend.hooks.php(197): ExtMobileFrontend::DOMParse(OutputPage, string)
#5 /srv/mediawiki/php-1.29.0-wmf.18/includes/Hooks.php(186): MobileFrontendHooks::onOutputPageBeforeHTML(OutputPage, string)
#6 /srv/mediawiki/php-1.29.0-wmf.18/includes/OutputPage.php(1874): Hooks::run(string, array)
#7 /srv/mediawiki/php-1.29.0-wmf.18/includes/OutputPage.php(1892): OutputPage->addParserOutputText(ParserOutput)
#8 /srv/mediawiki/php-1.29.0-wmf.18/includes/page/Article.php(537): OutputPage->addParserOutput(ParserOutput)
#9 /srv/mediawiki/php-1.29.0-wmf.18/includes/actions/ViewAction.php(71): Article->view()
#10 /srv/mediawiki/php-1.29.0-wmf.18/includes/MediaWiki.php(497): ViewAction->show()
#11 /srv/mediawiki/php-1.29.0-wmf.18/includes/MediaWiki.php(291): MediaWiki->performAction(Article, Title)
#12 /srv/mediawiki/php-1.29.0-wmf.18/includes/MediaWiki.php(860): MediaWiki->performRequest()
#13 /srv/mediawiki/php-1.29.0-wmf.18/includes/MediaWiki.php(521): MediaWiki->main()
#14 /srv/mediawiki/php-1.29.0-wmf.18/index.php(43): MediaWiki->run()
#15 /srv/mediawiki/w/index.php(3): include(string)
#16 {main}Frequency: ~20 per day
(Expected) Outcomes
- We log the title of the article that's being parsed in an easily found error message.
- e.g. prefix it with T151838.
- The nature of the error is well understood and the error itself is fixed.
Example Articles
https://en.wikipedia.org/wiki/Schopenhauer
https://en.wikipedia.org/wiki/Bahri_dynasty
https://es.wikipedia.org/wiki/Altos_Hornos_de_M%C3%A9xico
Replication instructions
- Ensure lazy loaded references is enabled in beta mode:
$wgMFLazyLoadReferences = array( 'useMobileViewApi' => true, 'base' => false, 'beta' => true, ); $wgMFRemovableClasses = [ 'base' => [ '.navbox', '.nomobile' ], 'beta' => [ '.navbox', '.nomobile' ], 'HTML' => [], ];
- Check out the magic patch to load content directly from enwiki.
- Navigate to /wiki/Arthur_Schopenhauer?mobileaction=beta on your development wiki to see the error.
QA
This task can't be QA'd directly and can skip the Needs QA column.

