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 raised the priority of this task from to High.
Aklapper updated the task description. (Show Details)
Aklapper added a project: Cite.

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

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

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?

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

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