Syntax error in compressed JavaScript

asked 2014-05-16 08:01:10 -0500

I've found that while using DEBUG = False, login form was not working. After some backtracking, I've found that this was because compressed JavaScript file has errors:

[16/05/14 13:35:57] JavaScript - /m/CACHE/js/e447cad8c1d4.js
Linked script compilation
Syntax error at line 14 while loading: expected ';', got '!'
ent.hasClass('fade')!that.$element.paren
--------------------^

Which made the page unable to load JQuery and execute the remaining JavaScript code causing login form data sent to be wrong:

[16/05/14 13:35:57] JavaScript - /account/signin/
Inline script thread
Uncaught exception: ReferenceError: Undefined variable: $
Error thrown at line 219, column 4 in /account/signin/:
$('.mceStatusbar').remove();

[16/05/14 13:35:57] JavaScript - /account/signin/
Inline script thread
Uncaught exception: ReferenceError: Undefined variable: jQuery
Error thrown at line 15, column 0 in /m/default/media/js/jquery.validate.min.js?v=1:
(function($){$.extend($.fn,{validate:function(options)...

[16/05/14 13:35:57] JavaScript - /account/signin/
Inline script thread
Uncaught exception: ReferenceError: Undefined variable: $
Error thrown at line 1, column 0 in /m/default/media/jquery-openid/jquery.openid.js?v=1:
$.fn.authenticator = function() {

[16/05/14 13:35:57] JavaScript - /account/signin/
Inline script thread
Uncaught exception: ReferenceError: Undefined variable: $
Error thrown at line 376, column 4 in /account/signin/:
$("body").authenticator();

[16/05/14 13:35:57] JavaScript - /account/signin/
Inline script thread
Uncaught exception: ReferenceError: Undefined variable: cleanUrl
Error thrown at line 379, column 16 in /account/signin/:
askbot['urls'][url_name] = cleanUrl(askbot['urls'][url_name]);

I disabled compressor and login form worked again.

edit retag flag offensive close merge delete