Page MenuHomePhabricator

VisualEditor pasting same ref code twice results in "undefined" link
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Use this ref code (or similar):

<ref>{{cite book |author=William Somerset Maugham |title=The Magician |publisher=Standard Ebooks |date=2021 |isbn= |lang=en |ol=37044427M |page= }}</ref>
  • Paste it to User:Nux/vedit.
  • ENTER, Paste it again.
  • ENTER, Paste it again.

What happens?:

In this order:

[1]
[undefined]
[2]

Note that in reality I use similar steps to duplicate a reference to a book, but change the page number in the next steps. I did stumble upon this bug earlier when editing a real article. I think it might have been Terry Gilliam. I just wasn't sure how to reproduce then.

What should have happened instead?:

[1]
[2]
[3]

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
enwiki

Other information (browser name/version, screenshots, etc.):

(*) I'm using a user script for OpenLibrary:
https://github.com/Eccenux/wiki-CytujOpenLibrary/

obraz.png (999×301 px, 23 KB)