Page MenuHomePhabricator

<ref> in section headings shown as raw text in TOC
Closed, ResolvedPublic

Description

Reported by <rotpunkt> on #wikimedia-dev.

<rotpunkt> Hi, there is a bug with tag ref, see table of content in http://en.wikipedia.org/wiki/Ambernac.
<andre> An ?action=purge on https://en.wikipedia.org/wiki/Allenwiller shows the same error now.
<rotpunkt> andre after refreshing the cache (action=purge) the problem is also there
<anomie> At a quick check, it looks like https://gerrit.wikimedia.org/r/#/c/181112/ slightly changed the behavior of <ref> in headings, and https://gerrit.wikimedia.org/r/#/c/213313/ really changed it in response to T99787

Event Timeline

Aklapper created this task.Jun 4 2015, 1:29 PM
Aklapper raised the priority of this task from to High.
Aklapper updated the task description. (Show Details)
Aklapper added a project: Cite.
Bultro added a subscriber: Bultro.Jun 4 2015, 8:07 PM
TTO added subscribers: TTO, Anomie.Jun 5 2015, 12:38 PM
Krenair added a subscriber: Krenair.Jun 7 2015, 3:47 PM
Isarra added a subscriber: Isarra.Jun 7 2015, 4:24 PM

Sounds like how bolds and italics in the headers apply to the toc, too, and any random html just shows up as source.

TheDJ added a subscriber: TheDJ.Jun 7 2015, 5:23 PM

Hmm, i think we have a similar problem with inline images that have references that are being put into the alt attribute. This is affecting quite a few images I suspect:

https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=665912801#Phantom_citations

Aklapper added a subscriber: greg.Jun 7 2015, 10:31 PM

Who in the MediaWiki Parser or Cite land could investigate this, as it gets more and more exposure on Village Pumps (e.g. de.wp)?

If nobody has a solution ready right now, it might be better to revert the two patches (https://gerrit.wikimedia.org/r/#/c/181112/ and https://gerrit.wikimedia.org/r/#/c/213313/). It seems that this is a pretty complicated issue (as indicated by the follow-up patch introducing new weirdnesses itself). Doing that will regress some old issues (mostly related to nested refs; linked on the changesets, see also recently closed tasks in Cite), but they are generally rare in practice and already well-known and documented (e.g. https://en.wikipedia.org/wiki/Wikipedia:Nesting_footnotes#What_does_not_work). Right now we have new and exciting bugs and features which are badly reacting with existing articles.

Let's take this opportunity to expand the test suite with newly discovered cases and try the patches again afterwards?

TheDJ added a comment.Jun 8 2015, 12:54 PM

To me this sounds like revert, swat deploy, write testcases, try again....

Elitre added a subscriber: Elitre.Jun 8 2015, 1:03 PM
He7d3r added a subscriber: He7d3r.Jun 8 2015, 2:18 PM

Change 216688 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "Do all of Cite's real work during unstrip" and followup

https://gerrit.wikimedia.org/r/216688

The revert will probably also fix T100477, which I just found. There is a pending patch there (https://gerrit.wikimedia.org/r/214116), but it has been stuck for a week and I doubt anyone's comfortable deploying it rather than doing a revert.

Change 216688 merged by jenkins-bot:
Revert "Do all of Cite's real work during unstrip" and followup

https://gerrit.wikimedia.org/r/216688

Change 216711 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "Do all of Cite's real work during unstrip" and followup

https://gerrit.wikimedia.org/r/216711

Change 216711 merged by jenkins-bot:
Revert "Do all of Cite's real work during unstrip" and followup

https://gerrit.wikimedia.org/r/216711

Elitre awarded a token.Jun 9 2015, 3:48 PM
Restricted Application added a subscriber: Luke081515. · View Herald TranscriptApr 28 2016, 2:00 AM