Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Mar 25, 2019 12:42 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: can't associate new Graph Templates to data query
PostPosted: Thu Jan 24, 2019 3:54 am 
Offline

Joined: Mon Jan 17, 2011 6:13 am
Posts: 3
Hello!
cacti 1.2.1 Debian 9 php7.0.33
I have working data query, and I want to add new graph template to it. But when I select graph template and press 'create' button - nothing happened, and I've got message in cacti.log:
2019/01/24 09:18:49 - ERROR PHP NOTICE: Undefined variable: errors in file: /var/www/cacti10/data_queries.php on line: 172
2019/01/24 09:18:49 - CMDPHP PHP ERROR NOTICE Backtrace: (/data_queries.php[39]:form_save(), /data_queries.php[172]:CactiErrorHandler())
Any ideas? How to debug this priblem?

PS it's a fresh installation of cacti.


Top
 Profile  
 
 Post subject: Re: can't associate new Graph Templates to data query
PostPosted: Thu Jan 24, 2019 2:20 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2296
Add the following at line 168:

Code:
$errors = false;


Code:
diff --git a/data_queries.php b/data_queries.php
index b1d1740b..bfdbeb56 100644
--- a/data_queries.php
+++ b/data_queries.php
@@ -165,6 +165,7 @@ function form_save() {
                $header = '';

                if (!is_error_message()) {
+                       $errors = false;
                        if ($save['id'] > 0) {
                                $errors = api_data_query_errors($save['id'], $_POST);
                        }


It would be good if you can record this issue on GitHub

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: can't associate new Graph Templates to data query
PostPosted: Tue Feb 26, 2019 11:12 am 
Offline

Joined: Fri Feb 22, 2019 5:18 am
Posts: 12
https://github.com/Cacti/cacti/issues/2371


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 16 guests


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