Page MenuHomePhabricator

JavaScript errors from PageTriage if $wgLegacyJavaScriptGlobals is false
Closed, ResolvedPublic

Description

On my local wiki, when a page patroller reviews a new page and clicks the trash icon in the page curation toolbar nothing happens and the browser console shows

ReferenceError: wgCanonicalNamespace is not defined
http://localhost/wiki/extensions/PageTriage/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js
Line 160

The error occurs because I set $wgLegacyJavaScriptGlobals = false and the extension accesses global variables instead of using mw.config.get( 'wgCanonicalNamespace' ). Some day we'll disable this legacy misfeature on WMF wikis...

Event Timeline

Spage raised the priority of this task from to Low.
Spage updated the task description. (Show Details)
Spage subscribed.

Change 181532 had a related patch set uploaded (by Spage):
Fix PageTriage JS dialog parameter

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

Patch-For-Review

Change 181532 merged by jenkins-bot:
Fix PageTriage JS dialog parameter

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

One other naked wg...

Change 181752 had a related patch set uploaded (by Spage):
Fix PageTriage JS dialog parameter

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

Patch-For-Review

Change 181753 had a related patch set uploaded (by Spage):
Fix PageTriage JS dialog parameter

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

Patch-For-Review

Change 181753 merged by jenkins-bot:
Fix PageTriage JS dialog parameter

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

Change 181752 merged by jenkins-bot:
Fix PageTriage JS dialog parameter

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