[SOLVED] Strange Editor Issue

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
JohnYYC
Cacti User
Posts: 58
Joined: Thu Apr 22, 2010 1:23 pm

[SOLVED] Strange Editor Issue

#1 Post by JohnYYC » Sun Sep 02, 2018 3:10 am

I'm really scratching my head with this one. This all started after I upgraded from 14.04 LTS to 16.04 LTS.

I'm able to access the editor from within cacti and also from outside cacti.

I can see all my .conf files and can open them.

That's where things get strange. Once I open a .conf file I can't click on any of the items in the menu bar or on the map. I can however click on anything in the bottom Debug area such as "Do Nothing".

OS: Ubuntu 16.04.5 LTS
Cacti Version: 0.8.8f
RRDTool Version: 1.5.5
PHP Version: 5.6.36-1+ubuntu16.04.1+deb.sury.org+1
Apache Version: Apache/2.4.18 (Ubuntu)
MySQL Version: 5.7.23-0ubuntu0.16.04.1 - (Ubuntu)

Any idea's as to what my issue may be?
Last edited by JohnYYC on Mon Sep 03, 2018 1:23 am, edited 1 time in total.

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

Re: Strange Editor Issue

#2 Post by Howie » Sun Sep 02, 2018 4:54 am

Sounds like a Javascript issue. The "Do Nothing" link is a normal HTML link. All the toolbar buttons are activated using Javascript. You didn't mention which Weathermap version you are using though - the earlier 0.98a 'test' versions had some Javascript issues that would look like this - if you are using those, make sure you are using test4.

Check the Javascript Console for error messages.

[pasting from netniV's excellent summary of how to do this]
  1. Using the keyboard by pressing Press Ctrl+Shift+J or F12 (or Cmd+Shift+J on a Mac)
    1. Internet Explorer only accepts F12
    2. Firefox accepts both, though Ctrl-Shift-J is only for Browser Log Window, not the developer tools
    3. Chrome and Edge accept both combinations.
If your log is clear, keep it open and refresh the page as sometimes browsers do not keep historical info of errors. For firefox, you may need to check box the Browser log and the Console log
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!)

JohnYYC
Cacti User
Posts: 58
Joined: Thu Apr 22, 2010 1:23 pm

Re: Strange Editor Issue

#3 Post by JohnYYC » Sun Sep 02, 2018 5:11 am

Thanks for the prompt reply.

Oops. I'm using Weathermap Version 0.98a.

I cleared the console history and then went to the main editor page, selected a .conf file and got the following errors:

Code: Select all

TypeError: jQuery(...).unload is not a function editor.js:44:1
<anonymous> http://cacti.lan/cacti/plugins/weathermap/editor-resources/editor.js:44:1

Error: Syntax error, unrecognized expression: area[id^=LINK:] jquery.min.js:2:12961
E</oe.error	http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:12961
E</oe.tokenize	http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:18940
E</oe.select	http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:21833
oe		http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:6808
find		http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:24398
w.fn.init	http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:24883
w		http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:896
attach_click_events	http://cacti.lan/cacti/plugins/weathermap/editor-resources/editor.js:88:5
initJS	http://cacti.lan/cacti/plugins/weathermap/editor-resources/editor.js:66:9
l	http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:29373
a/</c<	http://cacti.lan/cacti/plugins/weathermap/vendor/jquery/dist/jquery.min.js:2:29677

sendTimingEvent addSite start undefined undefined verboseLoggerHooks.js:1:1120 
I know nothing about javascript so it makes no sense to me..

Any idea's?

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

Re: Strange Editor Issue

#4 Post by Howie » Sun Sep 02, 2018 5:24 am

Which 0.98a? There isn't a release version yet, only 4 test versions. The first (at least) had some javascript issues (which this looks like)

Please could you retry with http://www.network-weathermap.com/files ... -test4.zip
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!)

JohnYYC
Cacti User
Posts: 58
Joined: Thu Apr 22, 2010 1:23 pm

Re: Strange Editor Issue

#5 Post by JohnYYC » Sun Sep 02, 2018 5:36 am

I'm not sure which, all I see is 0.98a on the editor page. I downloaded it years ago.

I tried test4 and get the same things in the console.

Could it have to do with a package that was upgraded when I upgraded Ubuntu from 14.04 to 16.04?

I wish I still had my VM snapshot to revert. I never thought to check the editor after upgrading Ubuntu last year. Lesson learned.

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

Re: Strange Editor Issue

#6 Post by Howie » Sun Sep 02, 2018 11:04 am

Is the error you get now still the exact same error? Because

Code: Select all

Error: Syntax error, unrecognized expression: area[id^=LINK:] jquery.min.js:2:12961
is definitely something I remember fixing after test1.

If that's still the error you are seeing then (a) it isn't caused by any package changes and (b) I think you have somehow got parts of two versions installed.
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!)

JohnYYC
Cacti User
Posts: 58
Joined: Thu Apr 22, 2010 1:23 pm

Re: Strange Editor Issue

#7 Post by JohnYYC » Mon Sep 03, 2018 12:17 am

I did the following and now I'm getting somewhere.

I disabled weathermap in cacti.
Uninstalled weathermap in cacti.
Deleted the weathermap folder from the plugins folder.
Dropped any weathermap related tables and weathermap entries in the plugin_hooks table from the cacti database.
Downloaded 0.98a-test4 using the provided link.
Unzipped 0.98a-test4.
Installed in cacti.
Enabled in cacti.

I'm now able to use the editor without issue. :D

BUT. I've now got an issue inside cacti related to weathermap.

When I go to the "Weathermaps Management" page I get the following error:

Code: Select all

The weathermap_maps table is missing completely from the database. Something went wrong with the installation process.
Which is strange because the plugin hooks are back in the plugin_hooks table, which I had also manually removed.

I am missing any table that starts with "weathermap" inside the cacti database I think there was 4 of them before. Should all the tables not have been made when installing and enabling weathermap on the plugin management page? The following is in the cacti error log:

Code: Select all

09/02/2018 11:16:03 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT m.*, g.name AS groupname FROM weathermap_maps m,weathermap_groups g WHERE m.group_id=g.id AND active='on' ORDER BY sortorder,id"
09/02/2018 11:16:03 PM - SYSTEM THOLD STATS: Time:0.1036 Tholds:67 TotalHosts:22 DownHosts:0 NewDownHosts:0
09/02/2018 11:16:03 PM - SYSTEM STATS: Time:1.8323 Method:spine Processes:1 Threads:6 Hosts:23 HostsPerProcess:23 DataSources:455 RRDsProcessed:294
09/02/2018 11:16:03 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:03 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:03 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
09/02/2018 11:16:01 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select distinct weathermap_data.id, weathermap_data.last_value, weathermap_data.last_time, weathermap_data.data_source_name, data_template_data.data_source_path, data_template_data.local_data_id, data_template_rrd.data_source_type_id from weathermap_data, data_template_data, data_template_rrd where weathermap_data.local_data_id=data_template_data.local_data_id and data_template_rrd.local_data_id=data_template_data.local_data_id and weathermap_data.local_data_id<>0;"
I confirmed my include/config.php has the correct info in it so shouldn't have an issue connecting to mysql.

I can restore from a backup but I would like to start weathermap from scratch and restore only my configs in a effort to prevent the editor error from coming back.

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

Re: Strange Editor Issue

#8 Post by Howie » Mon Sep 03, 2018 1:06 am

There's a setting in the settings table that Weathermap uses to decide if it needs to update the database. It's called weathermap_version. If you remove that, and then do the uninstall/install plugin, it should recreate the tables.
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!)

JohnYYC
Cacti User
Posts: 58
Joined: Thu Apr 22, 2010 1:23 pm

Re: Strange Editor Issue

#9 Post by JohnYYC » Mon Sep 03, 2018 1:23 am

Thank you so much!

That did it :)

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

Re: [SOLVED] Strange Editor Issue

#10 Post by Howie » Wed Oct 10, 2018 5:23 pm

I'd appreciate some feedback on the test4 release, if you are still using it:
https://github.com/howardjones/network- ... issues/198
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!)

JohnYYC
Cacti User
Posts: 58
Joined: Thu Apr 22, 2010 1:23 pm

Re: [SOLVED] Strange Editor Issue

#11 Post by JohnYYC » Wed Oct 10, 2018 6:49 pm

Done.

Post Reply