Page MenuHomePhabricator

Parsoid: New adjacent references are getting about grouped
Closed, ResolvedPublic


The following code has four references, but only renders three:

<p><span typeof="mw:Extension/ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;No name 2&quot;},&quot;attrs&quot;:{&quot;name&quot;:&quot;:3&quot;}}" about="#mwt13" class="reference" id="cite_ref-4-0" rel="dc:references" data-parsoid="{&quot;dsr&quot;:[110,130,5,6]}"></span><span typeof="mw:Extension/ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;No name 3&quot;},&quot;attrs&quot;:{&quot;name&quot;:&quot;:4&quot;}}" about="#mwt14" class="reference" id="cite_ref-5-0" rel="dc:references" data-parsoid="{&quot;dsr&quot;:[130,150,5,6]}"></span><span typeof="mw:Extension/ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;No name 2&quot;},&quot;attrs&quot;:{&quot;name&quot;:&quot;:3&quot;}}"></span><span typeof="mw:Extension/ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;No name 3&quot;},&quot;attrs&quot;:{&quot;name&quot;:&quot;:4&quot;}}"></span></p>

It was created by duplicating two unnamed references.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:55 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz53434.

Ed: I dont understand the bug ... Is this a problem with the parse output from Parsoid or is the problem with how Parsoid serializes edited HTML in VE? Can you clarify and provide wikitext snippet, if the former?

It's a problem with serialization. If we provide two adjacent references that are clones of existing references (via copy/paste) and both don't have an about attribute, Parsoid seemingly considers them both to be in the same about group with about=undefined and drops all but the first.

Minor nitpick: it would be null. But otherwise Roan's hunch sounds very plausible to me.

This (or a closely-related bug) are really badly breaking normal editing in VE, which we thought we had fixed with bug 52228 - namely, making multiple sequential references.

Minimum spanning test:

Input HTML+RDFa:

<p>Foo<span typeof="mw:Extension/ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;Bar&quot;},&quot;attrs&quot;:{}}"><a href="#cite_note-1">[1]</a></span><span typeof="mw:Extension/ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;Baz&quot;},&quot;attrs&quot;:{}}"><a href="#cite_note-1">[1]</a></span></p>

Expected WT:


Actual WT:


Change 81886 had a related patch set uploaded by GWicke:
Bug 53434: Only skip about siblings if about is actually set

Change 81886 merged by Arlolra:
Bug 53434: Only skip about siblings if about is actually set

  • Bug 53334 has been marked as a duplicate of this bug. ***

Not sure if has been rt-tested and deployed yet.

Deployed to production this morning and verified fix.