Last modified: 2014-11-06 06:22:57 UTC
File: https://github.com/wikimedia/mediawiki-extensions-EventLogging/blob/master/modules/ext.eventLogging.subscriber.js The ext.eventLogging.subscriber.js has not worked since past April. Visual Editor editor was using it to submit its events to EL. While VE is removing usage of this class (as it really not needed on their case) we should either fix it or remove other usages of it. Sounds like its only usage on the codebase (besides Visual Editor's) is to report usage of deprecated javascript functions.
Specifically, what's broken is the way that it tries to derive the schema from the topic name. The things that are broken about it are: * It ends up trying to load schema..foo (double dot) * It documents that the topic must start with 'event.', and tries to strip that (leaving the dot), but none of the callers actually pass 'event.' * If the schema is not found (which due to the bugs above is virtually always the case), it fails silently with no warning logged anywhere It's been suggested that subscriber.js (and mw.track(), which it facilitates) just needs to be put out of its misery. VisualEditor is using it, but there's no good reason for that and I'm porting it to call EventLogging directly. However, a few things in MediaWiki are using mw.track(), and some of them would benefit from deferred loading (they may call mw.track() very early, before EventLogging has been loaded), so those would have to be looked at.
Change 167326 had a related patch set uploaded by Catrope: Fix off-by-one error in mw.track subscriber https://gerrit.wikimedia.org/r/167326
(In reply to Roan Kattouw from comment #1) > Specifically, what's broken is the way that it tries to derive the schema > from the topic name. The things that are broken about it are: > > * It ends up trying to load schema..foo (double dot) My patch fixes this. > * It documents that the topic must start with 'event.', and tries to strip > that (leaving the dot), but none of the callers actually pass 'event.' This seems to be deliberate, because it only listens for events that start with 'event'. My patch changes this to 'event.' so we don't capture random other stuff. > * If the schema is not found (which due to the bugs above is virtually > always the case), it fails silently with no warning logged anywhere > This doesn't seem to be true: ResourceLoader does log an error about not being able to find a module called schema..foo > It's been suggested that subscriber.js (and mw.track(), which it > facilitates) just needs to be put out of its misery. VisualEditor is using > it, but there's no good reason for that and I'm porting it to call > EventLogging directly. However, a few things in MediaWiki are using > mw.track(), and some of them would benefit from deferred loading (they may > call mw.track() very early, before EventLogging has been loaded), so those > would have to be looked at. Right now Dan is suggesting we just keep it around.
Change 167326 merged by jenkins-bot: Fix off-by-one error in mw.track subscriber https://gerrit.wikimedia.org/r/167326