On mobile we shift the lead paragraph above the infoboxes for readability reasons. This code relies on the assumption that the infobox element has no parents. It seems there are a significant amount of pages that break this assumption and thus are not rendering as well as they could do.
Logging has been limited to English Wikipedia to reduce the amount of events logged [[ https://logstash.wikimedia.org/app/kibana#/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now%2Fw,mode:quick,to:now%2Fw))&_a=(columns:!(_source),index:'logstash-*',interval:d,query:(query_string:(analyze_wildcard:!t,query:'message:%22Found%20infobox%20wrapped%20with%20container%20on%22')),sort:!('@timestamp',desc)) | previously there were 200K log messages a day relating to this ]]
We would like to fix the underlying issues in templates (if possible) and then remove the logging altogether.
== Background
In {T149884} (associated epic: T143139), we added logging to in `MobileFormatter#moveFirstParagraphBeforeInfobox` so that we could know if and where nested infoboxes were occurring on the Wikipedias.
== Open Questions
# Is this logging still necessary? We have a good list defined in {T162713} and {T163805}.
= Analysis of problematic pages
== English Wikipedia
[] Taxobox
* https://en.m.wikipedia.org/wiki/Template:Taxobox seems to cause the most problems
Impacted pages:
* https://en.m.wikipedia.org/wiki/Lagocephalus_sceleratus
* https://en.m.wikipedia.org/wiki/Frostetola
* https://en.m.wikipedia.org/wiki/Polygonia_c-album
Talk page: https://en.m.wikipedia.org/wiki/Template_talk:Taxobox#Why_are_we_wrapping_the_infobox_inside_a_div.3F
[] Module:Infobox_military_conflict
https://en.m.wikipedia.org/wiki/Template:Infobox_military_conflict causes various problems
Impacted pages:
* https://en.m.wikipedia.org/wiki/Siege_of_Warsaw_(1939)
* https://en.m.wikipedia.org/wiki/Sherman%27s_March_to_the_Sea
* https://en.m.wikipedia.org/wiki/Race_to_the_Sea
* https://en.m.wikipedia.org/wiki/World%20War%20II#/editor/0
* https://en.m.wikipedia.org/wiki/Template:Infobox NFL biography
* https://en.m.wikipedia.org/wiki/Operation_Chihuahua
Talk page: https://en.wikipedia.org/wiki/Module_talk:Infobox_military_conflict#Why_are_campaignbox_infoboxes_wrapped.3F
[] Stack template (when used around infobox)
* https://en.m.wikipedia.org/wiki/O.%20J.%20Simpson
* https://en.m.wikipedia.org/wiki/Beijing#/editor/0 uses {{stack begin}}
* https://en.m.wikipedia.org/wiki/Xi'an uses {{stack begin}}
= Other wikis:
https://de.m.wikipedia.org/wiki/Template:Infobox Musikalbum
https://de.m.wikipedia.org/wiki/Kneipenterroristen_(Album)
== AC
[] Remove [the logging from `MobileFormatter#moveFirstParagraphBeforeInfobox`](https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/60086d0c/includes/MobileFormatter.php#L289-L295).
[] Remove the `MFLogWrappedInfoboxes` configuration variable and its documentation.