Bug #7785
closed
jQuery syntax error: unterminated regular expression literal
Added by Kill Bill over 7 years ago.
Updated about 7 years ago.
Affected Architecture:
All
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)
- Assignee set to Anonymous
- Status changed from New to Feedback
Possibly resolved by #7784
- 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.
- 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
- Status changed from Feedback to Resolved
@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
You are right :( Re-written to accommodate old and new refresh systems based on whether register_ajax() function exists.
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.
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.
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.
Also available in: Atom
PDF