Page MenuHomePhabricator

Editor interface stuck after removing former list-item paragraph
Closed, ResolvedPublic

Description

  1. Edit miminal test case.
  2. Select the first three bullet points ("One Two Three") in the first section ("One").
  3. Press "Shift-Tab" to turn them into paragraphs.
  4. Remove paragraph three ("Three.").

Actual result:

The editor has become stuck. The cursor can no longer be move upward in the document. No text selections or further edits can be made to the text in the first few paragraphs.

Kapture.gif (706×664 px, 299 KB)

Uncaught Error: Expected [{"type":"paragraph","internal":{"generated":"wrapper","metaItems":[]}},{"type":"/paragraph"}] but got [{"type":"paragraph","internal":{"metaItems":[]}},{"type":"/paragraph"}]

    checkEqualData
    checkEqualData
    applyTreeOperation
    applyTreeOperations
    process
    process
    commit
    changeInternal
    change
    change
    delete
    execute
    executeHandlersForKey
    onDocumentKeyDown

Event Timeline

Error message looks very much like T278064, but with a different property name. Maybe it just needs another special case?

I'm a little concerned that we keep adding special cases here, but I don't know how this should be solved properly.

Also, this error seems somewhat common in Logstash. It's a little hard to search for, but the query "Expected" AND "but got" returns a lot of stuff that looks alike. I'll have a look at it to see if there are any more cases: https://logstash.wikimedia.org/goto/0fcea2129c9e1293edb6c76a6ad799c2

image.png (539×2 px, 93 KB)

Logstash errors also contain cases with {"generated":"slug"} and {"generated":"empty"}, in addition to {"generated":"wrapper"}, but nothing else. So… maybe it is the last special case this time.

There are also errors of a different kind, following the pattern "Expected closing for X but got closing for Y". No idea what that is.

Change 720097 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[VisualEditor/VisualEditor@master] TreeModifier: Ignore .internal.generated when validating linear data

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

Change 720097 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] TreeModifier: Ignore .internal.generated when validating linear data

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

Change 720478 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

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

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

Change 720478 merged by jenkins-bot:

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

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

Krinkle assigned this task to matmarex.

Verified on mediawiki.org. Thanks!