Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt at fixing graph template duplication. #50

Closed
wants to merge 1 commit into from

Conversation

micke2k
Copy link
Contributor

@micke2k micke2k commented Apr 19, 2016

Graphs duplication throws error:

PHP Notice: Undefined index: t_general_header in /lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: scaling_header in /lib/utility.php on line 563, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: t_scaling_header in /lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: grid_header in /lib/utility.php on line 563, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: t_grid_header in/lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: axis_header in /lib/utility.php on line 563, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: t_axis_header in /lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: legend_header in /lib/utility.php on line 563, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: t_legend_header in /lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
PHP Notice: Undefined index: t_general_header in/lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php

Fixing by unsetting all headers before we duplicate. We probably shouldn't be reading them in, in the first place?

Graphs duplication throws error:

[Wed Apr 13 19:43:47.904730 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: t_general_header in /var/www/html/commitcommit4868/lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:43:47.904805 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: scaling_header in /var/www/html/commitcommit4868/lib/utility.php on line 563, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:43:47.904813 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: t_scaling_header in /var/www/html/commitcommit4868/lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:43:47.904844 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: grid_header in /var/www/html/commitcommit4868/lib/utility.php on line 563, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:43:47.904850 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: t_grid_header in /var/www/html/commitcommit4868/lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:43:47.904863 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: axis_header in /var/www/html/commitcommit4868/lib/utility.php on line 563, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:43:47.904868 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: t_axis_header in /var/www/html/commitcommit4868/lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:43:47.904881 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: legend_header in /var/www/html/commitcommit4868/lib/utility.php on line 563, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:43:47.904886 2016] [:error] [pid 5875] [client 192.168.206.1:25885] PHP Notice:  Undefined index: t_legend_header in /var/www/html/commitcommit4868/lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php
[Wed Apr 13 19:49:26.249934 2016] [:error] [pid 55534] [client 192.168.206.1:25932] PHP Notice:  Undefined index: t_general_header in /var/www/html/commitcommit4868/lib/utility.php on line 564, referer: http://192.168.206.136/cacti/graph_templates.php

Fixing by unsetting all headers before we duplicate. We probably shouldn't be reading them in, in the first place?
@cigamit
Copy link
Member

cigamit commented Apr 19, 2016

That's not the right way to solve this one. Will have to test it locally. Might be the fact that the default values are NULL in the database upgrade script. Check that if you have a moment.

@cigamit
Copy link
Member

cigamit commented Apr 19, 2016

micke, undo what you did and add the following to line 563

if ($array['method'] == 'spacer') continue;

see if that helps...

@cigamit
Copy link
Member

cigamit commented Apr 19, 2016

my proposed fix was inadvertently committed in 6591554

@cigamit cigamit closed this Apr 19, 2016
@micke2k
Copy link
Contributor Author

micke2k commented Apr 20, 2016

yes, that makes a lot more sense, ill test it.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants