Page MenuHomePhabricator

Declare conditional dependency on WikimediaEvents, and don't try to use schema.Edit unless it's present
Closed, ResolvedPublic1 Estimated Story Points

Description

On opening VisualEditor on a local MediaWiki-Vagrant setup:

"Error: Unknown dependency: schema.Edit" Error: Unknown dependency: schema.Edit
Stack trace:
sortDependencies:156:1
resolve:158:14
mw.loader</<.using:169:189
handleTrackedEvent:1:310
mw.trackSubscribe/<:154:53
jQuery.Callbacks/fire:45:106
jQuery.Callbacks/self.fireWith:46:431
jQuery.Callbacks/self.fire:46:474
mw.track:153:818
:677:426
ve.trackSubscribe/<:1:409
jQuery.Callbacks/fire:45:106
jQuery.Callbacks/self.add:45:664
ve.trackSubscribe:1:285
ve.trackSubscribeAll:1:500
:676:95
:675:165
runScript:161:153
execute/</checkCssHandles:161:638
execute/</cssHandle/<:161:768
jQuery.Callbacks/fire:45:106
jQuery.Callbacks/self.fireWith:46:431
jQuery.Callbacks/self.fire:46:474
addEmbeddedCSS:156:531
addEmbeddedCSS/<:156:1
load.php:150

(long RL URLs trimmed)

and

"VisualEditor failed to load: Error: Module ext.visualEditor.mediawiki has failed dependencies"

Event Timeline

brion raised the priority of this task from to Needs Triage.
brion updated the task description. (Show Details)
brion added a subscriber: brion.
brion set Security to None.

You need to load WikimediaEvents if you've got EventLogging installed for VisualEditor to work.

Interesting, something else must be pulling it in as a dependency...

puppet/modules/role/manifests/mobilefrontend.pp: include ::role::eventlogging

Culprit found. :)

Is there any way we can have a cleaner failure mode here, such as detecting that this other extension that's also needed isn't present and disabling the eventlogging when it won't work?

Jdforrester-WMF renamed this task from VisualEditor on Vagrant gives "Error: Unknown dependency: schema.Edit" in JS console to Declare conditional dependency on WikimediaEvents, and don't try to use schema.Edit unless it's present.Feb 5 2015, 5:54 PM
Jdforrester-WMF triaged this task as Medium priority.

Change 192049 had a related patch set uploaded (by Alex Monk):
Don't try to route any events into schema.Edit if it's not actually installed

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

Patch-For-Review

Change 192049 merged by jenkins-bot:
Don't try to route any events into schema.Edit if it's not actually installed

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