Page MenuHomePhabricator

VisualEditor: REL1_23 branch not compatible with MediaWiki 1.23
Closed, ResolvedPublic

Description

After a fresh installation of MW 1.23 (from the tarball), adding VisualEditor and configuring parsoid, the "Edit" (or "Create") link of any page is not working.

I am not the only one having this problem: https://www.mediawiki.org/wiki/Extension_talk:VisualEditor#Can_not_get_VisualEditor_extension_for_MediaWiki_REL1_23_working_on_freshly_installed_system_44018

What I saw when I checked with FireBug:

  • In an old (1.22) installation clicking "Edit" results in a POST-request with action=visualeditor&paction=parse&page=Main_Page&format=json as its content.
  • In the new installation no request is visible in FireBug when clicking on "Edit".

One more finding: It seems to work in 1.23alpha. I used wikiapiary to search for sites using VisualEditor and found e.g. this one: http://techwiki.umbel.org/index.php/Special:Version where it works...

Some more investigation:
using the Poster-extension of Firefox to manually POST
"action=visualeditor&paction=parse&page=Main_Page&format=json" (application/x-www-form-urlencoded) to .../api.php
returns good looking content of type "application/json; charset=utf-8" (see attachment "visualeditor_postresponse.json").

But the JS-compoments of VisualEditor are not displaying anything!


Version: unspecified
Severity: major

Details

Reference
bz66519

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:21 AM
bzimport added a project: VisualEditor.
bzimport set Reference to bz66519.

Created attachment 15635
Response of POST to api.php

Attached:

I can confirm this bug. It is throwing the following JS exception:

Exception thrown by ext.visualEditor.core
Error: constructor must be a function, cannot be a undefined

The exception gets throwing trying to call:

ve.ui.windowFactory.register( OO.ui.ConfirmationDialog );

From line 22 of lib/modules/ve/ui/ve.ui.js

The problem goes away if I switch from branch REL1_23 to wmf/1.23wmf22 (and run git submodule update).

Hello Kevin,

thank you for the confirmation and the additional information!

Switching to the git-Version of VisualEditor and using branch wmf/1.23wmf22 did indeed make it work for me as well!

But I do not want to use this work-around in a production environment without anyone in the know confirming it's the way to go...

I've updated REL1_23 to just simply use 1.23wmf22 instead, which should fix the incompatibility. Sorry about this.

bugzilla.wikimedia.org wrote:

I have a similar (same?) problem: VisualEditor does not load when clicking on the "edit" tab.

This is the setup I use:

  • Windows 7
  • XAMPP win32-1.8.3-4-VC11
  • MediaWiki (tried both REL1_23 and 1.24wmf17)
  • VisualEditor (tried 1.23wmf22, 1.23wmf21, 1.24wmf17)

I tried it both with Firefox 31 and Google Chrome 36 - in both, the VisualEditor does not load from my server. (VisualEditor loads fine for example from wikimedia.org in both browsers)

I think my Parsoid is running fine. When I access port 8000, I get access to my parsoid installation, and it seems to parse html and wikicode just fine.

I tried using VisualEditor-refs_heads_wmf_1.23wmf22 and VisualEditor-refs_heads_wmf_1.23wmf21 - no change, VisualEditor does not load.

I tried using Mediawiki core-refs_heads_wmf_1.24wmf17 with VisualEditor refs_heads_wmf_1.24wmf17 - no change, VisualEditor does not load.

I do not get any error message. The access log does not show much.

Loading the main page:
127.0.0.1 - - [21/Aug/2014:12:11:24 +0200] "GET /mediawiki/index.php/Main_Page HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"

127.0.0.1 - - [21/Aug/2014:12:11:25 +0200] "GET /mediawiki/load.php?debug=false&lang=en&modules=ext.visualEditor.viewPageTarget.noscript%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cmediawiki.ui.button%7Cskins.vector.styles&only=styles&skin=vector&* HTTP/1.1" 304 - "http://127.0.0.1/mediawiki/index.php/Main_Page" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"

127.0.0.1 - - [21/Aug/2014:12:11:25 +0200] "GET /mediawiki/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector&* HTTP/1.1" 304 - "http://127.0.0.1/mediawiki/index.php/Main_Page" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"

Then pressing on the edit tab:

127.0.0.1 - - [21/Aug/2014:12:12:19 +0200] "GET /mediawiki/load.php?debug=false&lang=en&modules=ext.visualEditor.base%2Ccore%2Cmediawiki%2CviewPageTarget%7Cext.visualEditor.core.desktop%7Cjquery.visibleText%7Cmediawiki.api.edit%7Cmediawiki.feedback%7Coojs%2Coojs-ui%2Crangy%7Cunicodejs.wordbreak&skin=vector&version=20140820T142325Z&* HTTP/1.1" 304 - "http://127.0.0.1/mediawiki/index.php/Main_Page" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"

Are there any debug-output, logfiles, or something like that I can access or activate? I have no idea why VisualEditor does not load, and I do not know where to look. Can this be a firewall problem? Has anybody any idea?

bugzilla.wikimedia.org wrote:

Oh, one more thing I just found, when I manually do the GET /mediawiki/load.php?debug=false&lang=en&modules=ext.visualEditor.base%2Ccore%2Cmediawiki%2CviewPageTarget%7Cext.visualEditor.core.desktop%7Cjquery.visibleText%7Cmediawiki.api.edit%7Cmediawiki.feedback%7Coojs%2Coojs-ui%2Crangy%7Cunicodejs.wordbreak&skin=vector&version=20140820T142325Z&* then I get the following (snipped at the end):

/*
exception 'MWException' with message 'ResourceLoaderFileModule::readScriptFiles: script file not found: "D:\xampp\apps\mediawiki\htdocs\extensions\VisualEditor/lib/ve/modules/ve/ve.js"' in D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php:658
Stack trace:
#0 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php(277): ResourceLoaderFileModule->readScriptFiles(Array)
#1 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(797): ResourceLoaderFileModule->getScript(Object(ResourceLoaderContext))
#2 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(546): ResourceLoader->makeModuleResponse(Object(ResourceLoaderContext), Array, Array)
#3 D:\xampp\apps\mediawiki\htdocs\load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext))
#4 {main}
*/
/*
exception 'MWException' with message 'ResourceLoaderFileModule::readScriptFiles: script file not found: "D:\xampp\apps\mediawiki\htdocs\extensions\VisualEditor/lib/ve/modules/ve/ve.Range.js"' in D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php:658
Stack trace:
#0 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php(277): ResourceLoaderFileModule->readScriptFiles(Array)
#1 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(797): ResourceLoaderFileModule->getScript(Object(ResourceLoaderContext))
#2 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(546): ResourceLoader->makeModuleResponse(Object(ResourceLoaderContext), Array, Array)
#3 D:\xampp\apps\mediawiki\htdocs\load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext))
#4 {main}
*/
/*
exception 'MWException' with message 'ResourceLoaderFileModule::readScriptFiles: script file not found: "D:\xampp\apps\mediawiki\htdocs\extensions\VisualEditor/lib/ve/modules/ve/ui/ve.ui.DesktopSurface.js"' in D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php:658
Stack trace:
#0 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php(277): ResourceLoaderFileModule->readScriptFiles(Array)
#1 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(797): ResourceLoaderFileModule->getScript(Object(ResourceLoaderContext))
#2 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(546): ResourceLoader->makeModuleResponse(Object(ResourceLoaderContext), Array, Array)
#3 D:\xampp\apps\mediawiki\htdocs\load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext))
#4 {main}
*/
/*
exception 'MWException' with message 'ResourceLoaderFileModule::readScriptFiles: script file not found: "D:\xampp\apps\mediawiki\htdocs\extensions\VisualEditor/lib/ve/lib/jquery/jquery.visibleText.js"' in D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php:658
Stack trace:
#0 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php(277): ResourceLoaderFileModule->readScriptFiles(Array)
#1 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(797): ResourceLoaderFileModule->getScript(Object(ResourceLoaderContext))
#2 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(546): ResourceLoader->makeModuleResponse(Object(ResourceLoaderContext), Array, Array)
#3 D:\xampp\apps\mediawiki\htdocs\load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext))
#4 {main}
*/
/*
exception 'MWException' with message 'ResourceLoaderFileModule::readScriptFiles: script file not found: "D:\xampp\apps\mediawiki\htdocs\extensions\VisualEditor/lib/ve/lib/rangy/rangy-core-1.3.js"' in D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php:658
Stack trace:
#0 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php(277): ResourceLoaderFileModule->readScriptFiles(Array)
#1 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(797): ResourceLoaderFileModule->getScript(Object(ResourceLoaderContext))
#2 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(546): ResourceLoader->makeModuleResponse(Object(ResourceLoaderContext), Array, Array)
#3 D:\xampp\apps\mediawiki\htdocs\load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext))
#4 {main}
*/
/*
exception 'MWException' with message 'ResourceLoaderFileModule::readScriptFiles: script file not found: "D:\xampp\apps\mediawiki\htdocs\extensions\VisualEditor/lib/ve/modules/unicodejs/unicodejs.js"' in D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php:658
Stack trace:
#0 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoaderFileModule.php(277): ResourceLoaderFileModule->readScriptFiles(Array)
#1 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(797): ResourceLoaderFileModule->getScript(Object(ResourceLoaderContext))
#2 D:\xampp\apps\mediawiki\htdocs\includes\resourceloader\ResourceLoader.php(546): ResourceLoader->makeModuleResponse(Object(ResourceLoaderContext), Array, Array)
#3 D:\xampp\apps\mediawiki\htdocs\load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext))
#4 {main}
*/
mw.loader.implement("ext.visualEditor.mediawiki",function($,jQuery){ve.init.mw={'targets':[]};(function() ...

bugzilla.wikimedia.org wrote:

D:\xampp\apps\mediawiki\htdocs\extensions\VisualEditor/lib/ve/ is missing on my system!!! There is only jquery.uls ...

Where do I get the ve lib? Why don't I have the ve lib?

Please explain how you installed VE and its dependencies and which exact guide you followed; might be better to ask/discuss on IRC in #mediawiki-visualeditor or https://www.mediawiki.org/wiki/Talk:VisualEditor or https://www.mediawiki.org/wiki/Extension_talk:VisualEditor

bugzilla.wikimedia.org wrote:

Ok, VisualEditor is now running on my system!

And I found the problem:

If you download the VisualEditor via the web-interface at http://git.wikimedia.org/branches/mediawiki%2Fextensions%2FVisualEditor.git then you will *NOT* get any submodules, like e.g. lib/ve/.

The problem is, that web-interface for git at git.wikimedia.org can not handle git submodules. If you download an archive of VisualEditor (e.g. REL1_23) then lib/ve will be missing. If you try to access a submodule like lib/ve, then the web-interface will give you an error message.

If you download VisualEditor via https://www.mediawiki.org/wiki/Special:ExtensionDistributor/VisualEditor then everything is fine.

If you manually download VisualEditor via git commandline, and do a "git submodule update --init" afterwards, then everything is fine.

What is really annoying was the lack or error-messages.

(In reply to Tony Mach from comment #10)

Ok, VisualEditor is now running on my system!

And I found the problem:

If you download the VisualEditor via the web-interface at
http://git.wikimedia.org/branches/mediawiki%2Fextensions%2FVisualEditor.git
then you will *NOT* get any submodules, like e.g. lib/ve/.

The problem is, that web-interface for git at git.wikimedia.org can not
handle git submodules. If you download an archive of VisualEditor (e.g.
REL1_23) then lib/ve will be missing. If you try to access a submodule like
lib/ve, then the web-interface will give you an error message.

If you download VisualEditor via
https://www.mediawiki.org/wiki/Special:ExtensionDistributor/VisualEditor
then everything is fine.

If you manually download VisualEditor via git commandline, and do a "git
submodule update --init" afterwards, then everything is fine.

Yeah, the instructions say this pretty clearly, though I see you've now gone rather over-board in saying this several times in big boxes. :-)

What is really annoying was the lack or error-messages.

Yeah; we should raise an issue with MediaWiki core about the lack of user-visible errors, though gerrit 155177 will at least make it more obvious for VisualEditor users in future.