Spend 4 hours at most.
[[ https://logstash.wikimedia.org/app/kibana#/dashboard/Fatal-Monitor?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-1h,mode:quick,to:now))&_a=(filters:!(('$state':(store:appState),bool:(must:!((terms:(level:!(NOTICE,INFO,WARNING))),(term:(type:mediawiki)))),meta:(alias:!n,disabled:!f,index:'logstash-*',key:bool,negate:!t,value:'%7B%22must%22:%5B%7B%22terms%22:%7B%22level%22:%5B%22NOTICE%22,%22INFO%22,%22WARNING%22%5D%7D%7D,%7B%22term%22:%7B%22type%22:%22mediawiki%22%7D%7D%5D%7D'))),options:(darkTheme:!f),panels:!((col:1,id:Top-20-Hosts,panelIndex:2,row:3,size_x:9,size_y:2,type:visualization),(col:1,columns:!(type,level,wiki,host,message),id:Default-Events-List,panelIndex:3,row:10,size_x:12,size_y:23,sort:!('@timestamp',desc),type:search),(col:1,id:Fatal-Events-Over-Time,panelIndex:4,row:1,size_x:12,size_y:2,type:visualization),(col:1,id:Trending-Messages,panelIndex:5,row:5,size_x:12,size_y:5,type:visualization),(col:10,id:MediaWiki-Versions,panelIndex:6,row:3,size_x:3,size_y:2,type:visualization)),query:(query_string:(analyze_wildcard:!t,query:'(type:mediawiki%20AND%20(channel:exception%20OR%20channel:wfLogDBError))%20OR%20type:hhvm%20AND%20message:MobileFrontend')),title:'Fatal%20Monitor',uiState:(P-2:(spy:(mode:(fill:!f,name:!n)),vis:(legendOpen:!f)),P-4:(spy:(mode:(fill:!f,name:!n)),vis:(colors:(exception:%23C15C17,hhvm:%23BF1B00))),P-6:(spy:(mode:(fill:!f,name:!n)),vis:(legendOpen:!t)))) | 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
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
{F4881392}
{F4881393}
== (Expected) Outcomes
[x] We log the title of the article that's being parsed in an easily found error message.
* e.g. prefix it with T151838.
[] //Stretch// 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
== QA
This task can't be QA'd directly and can skip the **Needs QA** column.