Page MenuHomePhabricator

[Regression] Automatically added reference lists do not have unique about attributes
Closed, ResolvedPublic

Description

Steps to reproduce:

1.Open a page with VE that has some references and a reference list
2.Try to open the reference list by clicking on it

Observed Result:
The dialog does not open , but a broken UI, following error in the console:
TypeError: this.node.getAttribute(...).body is undefined
Uncaught TypeError: Cannot read property 'extsrc' of undefined

Screen_Shot_2015-02-20_at_4.27.40_PM.png (745×1 px, 229 KB)

Event Timeline

Ryasmeen raised the priority of this task from to Needs Triage.
Ryasmeen updated the task description. (Show Details)
Ryasmeen added a project: VisualEditor.
Ryasmeen subscribed.
Ryasmeen triaged this task as Unbreak Now! priority.Feb 21 2015, 12:28 AM
Ryasmeen set Security to None.
Catrope renamed this task from [Regression pre-wmf19]Cannot open Reference List dialog, getting this error in the console "TypeError: this.node.getAttribute(...).body is undefined" to [Regression] Automatically added reference lists do not have unique about attributes.Feb 21 2015, 12:35 AM

This is caused by a bug in Parsoid. The page in question ( http://en.wikipedia.beta.wmflabs.org/wiki/Newpageachrortest?veaction=edit ) contains references in two groups, so two reference lists are added automatically. However, these two reference lists have the same about attribute (which is wrong) and are adjacent, so VE follows the about grouping protocol and groups them together as one node.

<ol class="references" typeof="mw:Extension/references" about="#mwt31" data-parsoid="{&quot;dsr&quot;:[1629,1629,0,0]}" data-mw="{&quot;name&quot;:&quot;references&quot;,&quot;attrs&quot;:{}}">
...
</ol>
<ol class="references" typeof="mw:Extension/references" about="#mwt31" data-parsoid="{&quot;dsr&quot;:[1629,1629,0,0],&quot;group&quot;:&quot;group&quot;}" data-mw="{&quot;name&quot;:&quot;references&quot;,&quot;attrs&quot;:{&quot;group&quot;:&quot;group&quot;}}">
...
</ol>

Change 192044 had a related patch set uploaded (by Subramanya Sastry):
T90309: Ensure that implicitly-added <references> output have unique ids

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

Patch-For-Review

Change 192044 merged by jenkins-bot:
T90309: Ensure that implicitly-added <references> output have unique ids

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

Verified the fix in Betalabs, test2 and en.wiki