Error on duplication of graph template

Beta testing discussion area

Moderators: Moderators, Developers

Post Reply
Author
Message
Rno
Cacti User
Posts: 325
Joined: Wed Dec 07, 2011 9:19 am

Error on duplication of graph template

#1 Post by Rno » Thu Oct 25, 2018 10:09 am

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
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5

netniV
Cacti Guru User
Posts: 2686
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

#2 Post by netniV » Fri Oct 26, 2018 7:14 am

Is this reproducible? Can you list the steps that you took when ensuring it's reproducible?

netniV
Cacti Guru User
Posts: 2686
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

#3 Post by netniV » Fri Oct 26, 2018 7:15 am

Also, which server is this on as I noticed your signature has two vastly different versions?

Rno
Cacti User
Posts: 325
Joined: Wed Dec 07, 2011 9:19 am

Re: Error on duplication of graph template

#4 Post by Rno » Mon Oct 29, 2018 3:06 am

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!
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Rno
Cacti User
Posts: 325
Joined: Wed Dec 07, 2011 9:19 am

Re: Error on duplication of graph template

#6 Post by Rno » Mon Oct 29, 2018 8:10 am

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!
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5

netniV
Cacti Guru User
Posts: 2686
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

#7 Post by netniV » Mon Oct 29, 2018 8:52 am

Is this logged on GitHub? If not, open one up whilst I'm looking into it.

netniV
Cacti Guru User
Posts: 2686
Joined: Sun Aug 27, 2017 12:05 am

Re: Error on duplication of graph template

#8 Post by netniV » Mon Oct 29, 2018 8:54 am

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.

Rno
Cacti User
Posts: 325
Joined: Wed Dec 07, 2011 9:19 am

Re: Error on duplication of graph template

#9 Post by Rno » Mon Oct 29, 2018 9:07 am

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
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5

Post Reply