Page MenuHomePhabricator

about=null entries on <figure> elements (because of dom-fragment reuse)
Closed, ResolvedPublic

Description

From WP:VE/F page (http://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&oldid=567413854)


Following a report on frwiki, I tried a simple modification by changing a text into a wikilink. VE messed up the article by duplicating parts (not even complete parts), see [http://fr.wikipedia.org/w/index.php?title=Gen%C3%A8ve&diff=95604102&oldid=95601955 diff]. It seems to be reproducible on this article. --[[User:NicoV|NicoV]] <sup>([[:fr:Discussion Utilisateur:NicoV|Talk on frwiki]])</sup> 15:51, 6 August 2013 (UTC)

A cursory investigation back then revealed that this could be because of incorrect DOM fragment reuse for figures which all had about=null.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=47326

Details

Reference
bz53071

Related Objects

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:00 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz53071.

One more instance now reported on itwiki:

  1. Diff: https://it.wikipedia.org/w/index.php?title=Trieste&diff=prev&oldid=61046913 (see 2 images duplicated further down)
  1. Open https://it.wikipedia.org/w/index.php?title=Trieste&oldid=61038476&veaction=edit in Chrome and dump Parsoid HTML in the console "copy(ve.init.mw.targets[0].originalHtml)" You will see a lot of <figure> tags with about=null

Change 82676 had a related patch set uploaded by GWicke:
Bug 53071: Handle about-less images better

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

Change 82676 merged by jenkins-bot:
Bug 53071: Handle about-less images better

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

This patch addresses the about="null" issue.

I am however not 100% sure that this is indeed the root cause for bug 53071. A
scenario I can think of is this:

  1. getAboutSiblings returned sibling nodes without about attributes
  2. for some reason that is unclear to me those were *not* assigned about="null" attributes in unpackDOMFragments on reuse
  3. the serializer faithfully serialized out the new content

The diffs in
https://it.wikipedia.org/w/index.php?title=Trieste&diff=prev&oldid=61046913
would support this, as the entire image link is duplicated.

The diff in https://it.wikipedia.org/w/index.php?title=Dalmine&oldid=61238456
however looks like an incomplete image duplication.

There are several figure-related DSR errors when parsing that page of this pattern:

WARNING: DSR inconsistency: cs/s mismatch for node: FIGURE s: 22704; cs: 22817 WARNING: DSR inconsistency: cs/s mismatch for node: FIGURE s: 18478; cs: 18586

Those warnings are still there when parsing the page with fragment reuse
enabled, so this might be a different issue.

Based on IRC discussions, we figured that there are different bugs that are interaction and producing the same end result -- duplication in some cases. The Trieste bug could be a result of a bad parse of ''[[Foo|''bar'']]'' and interaction of the about=null issue. Dalmine seems to be something else.

You guys sure you wanted me on the CC for this bug? I'm just making sure it wasn't another "Dan" :)

Sorry, I linked the wrong bug which is how you got the email ;-) .. fixing it.

https://gerrit.wikimedia.org/r/#/c/83216/ fixes the dsr inconsistency warnings reported in this bug.

Is this still happening in production?

I am marking this resolved. Haven't seen any reports about this in a while.