Page MenuHomePhabricator

JavaScript error from ext.cx.campaigns.contributionsmenu missing dependency on mediawiki.Uri
Closed, ResolvedPublic1 Story Points

Description

I loaded http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Dido_Sotiriou&useskin=monobook&debug=1 , and in my browser console was the error

TypeError: mw.Uri is not a function
http://en.wikipedia.beta.wmflabs.org/static/master/extensions/ContentTranslation/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
Line 14

The 'ext.cx.campaigns.contributionsmenu' module loads this JavaScript file, but ContentTranslation/extension.js does not declare its dependency on mediawiki.Uri. This allowed mediawiki.Uri.js to happen to load after ext.cx.campaigns.contributionsmenu.js in debug mode, so fail. Easy fix.

https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader#Debugging says "It is important to test your code in both debug and production modes." :-)

Event Timeline

Spage raised the priority of this task from to High.
Spage updated the task description. (Show Details)
Spage added a subscriber: Spage.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 7 2015, 12:05 AM

Change 230027 had a related patch set uploaded (by KartikMistry):
Add missing dependency to ext.cx.campaigns.contributionsmenu

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

santhosh added a project: LE-CX6-Sprint 1.
santhosh set Security to None.
santhosh moved this task from Backlog to In Review on the LE-CX6-Sprint 1 board.
santhosh added a subscriber: santhosh.

Change 230027 merged by jenkins-bot:
Add missing dependency to ext.cx.campaigns.contributionsmenu

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

KartikMistry closed this task as Resolved.Aug 7 2015, 5:55 AM
KartikMistry edited a custom field.
KartikMistry moved this task from In Review to Done on the LE-CX6-Sprint 1 board.