Last modified: 2014-11-06 06:22:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74197, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72197 - ext.eventLogging.subscriber.js broken
ext.eventLogging.subscriber.js broken
Status: RESOLVED FIXED
Product: Analytics
Classification: Unclassified
EventLogging (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-17 21:27 UTC by nuria
Modified: 2014-11-06 06:22 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description nuria 2014-10-17 21:27:33 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.
Comment 1 Roan Kattouw 2014-10-17 21:33:45 UTC
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.
Comment 2 Gerrit Notification Bot 2014-10-17 22:02:21 UTC
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
Comment 3 Roan Kattouw 2014-10-17 22:05:15 UTC
(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.
Comment 4 Gerrit Notification Bot 2014-10-29 02:01:16 UTC
Change 167326 merged by jenkins-bot:
Fix off-by-one error in mw.track subscriber

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links