Page MenuHomePhabricator

VisualEditor: Pasting in image caption with a repeated reference causes VE to crash
Open, MediumPublicBUG REPORT

Description

I found this bug while trying to swap the captions of two images, but it can be duplicated with just one image:

  1. Paste this into a page and save:

Example text<ref name=Ref1>Ref 1</ref>
[[File:Example.jpg|thumb|Example text.<ref name=Ref1/>]]

  1. Launch VE
  2. Click the image and open the Media settings dialogue
  3. Select all the caption text (Ctrl-A) and cut it out (Ctrl-X)
  4. Apply changes
  5. Reopen the Media settings dialogue
  6. Paste the caption text back in (Ctrl-V)
  7. Apply changes

VE will now hang on the Media settings dialogue. The dialogue will not complete and will not cancel. It is completely impossible to carry on editing, all the changes up to that point have to be discarded.

I am using FF32, Windows 7, Monobooks


Version: unspecified
Severity: major

Details

Reference
bz71214

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:51 AM
bzimport set Reference to bz71214.
Aklapper changed the subtype of this task from "Task" to "Bug Report".Feb 15 2022, 9:39 PM

VE will now hang on the Media settings dialogue. The dialogue will not complete and will not cancel. It is completely impossible to carry on editing, all the changes up to that point have to be discarded.

It seems like it no longer hangs this way now, although the steps still result in an exception ("TypeError: group.firstNodes[index2] is undefined" – same one as T259038) and mess up some internal state, which causes further exceptions whenever you do basically anything (although I'm not sure what's the impact on the users, I was still able to make changes and save the page despite them).