Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Nov 18, 2018 9:59 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [SOLVED] Strange Editor Issue
PostPosted: Sun Sep 02, 2018 3:10 am 
Offline
Cacti User

Joined: Thu Apr 22, 2010 1:23 pm
Posts: 58
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.

Top
 Profile  
 
 Post subject: Re: Strange Editor Issue
PostPosted: Sun Sep 02, 2018 4:54 am 
Offline
Cacti Guru User
User avatar

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

Quote:
    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!)


Top
 Profile  
 
 Post subject: Re: Strange Editor Issue
PostPosted: Sun Sep 02, 2018 5:11 am 
Offline
Cacti User

Joined: Thu Apr 22, 2010 1:23 pm
Posts: 58
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:
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?


Top
 Profile  
 
 Post subject: Re: Strange Editor Issue
PostPosted: Sun Sep 02, 2018 5:24 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5274
Location: United Kingdom
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/php-weathermap-0.98a-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!)


Top
 Profile  
 
 Post subject: Re: Strange Editor Issue
PostPosted: Sun Sep 02, 2018 5:36 am 
Offline
Cacti User

Joined: Thu Apr 22, 2010 1:23 pm
Posts: 58
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.


Top
 Profile  
 
 Post subject: Re: Strange Editor Issue
PostPosted: Sun Sep 02, 2018 11:04 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5274
Location: United Kingdom
Is the error you get now still the exact same error? Because
Code:
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!)


Top
 Profile  
 
 Post subject: Re: Strange Editor Issue
PostPosted: Mon Sep 03, 2018 12:17 am 
Offline
Cacti User

Joined: Thu Apr 22, 2010 1:23 pm
Posts: 58
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:
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:
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.


Top
 Profile  
 
 Post subject: Re: Strange Editor Issue
PostPosted: Mon Sep 03, 2018 1:06 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5274
Location: United Kingdom
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!)


Top
 Profile  
 
 Post subject: Re: Strange Editor Issue
PostPosted: Mon Sep 03, 2018 1:23 am 
Offline
Cacti User

Joined: Thu Apr 22, 2010 1:23 pm
Posts: 58
Thank you so much!

That did it :)


Top
 Profile  
 
 Post subject: Re: [SOLVED] Strange Editor Issue
PostPosted: Wed Oct 10, 2018 5:23 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5274
Location: United Kingdom
I'd appreciate some feedback on the test4 release, if you are still using it:
https://github.com/howardjones/network-weathermap/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!)


Top
 Profile  
 
 Post subject: Re: [SOLVED] Strange Editor Issue
PostPosted: Wed Oct 10, 2018 6:49 pm 
Offline
Cacti User

Joined: Thu Apr 22, 2010 1:23 pm
Posts: 58
Done.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group