Page MenuHomePhabricator

VisualEditor failing to load on interwiki redirect pages
Open, Needs TriagePublicBUG REPORT


Steps to replicate the issue (include links if applicable):


What happens?:

Page is stuck indefinitely loading.

cap.png (1×2 px, 624 KB)

Uncaught TypeError: linkData is null
  toDataElement @injectedScript
  createModelFromDom @injectedScript
  createModelFromDom @injectedScript

Other information (browser name/version, screenshots, etc.):

Firefox. macOS. Is affecting other redirect pages on as well, but only interwiki ones it seems. For example:

And several others.

Event Timeline

I don't think we've ever supported editing cross-wiki redirects (or realized that the feature exists).

The following VisualEditor patch appears to be sufficient to stop the visual editor from breaking, without any other cascading failure that I can see from a quick test:

diff --git a/modules/ve-mw/dm/metaitems/ b/modules/ve-mw/dm/metaitems/
index 3d5d1a8bb..231f00c0a 100644
--- a/modules/ve-mw/dm/metaitems/
+++ b/modules/ve-mw/dm/metaitems/
@@ -35,7 +35,7 @@ = [ 'mw:PageProp/redirect' ]; = function ( domElements, converter ) {
        // HACK piggy-back on MWInternalLinkAnnotation's ./ stripping logic
        var linkData = domElements, converter );
-       linkData.type =;
+       if (linkData) linkData.type =;
        return linkData;

Of course, in addition to this we'd probably want to patch MW itself to hide the visual edit option and default to edit source, because all you get is an empty visual editor.