Bug #7785
closedjQuery syntax error: unterminated regular expression literal
0%
Description
On dashboard, this keeps spamming the browser console over and over again.
Uncaught SyntaxError: Invalid regular expression: missing / at eval (<anonymous>) at jquery-1.12.0.min.js?v=1467049863:2 at Function.globalEval (jquery-1.12.0.min.js?v=1467049863:2) at Ha (jquery-1.12.0.min.js?v=1467049863:3) at n.fn.init.append (jquery-1.12.0.min.js?v=1467049863:3) at n.fn.init.<anonymous> (jquery-1.12.0.min.js?v=1467049863:3) at Y (jquery-1.12.0.min.js?v=1467049863:3) at n.fn.init.html (jquery-1.12.0.min.js?v=1467049863:3) at Object.success ((index):1510) at i (jquery-1.12.0.min.js?v=1467049863:2)
Updated by Anonymous over 7 years ago
- Status changed from New to Feedback
Possibly resolved by #7784
Updated by Kill Bill over 7 years ago
Steve Beaver wrote:
Possibly resolved by #7784
Still there with 2.4 RC. This seems like the Squid widget is causing this: https://github.com/pfsense/FreeBSD-ports/blob/devel/www/pfSense-pkg-squid/files/usr/local/www/widgets/widgets/squid_antivirus_status.widget.php#L174
@sbeaver: Not exactly sure what's the issue there, mind fixing that one? Thanks. (Looking at that widget, perhaps the centralized refresh magic as well... no idea how to do that.)
Updated by Anonymous over 7 years ago
- Status changed from Feedback to Assigned
Thanks for the update. That explains why I couldn't find it :) I will take care of it today.
Updated by Anonymous over 7 years ago
- Status changed from Assigned to Feedback
Widget has been updated to use the new refresh system, and the regex eliminated by exiting the script where required, rather than filtering out the javascript later
Updated by Kill Bill over 7 years ago
@sbeaver: I don't think the Squid change was supposed to go to 2.3.4; it badly breaks the dashboard (cannot add/remove/move anything there).
Uncaught ReferenceError: register_ajax is not defined
Updated by Anonymous about 7 years ago
You are right :( Re-written to accommodate old and new refresh systems based on whether register_ajax() function exists.
Updated by Kill Bill about 7 years ago
Steve Beaver wrote:
Re-written to accommodate old and new refresh systems based on whether register_ajax() function exists.
I'm just totally confused now. This was only committed to RELENG_2_3_4? The idea is pretty good to avoid maintaining different code for different branches, but kinda pointless when it's not used for 2.4.
Also, there's https://github.com/pfsense/FreeBSD-ports/pull/402 so perhaps could handle this in a way that doesn't cause Squid to be bumped 4 times a day. :)
P.S. Tested 0.4.40 with 2.3.4-p1 and it indeed works properly without breaking the dashboard.
Updated by Anonymous about 7 years ago
I made a mistake. It was fixed as fast as possible and then fixed more comprehensively. Stuff happens.
The codebase wherein each widget does its own thing, and where contention issues exist needs to be left behind. It no longer exists in the 2.4 branch so I don't feel that I should add complexity to the code in case it should magically reappear one day. - It won't.
It has gone from 2.3 as well, but we have the issue that people running an older version of code can update to a new version of the widget - hence my mistake. While there are obvious advantages to having all the active branches containing the same code, there are more advantages, IMO, to keeping the code that is going forward clean, neat and maintainable. - In my mind at least.
Updated by Kill Bill about 7 years ago
Well that's not a problem. I thought the intent of your latest fix was to have the same code on 2.3 and 2.4; if that's not the case, well no biggie. I don't see anyone touching the widget code anytime soon again -- unless broken by future pfSense code changes.