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 previously there were 200K log messages a day relating to this. Limiting to English drops this to 90K.
We would like to fix the underlying issues in templates (if possible) and then remove the logging altogether.
Background
In T149884: Log instances of infoboxes being wrapped in containers (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: [spike 2hrs] Evaluate result of "Log instances of infoboxes being wrapped in containers" (T149884 ) and T163805: Adjustments to how we log troublesome infoboxes and move lead paragraph.
Analysis of problematic pages
English Wikipedia problems
- 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
Should be fixed but awaiting confirmation
- 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
- 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.