Apparently there is something broken with the automatic moving of the first paragraph of article above infoboxes on mobile (T143139): if you look at this article on dewiki, it is actually the second paragraph to be put in front, not the first one, resulting in a very confusing lead section (it is the same on most, but not all, dewiki articles with infoboxes I have checked). I do not encounter this behaviour on enwiki, so no idea what the cause is.
Description
Related Objects
- Mentioned In
- T266341: Moving article lead breaks with deduplicated TemplateStyles
- Mentioned Here
- T262093: MoveLeadParagraphTransformInfobox should be rewritten to be more similar to mobile apps (allow more flexibility in lead paragraph identification)
T188825: Infobox relocation ends up messing up paragraphs placing
T143139: [EPIC] Move first paragraph <p> above infobox template on small screens
Event Timeline
Details:
- The current heuristic for finding the first non-empty paragraph (and moving it to the top if necessary) works fine for >90% of all pages (e.g. most random pages), but sometimes fails:
- Sometimes it moves the second paragraph to the top, not the first, and thus swaps the paragraphs. This is quite confusing for readers.
- Sometimes it leaves the Infobox at the top and moves no paragraph to the top. This is inconvenient for readers.
- It looks like these problems often (but not always) occur when the wikitext contains an image or an infobox before the first paragraph.
- I couldn't find any articles with these problems in other Wikipedias than dewiki (but I only looked at about ten articles in non-de wikis).
- The problem is present in the HTML delivered by the server, so it's not a CSS or JavaScript problem.
Examples:
- Paragraphs swapped on all pages with Infobox Bundesland
- Paragraphs swapped on all pages with Infobox französische Region
- Ca. 90% Infobox before first paragraph: pages with Infobox Staat; Paragraphs swapped: Liechtenstein, Deutschland, Tuvalu ...; OK: Bermuda, ...
- Ca. 50% OK: pages with Infobox Ort in den Vereinigten Staaten; Paragraphs swapped: San Diego, Washington, D.C., Los Angeles, Pittsburgh, Seattle, Denver, San Francisco, ...; Infobox before first paragraph: Albany (New York), Anchorage, Boston, Houston, ...
- Ca. 70% OK: pages with Infobox Gemeinde in Deutschland; Paragraphs swapped: Bielefeld, Bayreuth, Dortmund, Chemnitz, Leipzig, ...; Infobox before first paragraph: Eppstein, Friedrichshafen...
- Ca. 80% OK: pages with Infobox Sprache; Paragraphs swapped: Finnische Sprache, Färöische Sprache, Französische Sprache, ...; Infobox before first paragraph: Akkadische Sprache, Bengalische Sprache, ...
- Ca. 90% OK: pages with Infobox Ort in Russland; Paragraphs swapped: Sankt Petersburg, Moskau, Kaliningrad, ...; Infobox before first paragraph: Tscheljabinsk, Krasnojarsk, ...
- Pages without Infobox (but with images before first paragraph) on which first two paragraphs are swapped: Atom, Ingenieur, Judentum, Symbiose, Botanik, Triple Entente, Wladimir Wladimirowitsch Putin, ...
Also see: Wikipedia:Technik/Werkstatt (in German), Wikipedia:Fragen_zur_Wikipedia (in German)
Can this be triaged as Unbreak now? High profile pages with 1000s of daily views are affected such as https://de.m.wikipedia.org/wiki/Deutschland
Over 50% of page views are now mobile.
This is very confusing, and often people only read the first paragraph of an article. In such cases, this bug will give them distorted view of the article
Verified locally that this fix made after the UBN during last weeks train will resolve this issue: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/627892
I'll schedule that for a backport asap, so we don't have to wait until Thursday.
Sounds good. When is this going to be live on dewiki? I'd like to have a look at some of the pages I listed above. Will I have to purge the pages after the fix is deployed?
Deployment is happening now. I don't think you would need to re-parse the wikitext, as the lead paragraph transform happens after that.
For reference, the cause of this issue was inline templates which use TemplateStyles in lead paragraph. The logic which "ingores" the TemplateStyles tag for the purpose of checking if a paragraph is empty was broken during a UBN patch. As de.wiki uses TemplateStyles on {{IPA}}, this was triggering on lots of pages.
This has been deployed.
@Chrisahn I tested the pages you listed and they all seem to be fine.
Some of the issues you identified are pre-existing issues such as the paragraph not being hoisted on https://de.m.wikipedia.org/wiki/Eppstein. This would be fixed by T262093, which is currently in review.