Page MenuHomePhabricator

TypeError in ext.wikimediaEvents
Closed, ResolvedPublic

Description

I’m sometimes getting the JS-error

TypeError: data.options is undefined

from the module ext.wikimediaEvents.

Event Timeline

Hi @Nenntmichruhigip - on which Wikimedia wiki is this happening? Is there anything in particular which normally causes this error (so we can reproduce it)? Where is this error shown?

  • This was on Commons, but I’m assuming it would also happen on other wikis.
  • No, nothing in particular, reloading a few times "helped" (actually it took surprisingly many reloads), so it seems like an issue of execution order to me: Whatever defines data.options is normally executed first, but apparently not guaranteed to.
  • In the error console of course :-) Unfortunatly such errors break all other JS on the page, so it’s quite annoying when it happens…

Any chance to provide the console output (exact file name and location of file triggering this) with [[ https://www.mediawiki.org/wiki/Help:Locating_broken_scripts | &debug=true ]]? But if you cannot reproduce too often it's probably unlikely and cumbersome...

Ah well, ignore that, there is only one line including that:

./modules/ext.wikimediaEvents.kartographer.js:				options.extra.layer = data.options.extra.layer;
TheDJ triaged this task as High priority.Aug 30 2017, 2:47 PM

Change 378516 had a related patch set uploaded (by TheDJ; owner: TheDJ):
[mediawiki/extensions/WikimediaEvents@master] Kartographer: Protect against undefined data.options

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

Change 378516 merged by jenkins-bot:
[mediawiki/extensions/WikimediaEvents@master] Kartographer: Protect against undefined data.options

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

debt added a subscriber: debt.

Moving to done - this should go into production this week on the train.

debt claimed this task.