Page MenuHomePhabricator

Paste regressions when rebuilding keyIndexes
Closed, ResolvedPublic

Description

Context:

With the https://gerrit.wikimedia.org/r/1202126 we made a change that potentially affects a few use cases see also T408535: Look into the failing tests when rebuilding keyIndexes. While smoke testing this on the beta cluster I could see the following regressions in some edge cases.

Regressions:
  • Start with the following Wikitext
<ref>Autoname Book</ref>

<ref name="ldr" />

<ref details="page 1" name="mainplus">Main+details</ref>

<references>
<ref name="ldr">LDR Book</ref>
</references>
  • Open the page for editing in VE in one tab
  • Open the page for editing in VE in another tab
Inline ref:
  • Select and copy the first ref [1] from the 1st tab
  • Pasted it twice next to the [1] in the 2nd tab

What happens:

  • As soon as we paste the 2nd time one of the added footnotes shows as [undefined]

What should happen:

  • Both footnotes should show a number, different from the original

image.png (266×360 px, 12 KB)

LRD ref ( no regression ):
  • Start over
  • Select and copy the secound ref [2] from the 1st tab
  • Pasted it twice next to the [2] in the 2nd tab
  • This behaves as intended
Sub-ref:
  • Start over
  • Select and copy the third ref [3] from the 1st tab
  • Pasted it twice next to the [3] in the 2nd tab

What happens:

  • As soon as we paste the 2nd time one of the added footnotes shows as [undefined]

What should happen:

  • Both footnotes should show a number, different from the original

image.png (266×360 px, 12 KB)

Notes:
  • Generally it seems that named references do not have that issue. It seems to affect reference nodes with auto/ listKey
  • From some initial pocking around it seems that ve.dm.MWReferenceNode.static.remapInternalListKeys does not work here in all cases.

Event Timeline

Change #1219812 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Replace broken [undefined] rendering with […]

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

I think that this issue is a cause for this ticket: T412343.

Change #1234342 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[VisualEditor/VisualEditor@master] Revert "Maintain keyIndexes when rebuilding InternalList"

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

Change #1234342 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Revert "Maintain keyIndexes when rebuilding InternalList"

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

Change #1237377 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (3e09937e9)

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

Change #1237377 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (3e09937e9)

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

Change #1219812 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Replace broken [undefined] rendering with […]

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