Code block disappears in VE edit mode when specified language is unknown (mismatch read mode)
Closed, ResolvedPublic1 Story Points

Description

  1. Create new code block.
  2. Set language name to something unknown (e.g. "foozba'al").
  3. Enter some content below.
  4. Insert

Observe the page remaining empty, but an inspector appears nonetheless of a piece of content that is no longer focusable (e.g. once clicking away from this, it's hard to recover).

When reviewing changes, the inserted wikitext, however, is as expected and does contain the source code block. Saving the changes and looking at the saved page also shows the content normally.

The bug is not limited to newly inserted nodes. It also happens when changing an existing code block's language. Or when starting the edit session with a page that already contains such code block.

This is especially problematic because the list of lexers can change sometimes and that makes existing blocks rather hard to fix.

Krinkle created this task.Apr 28 2017, 9:49 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 28 2017, 9:49 PM

(Tagging as Regression as I'm fairly certain this wasn't the case a few weeks ago.)

Krinkle triaged this task as Normal priority.Apr 28 2017, 9:49 PM
Krinkle moved this task from Backlog to Accepted on the SyntaxHighlight board.
Jdforrester-WMF renamed this task from Code block disappears when specified language is unknown (mismatch read mode) to Code block disappears in VE edit mode when specified language is unknown (mismatch read mode).May 2 2017, 7:09 PM
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.

Change 365643 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/SyntaxHighlight_GeSHi@master] ce.MWSyntaxHighlightNode: Always generate node contents

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

Jdforrester-WMF closed this task as Resolved.Jul 17 2017, 9:21 PM
Jdforrester-WMF assigned this task to DLynch.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptJul 17 2017, 9:21 PM

Change 365643 merged by jenkins-bot:
[mediawiki/extensions/SyntaxHighlight_GeSHi@master] ce.MWSyntaxHighlightNode: Always generate node contents

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