Page MenuHomePhabricator

WikiEditor blank when CodeMirror enabled in RTL language (when there is line numbering)
Closed, InvalidPublicBUG REPORT

Description

What is the problem?

When using WikiEditor (2010) in an RTL language on a page which has line numbering and I enable CodeMirror, the WikiEditor textarea is blank.

Pages which don't have line numbering appear to work fine.

Therefore, depending how the wiki is configured, I will not be able to edit some or all pages in RTL using CodeMirror. I have to use the regular editor.

This will affect Template pages on all wikis and all pages on:

  • group0 wikis
  • cawiki
  • dewiki
  • wikitech

This may be related to recent work on Realtime Preview (see T303767). It occurs either when I have it enabled or disabled (via beta features).

Steps to reproduce problem
  1. https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Template:Top_icon&action=edit&uselang=he
  2. Enable CodeMirror (by clicking the little pen icon)

Expected behavior: You should see the wikitext
Observed behavior: The wikitext disappears

Environment

Wiki(s): https://en.wikipedia.beta.wmflabs.org MediaWiki 1.39.0-alpha (2425e00) 06:50, 11 April 2022.
Editor: WikiEditor 0.5.3 (c124ea6) 06:14, 11 April 2022.

Screenshots

codemirror_rtl_no_text.png (1,701×761 px, 29 KB)

Event Timeline

MusikAnimal closed this task as Invalid.EditedApr 15 2022, 2:04 AM
MusikAnimal subscribed.

As discussed on Slack, this shouldn't be a problem on our cluster since CodeMirror is disabled on pages in an RTL language. For example תבנית:מיזמים on Beta Hebrew Wikipedia. But thanks for raising this anyway, Dom! I suspect when we upgrade to CodeMirror 6 (T259059) and finally have RTL support, this bug may resurface, but as I understand it the line numbering is a plugin that is incompatible with v6 (along with all the other plugins) so regardless we will be reevaluating this feature when that times.