Page MenuHomePhabricator

onResourceLoaderRegisterModules doesn't correctly avoid registering jquery.uls.data if it's already been loaded.
Closed, ResolvedPublic

Description

When both the TemplateData and the VisualEditor extension are enabled, I get the following error:

MediaWiki internal error.

Original exception: [d23ee7bd] /index.php/Main_Page MWException from line 290 of /var/www/core/includes/resourceloader/ResourceLoader.php: ResourceLoader duplicate registration error. Another module has already been registered as jquery.uls.data
Backtrace:
#0 /var/www/core/extensions/TemplateData/TemplateData.hooks.php(63): ResourceLoader->register(array)
#1 [internal function]: TemplateDataHooks::onResourceLoaderRegisterModules(ResourceLoader)
#2 /var/www/core/includes/Hooks.php(209): call_user_func_array(string, array)
#3 /var/www/core/includes/resourceloader/ResourceLoader.php(250): Hooks::run(string, array)
#4 /var/www/core/includes/OutputPage.php(2716): ResourceLoader->__construct(GlobalVarConfig)
#5 /var/www/core/includes/OutputPage.php(530): OutputPage->getResourceLoader()
#6 /var/www/core/includes/OutputPage.php(556): OutputPage->filterModules(array, string)
#7 /var/www/core/includes/OutputPage.php(628): OutputPage->getModules(boolean, string, string)
#8 /var/www/core/includes/OutputPage.php(3024): OutputPage->getModuleMessages(boolean, string)
#9 /var/www/core/includes/OutputPage.php(3099): OutputPage->getScriptsForBottomQueue(boolean)
#10 /var/www/core/includes/skins/Skin.php(627): OutputPage->getBottomScripts()
#11 /var/www/core/includes/skins/SkinTemplate.php(438): Skin->bottomScripts()
#12 /var/www/core/includes/skins/SkinTemplate.php(240): SkinTemplate->prepareQuickTemplate(OutputPage)
#13 /var/www/core/includes/OutputPage.php(2268): SkinTemplate->outputPage()
#14 /var/www/core/includes/MediaWiki.php(593): OutputPage->output()
#15 /var/www/core/includes/MediaWiki.php(435): MediaWiki->main()
#16 /var/www/core/index.php(46): MediaWiki->run()
#17 {main}

Event Timeline

Mvolz created this task.Jan 3 2015, 5:28 PM
Mvolz claimed this task.
Mvolz raised the priority of this task from to Needs Triage.
Mvolz updated the task description. (Show Details)
Mvolz added a project: TemplateData.
Mvolz added a subscriber: Mvolz.

Change 182580 had a related patch set uploaded (by Mvolz):
Correctly detect if jquery.uls.data is loaded

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

Patch-For-Review

Change 182581 had a related patch set uploaded (by Mvolz):
Update comment to indicate TD uses jquery.uls.data

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

Patch-For-Review

Jdforrester-WMF closed this task as Resolved.Jan 5 2015, 1:29 PM
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set Security to None.

Change 182581 merged by jenkins-bot:
Update comment to indicate TD uses jquery.uls.data

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

Change 182580 merged by jenkins-bot:
Correctly detect if jquery.uls.data is loaded

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