Error on duplication of graph template

Beta testing discussion area

Moderators: Developers, Moderators

Post Reply
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Error on duplication of graph template

Post by Rno »

I try to duplicate the Interface - Traffic (bits/sec) to Interface - Traffic (bits/sec) plus/minus
and i have this error:
Sorry we could not process your last action
SQL save on table 'snmp_query_graph' Column 'snmp_query_graph_id' does not exist unable to save

but the copy did succeed
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

Post by netniV »

Is this reproducible? Can you list the steps that you took when ensuring it's reproducible?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

Post by netniV »

Also, which server is this on as I noticed your signature has two vastly different versions?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: Error on duplication of graph template

Post by Rno »

Well on betta discussion, it's done on 1.2 beta

Yes it's reproducible take a graph from graph template, then do the action duplicate
and :
Sorry, we could not process your last action.

SQL Save on table 'snmp_query_graph': Column 'snmp_query_graph_id' does not exist, unable to save!
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

Post by netniV »

Is there a stack trace with the SQL error?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: Error on duplication of graph template

Post by Rno »

I got that in the log:
2018/10/29 09:05:14 - CMDPHP SQL Backtrace: (/graph_templates.php[49]:form_actions(), /graph_templates.php[261]:api_duplicate_graph(), /lib/api_graph.php[390]:sql_save())
2018/10/29 09:05:14 - DBCALL ERROR: SQL Save on table 'snmp_query_graph': Column 'snmp_query_graph_id' does not exist, unable to save!
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

Post by netniV »

Is this logged on GitHub? If not, open one up whilst I'm looking into it.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

Post by netniV »

Can you do me a favour though, try describing the SQL table:

Code: Select all

desc snmp_query_graph;
+-------------------+-----------------------+------+-----+---------+----------------+
| Field             | Type                  | Null | Key | Default | Extra          |
+-------------------+-----------------------+------+-----+---------+----------------+
| id                | mediumint(8) unsigned | NO   | PRI | NULL    | auto_increment |
| hash              | varchar(32)           | NO   |     |         |                |
| snmp_query_id     | mediumint(8) unsigned | NO   | MUL | 0       |                |
| name              | varchar(100)          | NO   |     |         |                |
| graph_template_id | mediumint(8) unsigned | NO   | MUL | 0       |                |
+-------------------+-----------------------+------+-----+---------+----------------+
It should look like that.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: Error on duplication of graph template

Post by Rno »

Code: Select all

MariaDB [cacti]> desc snmp_query_graph;
+-------------------+-----------------------+------+-----+---------+----------------+
| Field             | Type                  | Null | Key | Default | Extra          |
+-------------------+-----------------------+------+-----+---------+----------------+
| id                | mediumint(8) unsigned | NO   | PRI | NULL    | auto_increment |
| hash              | varchar(32)           | NO   |     |         |                |
| snmp_query_id     | mediumint(8) unsigned | NO   | MUL | 0       |                |
| name              | varchar(100)          | NO   |     |         |                |
| graph_template_id | mediumint(8) unsigned | NO   | MUL | 0       |                |
+-------------------+-----------------------+------+-----+---------+----------------+

And bug open on github
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest