Syntax errors in editor.js

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

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

Syntax errors in editor.js

#1 Post by pjhutch » Wed May 01, 2019 3:17 am

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
Cacti map  error.png
Screenshot of error in Chrome with developer tool tab open.
Cacti map error.png (112.72 KiB) Viewed 367 times

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Syntax errors in editor.js

#2 Post by Howie » Wed May 01, 2019 3:39 am

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.98 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

#3 Post by pjhutch » Wed May 01, 2019 3:50 am

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: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Syntax errors in editor.js

#4 Post by Howie » Wed May 01, 2019 4:11 am

There definitely were fixes between the test versions (otherwise there wouldn't have been multiple ones :-) )
Weathermap 0.98 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