Page MenuHomePhabricator

Source editor on mobile gets stuck: TypeError: can't access property "register", ve.ui.wikitextCommandRegistry is undefined
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Reng_ane
Sun, Sep 13, 5:55 PM
Referenced Files
F103082910: 2026-09-15_12-51-51.mp4
Tue, Sep 15, 10:09 PM
F103082648: 2026-09-15_12-50-36.mp4
Tue, Sep 15, 10:09 PM
F103082399: 2026-09-15_12-49-18.mp4
Tue, Sep 15, 10:09 PM
F103082114: 2026-09-15_12-47-14.mp4
Tue, Sep 15, 10:09 PM
F103081754: 2026-09-15_12-44-20.webm
Tue, Sep 15, 10:09 PM
F103081404: 2026-09-15_12-41-25.webm
Tue, Sep 15, 10:09 PM
F103081297: 2026-09-15_12-39-51.webm
Tue, Sep 15, 10:09 PM
F103081266: 2026-09-15_12-12-05.webm
Tue, Sep 15, 10:09 PM

Description

Steps to reproduce:

  1. Open a Wikipedia article on a mobile browser.
  2. Open the Visual Editor on any Wikipedia's articles.
  3. Switch to the Source Editor.
  4. Try to switch back from Source Editor to Visual Editor.

Actual Result:
The Source Editor gets stuck everytime I click the visual editor. When exiting and re-entering the section edit mode, I always get thrown into the source editor and loads a completely blank section.

Affected Wikis:
All language domains.

Video evidence link:
https://drive.google.com/file/d/1epJ4pP-N-D8P7Gyt7qDTv1CkfphfYB2T/view?usp=drivesdk


Derived Requirement

Ensure users on mobile browsers can switch from Source Editor back to VisualEditor without the editor becoming stuck, displaying a blank section, or reopening in Source Editor after exiting and re-entering section editing.

Test Steps

Test Case 1: Ensure users can switch from Source Editor back to VisualEditor on mobile

  1. Open a Wikipedia article on a mobile browser.
  2. Open a section in VisualEditor.
  3. Switch from VisualEditor to Source Editor.
  4. Switch from Source Editor back to VisualEditor.
  5. Observe the editor after switching back.
  6. ✅❓❌⬜ AC1: VisualEditor opens successfully after switching from Source Editor without becoming stuck or displaying a blank section.

Test Case 2: Ensure switching between editors works across Wikipedia language domains

  1. Open an article on a Wikipedia language domain using a mobile browser.
  2. Open a section in VisualEditor.
  3. Switch to Source Editor.
  4. Switch back to VisualEditor.
  5. Repeat the editor switch on at least one additional Wikipedia language domain.
  6. ✅❓❌⬜ AC2: Switching from Source Editor back to VisualEditor works successfully on each tested Wikipedia language domain without the editor becoming stuck or displaying a blank section.

QA Results - PROD

ACStatusDetails
1✅T437810#12325389
2✅T437810#12325389

Event Timeline

I encounter the same issue. To add: I tried it in different browsers, on different operating systems and both logged in and logged out.

I can reproduce the problem. Using the Firefox developer tools I see this error (I only show the first lines) after a click on the edit button:

TypeError: can't access property "register", ve.ui.wikitextCommandRegistry is undefined
    js ve.ui.CodeMirrorPreferencesTool.js:54

I wonder if this could be related to https://phabricator.wikimedia.org/T436739 , where "ve.ui.commandRegistry.register(" was changed to "ve.ui.wikitextCommandRegistry.register(" from the error message.

Aklapper renamed this task from Mobile Editor: source editor glitch to Source editor on mobile gets stuck: TypeError: can't access property "register", ve.ui.wikitextCommandRegistry is undefined.Sun, Sep 13, 8:51 PM

Change #1341383 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/CodeMirror@master] VisualEditor: don't register settings tool in wikitextCommandRegistry

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

Change #1341385 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/CodeMirror@wmf/1.47.0-wmf.19] VisualEditor: don't register settings tool in wikitextCommandRegistry

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

Change #1341383 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] VisualEditor: don't register settings tool in wikitextCommandRegistry

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

Change #1341385 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@wmf/1.47.0-wmf.19] VisualEditor: don't register settings tool in wikitextCommandRegistry

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

Mentioned in SAL (#wikimedia-operations) [2026-09-14T22:31:43Z] <kemayo@deploy1003> Started scap sync-world: Backport for [[gerrit:rMW1341385ee89c|VisualEditor: don't register settings tool in wikitextCommandRegistry (T437810)]]

Mentioned in SAL (#wikimedia-operations) [2026-09-14T22:36:08Z] <kemayo@deploy1003> kemayo: Backport for [[gerrit:rMW1341385ee89c|VisualEditor: don't register settings tool in wikitextCommandRegistry (T437810)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-09-14T22:41:05Z] <kemayo@deploy1003> Finished scap sync-world: Backport for [[gerrit:rMW1341385ee89c|VisualEditor: don't register settings tool in wikitextCommandRegistry (T437810)]] (duration: 09m 22s)

@DLynch Validated users on mobile browsers can switch from Source Editor back to VisualEditor without the editor becoming stuck, displaying a blank section, or reopening in Source Editor after exiting and re-entering section editing, as seen in videos. I will mark this as Resolved. Thanks for all your work!

Test Result - PROD

Status: ✅ PASS
Environment: PROD
OS: macOS Tahoe 26.6.2
Browser: Chrome 152, Firefox 155, Safari 26.6.2
Device: MBA
Emulated Device: Dev- Google Pixel 10 Pro XL- Chrome, iPad11- Safari, iPhone SE- Safari, Galaxy S10- Firefox

Test Artifact(s): Video evidence: Google Drive link provided in the task
https://id.wikipedia.org/wiki/Bawre_Nain

Test Steps

Test Case 1: Ensure users can switch from Source Editor back to VisualEditor on mobile

  1. Open a Wikipedia article on a mobile browser.
  2. Open a section in VisualEditor.
  3. Switch from VisualEditor to Source Editor.
  4. Switch from Source Editor back to VisualEditor.
  5. Observe the editor after switching back.
  6. ✅ AC1: VisualEditor opens successfully after switching from Source Editor without becoming stuck or displaying a blank section.

Language: Id

Google Pixel 10 Pro XL- ChromeiPad11- SafariiPhone SE- SafariGalaxy S10- Firefox

Test Case 2: Ensure switching between editors works across Wikipedia language domains

  1. Open an article on a Wikipedia language domain using a mobile browser.
  2. Open a section in VisualEditor.
  3. Switch to Source Editor.
  4. Switch back to VisualEditor.
  5. Repeat the editor switch on at least one additional Wikipedia language domain.
  6. ✅ AC2: Switching from Source Editor back to VisualEditor works successfully on each tested Wikipedia language domain without the editor becoming stuck or displaying a blank section.
HeDeRuJa
GMikesell-WMF edited projects, added: Verified; removed: Editing QA.
GMikesell-WMF updated the task description. (Show Details)

Thank you so much for the quick fix! It works perfectly now on my side. :D