Last modified: 2013-10-03 21:48:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56341, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54341 - VisualEditor: [Regression] Unnamed references get their names corrupted
VisualEditor: [Regression] Unnamed references get their names corrupted
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: Highest normal
: VE-deploy-2013-09-26
Assigned To: Roan Kattouw
:
: 54445 54654 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-19 18:04 UTC by Roan Kattouw
Modified: 2013-10-03 21:48 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2013-09-19 18:04:44 UTC
https://en.wikipedia.org/w/index.php?title=Matt_Chandler_%28pastor%29&curid=37214846&diff=573675359&oldid=571858677

For some reason, multiple different unnamed references all get name=":3" there.
Comment 1 Roan Kattouw 2013-09-19 21:14:02 UTC
Isolated test case: https://en.wikipedia.org/wiki/User:Ed_g2s/Sandbox4

Diagnosis:

The automatically generated names are based on the number of distinct references in the page up to that point, indexed at zero. The first unnamed <ref> tag is the 4th distinct reference on the page (it's preceded by two :1s, a :3 and a :0), so its autogenerated name is :3. However, there so happens to already be a literal <ref name=":3"> on the page, so we get a naming collision and the whole thing goes to hell.

In practice, this situation can only arise after multiple iterations of duplicating unnamed references with VE (which adds <ref name=":n"> tags to the source), then removing or reordering references so the ref tags are aligned exactly right for this bug to occur.
Comment 2 Gerrit Notification Bot 2013-09-19 23:53:22 UTC
Change 85144 had a related patch set uploaded by Catrope:
Failing test for <ref name=":3"> bug

https://gerrit.wikimedia.org/r/85144
Comment 3 Gerrit Notification Bot 2013-09-20 12:27:57 UTC
Change 85144 merged by jenkins-bot:
Prevent naming collisions when generating unique reference names

https://gerrit.wikimedia.org/r/85144
Comment 4 Gerrit Notification Bot 2013-09-23 23:03:01 UTC
Change 85780 had a related patch set uploaded by Catrope:
Prevent naming collisions when generating unique reference names

https://gerrit.wikimedia.org/r/85780
Comment 5 Gerrit Notification Bot 2013-09-23 23:03:37 UTC
Change 85781 had a related patch set uploaded by Catrope:
Prevent naming collisions when generating unique reference names

https://gerrit.wikimedia.org/r/85781
Comment 6 Gerrit Notification Bot 2013-09-23 23:04:49 UTC
Change 85780 merged by jenkins-bot:
Prevent naming collisions when generating unique reference names

https://gerrit.wikimedia.org/r/85780
Comment 7 Gerrit Notification Bot 2013-09-23 23:06:30 UTC
Change 85781 merged by jenkins-bot:
Prevent naming collisions when generating unique reference names

https://gerrit.wikimedia.org/r/85781
Comment 8 James Forrester 2013-09-26 18:29:45 UTC
*** Bug 54654 has been marked as a duplicate of this bug. ***
Comment 9 Elitre 2013-09-30 12:03:57 UTC
James,
I think it can be confusing that the name and the number of a reference do not match, although the links work.
See https://en.wikipedia.org/w/index.php?title=User%3AElitre_%28WMF%29%2FSandbox&diff=575128343&oldid=575128003 (the reference #2 gets a ref name:3).
Comment 10 James Forrester 2013-10-03 21:48:41 UTC
*** Bug 54445 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links