Syntax errors in editor.js

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
pjhutch
Posts: 2
Joined: Tue Apr 30, 2019 10:48 am

Syntax errors in editor.js

Post by pjhutch »

I have found a couple of syntax errors in editor.js in Weathermap 0.98a (test1):

jQuery(document).unload(cleanupJS);

I replaced this with the following equivalent statement.
window.onunload(cleanupJS);

I also found the following error:

Uncaught syntax errror, unrecognised expression: area[id^=LINK:]

Line 88 or 89: jQuery("area[id^=LINK:]").attr("href","#").click(click_handler);

attr = https://www.javatpoint.com/jquery-attr
click = https://www.javatpoint.com/jquery-click

Any ideas, how to fix this?.
I think it is preventing the map from being editable.
Attachments
Screenshot of error in Chrome with developer tool tab open.
Screenshot of error in Chrome with developer tool tab open.
Cacti map error.png (112.72 KiB) Viewed 1966 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Syntax errors in editor.js

Post by Howie »

https://www.network-weathermap.com/file ... -test4.zip

Was the last of those 0.98a test releases, soon to be just 0.98a. Does that have this issue?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
pjhutch
Posts: 2
Joined: Tue Apr 30, 2019 10:48 am

Re: Syntax errors in editor.js

Post by pjhutch »

Thanks, it looks like editor.php has been updated. I will try it out and let you know how it goes.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Syntax errors in editor.js

Post by Howie »

There definitely were fixes between the test versions (otherwise there wouldn't have been multiple ones :-) )
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest