Last modified: 2013-02-26 18:55:23 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 T33187, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31187 - jsmin+ throws syntax errors on valid js pages
jsmin+ throws syntax errors on valid js pages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.20.x
All All
: Normal major (vote)
: ---
Assigned To: Brion Vibber
: upstream
Depends on:
Blocks: 29068
  Show dependency treegraph
 
Reported: 2011-09-27 15:07 UTC by P.Copp
Modified: 2013-02-26 18:55 UTC (History)
7 users (show)

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


Attachments

Description P.Copp 2011-09-27 15:07:34 UTC
On http://eo.wikipedia.org a javascript error is thrown:
"JavaScript parse error: Parse error: Illegal token in file 'MediaWiki:Common.js' on line 669", although the mentioned page contains perfectly valid js.

Since r91608, jsmin+ is used to validate js pages, which seems to be too strict about identifiers that contain non-ascii-chars.

As a workaround $wgResourceLoaderValidateJS can be disabled by default until this is resolved.
Comment 1 Roan Kattouw 2011-09-27 16:23:20 UTC
(In reply to comment #0)
> As a workaround $wgResourceLoaderValidateJS can be disabled by default until
> this is resolved.
Done.
Comment 2 Arno Lagrange 2011-09-27 16:36:13 UTC
I changed all variable names with 'ŝ' to 'sh' : it looks like working well
Comment 3 Brion Vibber 2011-09-27 17:25:42 UTC
This version of the common.js page from eo.wikipedia.org contains the accented forms:

http://eo.wikipedia.org/w/index.php?title=MediaWiki:Common.js&diff=prev&oldid=3855450

Probably that happened kinda by accident, as the sx<->ŝ conversion would still be active in the editor for the page. :)

However those chars should indeed be legit in identifiers, so let's see if we can devise a fix :D
Comment 4 Brion Vibber 2011-09-27 17:51:55 UTC
Looks like I can patch this in, there's a handily placed FIXME comment in the right place. :D
Comment 5 Brion Vibber 2011-09-27 23:06:52 UTC
Committed on trunk in r98281 and sent upstream to Tino via email -- he merged several other tweaks we made a couple months ago, nice!
Comment 6 Brion Vibber 2011-09-27 23:20:14 UTC
Merged to REL1_18 as r98285 (along with another one-line tweak to qunit index.html to fix UTF-8 interpretation).

I'm not merging direct to 1.18wmf1 to avoid confusion about what is/isn't synced.
Comment 7 Niklas Laxström 2012-11-14 07:37:58 UTC
$wgResourceLoaderValidateJS = false; is still set on the wmf cluster as "temp hack".
Comment 8 jeremyb 2013-02-26 18:55:23 UTC
(In reply to comment #7)
> $wgResourceLoaderValidateJS = false; is still set on the wmf cluster as "temp
> hack".

No more!

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


Navigation
Links