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 added a subscriber: Spage.

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

Spage reopened this task as Open.Dec 23 2014, 3:37 AM

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

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 28 2016, 12:54 AM