Page MenuHomePhabricator

Reference previews broken with umlauts on named references
Closed, ResolvedPublic3 Story Points

Description

Bug report
The reference preview is not showing at all when there's an umlaut in the name of a named reference. See for example reference #2 on
https://de.wikipedia.org/wiki/Monchique# cite_note-Fläche-2

Acceptance Criteria

  • Named references with characters outside of 7 Bit-ASCII (like ä) don't affect whether referencepreviews are shown or not

Event Timeline

Lea_WMDE triaged this task as Normal priority.Apr 10 2019, 3:43 PM
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE set the point value for this task to 3.
awight claimed this task.EditedApr 19 2019, 5:15 PM
awight added a subscriber: awight.

I was able to reproduce the bug locally, will see how far I can debug.

Correction to my previous comment: I was able to reproduce the bug where the Fläche citation won't appear on de.wikipedia.org, but when I set up the test case locally this popup rendered correctly. Maybe that's an interesting clue? I'll play around to see what the difference might be between my configuration and dewiki production.

Noting that I've checked out these extensions at versions matching dewiki production, and still don't see this bug locally.

  • Cite
  • PageImages
  • Popups
  • TextExtracts

These edits verify that the problem only happens when a reference name includes high bits (or something), on dewiki. Tested with diaeresis "a" and a latin-extended character.
https://de.wikipedia.org/w/index.php?title=Benutzer:Adamw/Monchique&diff=prev&oldid=187715097
https://de.wikipedia.org/w/index.php?title=Benutzer:Adamw/Monchique&diff=next&oldid=187715097

Okay, here's an extremely obvious configuration difference which must allow my local popups to work: the fragment is URL-encoded,

http://dev.wiki/index.php/Main_Page#cite_note-Fl.C3.A4che-2

Interestingly, on my local the titles are not encoded like this, only the fragment is.

I'm now able to actually reproduce locally using this config:

$wgFragmentMode = ['html5', 'legacy'];

Next step is to write a QUnit test to exercise the demon.

Change 505299 had a related patch set uploaded (by Awight; owner: Adam Wight):
[mediawiki/extensions/Cite@master] [WIP] Test rendering of high-ascii reference names

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

Change 505381 had a related patch set uploaded (by Awight; owner: Adam Wight):
[mediawiki/extensions/Popups@master] [WIP] decode fragment to match named references

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

Looks like this extra URI decode is all we'll need.

Change 505299 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Test rendering of high-ascii reference names

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

Change 505381 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Decode fragment, needed for multilingual named references

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

For testing see second footnote. The named reference contains an umlaut now:
https://en.wikipedia.beta.wmflabs.org/wiki/User:Fisch-WMDE/TestCite

Lea_WMDE closed this task as Resolved.May 6 2019, 1:39 PM
Lea_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2019-04-17 board.