Page MenuHomePhabricator

"TypeError: mw.user.id is not a function" for ext.cx.eventlogging.js on cs.wp
Closed, ResolvedPublic

Description

https://cs.wikipedia.org/w/extensions/ContentTranslation/modules/eventlogging/ext.cx.eventlogging.js?2d21b uses token: mw.user.id(), in ctaShown: function ( campaign ) but TypeError: mw.user.id is not a function:

	ctaShown
https://cs.wikipedia.org/w/extensions/ContentTranslation/modules/eventlogging/ext.cx.eventlogging.js:212:12
ctaShown self-hosted:984:17 fire
https://cs.wikipedia.org/w/resources/lib/jquery/jquery.js:3317:11
fireWith
https://cs.wikipedia.org/w/resources/lib/jquery/jquery.js:3447:7
fire
https://cs.wikipedia.org/w/resources/src/mediawiki.base/mediawiki.base.js:444:13
showInvitation
https://cs.wikipedia.org/w/extensions/ContentTranslation/modules/campaigns/ext.cx.campaigns.newarticle.js:59:3
mightThrow
https://cs.wikipedia.org/w/resources/lib/jquery/jquery.js:3583:21
resolve/</process<
https://cs.wikipedia.org/w/resources/lib/jquery/jquery.js:3651:12
	ctaReject
https://cs.wikipedia.org/w/extensions/ContentTranslation/modules/eventlogging/ext.cx.eventlogging.js:239:12
ctaReject self-hosted:984:17 fire
https://cs.wikipedia.org/w/resources/lib/jquery/jquery.js:3317:11
fireWith
https://cs.wikipedia.org/w/resources/lib/jquery/jquery.js:3447:7
fire
https://cs.wikipedia.org/w/resources/src/mediawiki.base/mediawiki.base.js:444:13
showInvitation/<
https://cs.wikipedia.org/w/extensions/ContentTranslation/modules/campaigns/ext.cx.campaigns.newarticle.js:51:4
dispatch
https://cs.wikipedia.org/w/resources/lib/jquery/jquery.js:5205:16
add/elemData.handle
https://cs.wikipedia.org/w/resources/lib/jquery/jquery.js:5014:6

Event Timeline

Aklapper created this task.Aug 29 2018, 7:57 AM

Which page, what did you do? Does it happen without gadgets?

Change 456088 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/ContentTranslation@master] ext.cx.eventlogging: register dependency on mediawiki.user

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

Change 456088 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] ext.cx.eventlogging: register dependency on mediawiki.user

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

Nikerabbit triaged this task as High priority.Aug 30 2018, 9:46 AM

Causing JavaScript errors on non-CX pages may cause breakage of other JavaScript functionality.

Pginer-WMF closed this task as Resolved.Sep 19 2018, 8:42 AM