Page MenuHomePhabricator

Error thrown when deleting a heading next to a table (Unbalanced set of replace operations found)
Open, MediumPublic0 Estimated Story Points

Description

  1. Open tables.html in the demo page
  2. Select from the left of 'Tables' into the table itself. Your DM range should be 1-22 (from inside the first heading to oustside the second heading)
  3. Press delete or backspace

Uncaught Error: Unbalanced set of replace operations found

Event Timeline

Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.

The requirement is slightly more complicated than the ticket subject suggests -- it requires two headings. They don't have to be directly adjacent, but your selection has to start at the beginning of one heading, then extend over a separate heading which is immediately followed by a table.

This produces a transaction which tries to remove everything but the opening [heading] tag, including the closing [heading] tag of the last heading, leaving the document unbalanced and so erroring.

Open tables.html in the demo page

Where's the demo page? What's it for compared to, say, editing on a test wiki?

Also un-assigning @DLynch since this hasn't been touched in nearly a year. :-)

• Deskana changed the point value for this task from 1 to 0.

I tried reproducing this and couldn't, but I'm not entirely certain I was doing it right. I will guess that this was fixed, and someone can reopen if I am wrong. :-)

Still happens, I'm afraid:

image.png (492×538 px, 59 KB)

• Deskana lowered the priority of this task from High to Medium.Sep 12 2017, 7:59 PM

@DLynch Thanks! I'll reprioritise then.

Yeah, it's a really specific situation required to trigger it, so lower priority seems fair.

DLynch subscribed.

I've verified that this is still happening, but I'm not actively looking at it.

Jdlrobson renamed this task from Error thrown when deleting a heading next to a table to Error thrown when deleting a heading next to a table (Unbalanced set of replace operations found).Sep 1 2020, 6:31 PM

The exception is the same, but I don't think the cause is the same. The page being editing (ContentTranslated) in error logs was https://en.wikipedia.org/wiki/Marc_Fesneau, which doesn't have any tables.

We should file a separate task for the production error.

I can still reproduce this. In order to get the selection I had to drag over the first lines of text and then shift-right once to extend the selection from 1-21 to 1-22 (I couldn't do it with mouse alone).

Uncaught Error: Unbalanced set of replace operations found
    process ve.dm.TransactionProcessor.js:102
    commit ve.dm.Document.js:371