Context
During T149389, we discovered that there exist pages whose infoboxes are wrapped in one or more containers. Since this was a warning being triggered in production, we fixed the bug by ignoring these infoboxes.
Before we can provide the same treatment for all pages, we need to know how many pages have infoboxes wrapped in containers and which templates produce them.
AC
- If there's an infobox in the lead section and it's inside a container, then log the title and revision of the page.
- This behaviour is feature flagged.
Hints
The cheapest way to detect if the infobox element is inside a container is to test whether its parent is the section container, i.e.
$infobox = $infoboxAndParagraphs->item( 0 ); if ( $leadSectionBody !== $infobox->parentNode ) { // The game is afoot... }
Resources
- Our production logging configuration.
- N.B. that if we log to an undefined channel, e.g. "MobileFrontend", then it'll be logged to Logstash with a level of DEBUG.