https://bugzilla.wikimedia.org/show_bug.cgi?id=43550
Web browser: --- Bug ID: 43550 Summary: events log with _ok: true even with validation errors Product: MediaWiki extensions Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: Unprioritized Component: EventLogging Assignee: o...@wikimedia.org Reporter: sp...@wikimedia.org CC: mflasc...@wikimedia.org, oliv...@wikimedia.org, sp...@wikimedia.org, swall...@wikimedia.org, wikibugs-l@lists.wikimedia.org Classification: Unclassified Mobile Platform: --- mw.eventLog.logEvent( 'CommunityPortal', { } ); will log with _ok: true despite obvious schema violations and the console warning (if ?debug=1): Missing "token" property This happens because the $.each( properties, ...) iterator in validate() in modules/ext.eventLogging.core.js does not propagate a return false from a property test; it halts iteration but the validate() function continues on and returns true. I'm puzzled that the qunit tests of validate in <http://localhost/wiki/index.php/Special:JavaScriptTest/qunit?module=ext.EventLogging> all pass. They, e.g. assert.throws(... /Missing/), and even though validate() doesn't throw errors any more, they all pass. BTW, it would be nice if the mw.eventLog.schemas.<Name>.logged included the system fields such as _ok. -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l