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

Bad navigation items cause Array to string conversion errors #2472

Closed
jdcoats opened this issue Mar 1, 2019 · 9 comments
Closed

Bad navigation items cause Array to string conversion errors #2472

jdcoats opened this issue Mar 1, 2019 · 9 comments
Labels
bug Undesired behaviour plugins Plugin related issue
Milestone

Comments

@jdcoats
Copy link

jdcoats commented Mar 1, 2019


2019/02/28  22:16:52 - CMDPHP PHP ERROR NOTICE Backtrace:   (
/index.php[26]:top_header(), 
/lib/functions.php[3171]:include_once(), 
/include/top_header.php[27]:draw_navigation_text(),  
/lib/functions.php[2537]:CactiErrorHandler()
)
2019/02/28 22:16:52 - ERROR PHP NOTICE: Array to string conversion  in file: 
/var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2537

image

@jdcoats
Copy link
Author

jdcoats commented Mar 1, 2019

just browsing around thold after creating tholds.

2019/02/28  22:27:44 - ERROR PHP NOTICE: Array to string conversion in file:  
  /var/www/localhost/htdocs/cacti/lib/functions.php  on line: 2537
2019/02/28 22:27:11 - CMDPHP PHP ERROR NOTICE Backtrace:   (
  /plugins/thold/thold_templates.php[67]:top_header(),  
  /lib/functions.php[3171]:include_once(),  
  /include/top_header.php[43]:draw_navigation_text(),  
  /lib/functions.php[2537]:CactiErrorHandler()
)
2019/02/28 22:27:11 - ERROR PHP NOTICE: Array to string conversion  in file: 
  /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2537
2019/02/28 22:27:11 - CMDPHP PHP ERROR NOTICE Backtrace:   (
  /plugins/thold/thold_templates.php[67]:top_header(),  
  /lib/functions.php[3171]:include_once(),  
  /include/top_header.php[27]:draw_navigation_text(),  
  /lib/functions.php[2537]:CactiErrorHandler()
)
2019/02/28 22:27:11 - ERROR PHP NOTICE: Array to string conversion  in file: 
  /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2537
2019/02/28 22:27:03 - CMDPHP PHP ERROR NOTICE Backtrace:   (
  /plugins/thold/thold_templates.php[73]:top_header(),  
  /lib/functions.php[3171]:include_once(),  
  /include/top_header.php[43]:draw_navigation_text(),  
  /lib/functions.php[2537]:CactiErrorHandler()
)
2019/02/28 22:27:03 - ERROR PHP NOTICE: Array to string conversion  in file: 
  /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2537
2019/02/28 22:27:03 - CMDPHP PHP ERROR NOTICE Backtrace:   (
  /plugins/thold/thold_templates.php[73]:top_header(),  
  /lib/functions.php[3171]:include_once(),  
  /include/top_header.php[27]:draw_navigation_text(),  
  /lib/functions.php[2537]:CactiErrorHandler()
)
2019/02/28 22:27:03 - ERROR PHP NOTICE: Array to string conversion  in file: 
  /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2537
2019/02/28 22:26:44 - CMDPHP PHP ERROR NOTICE Backtrace:   (
  /index.php[26]:top_header(), 
  /lib/functions.php[3171]:include_once(),  
  /include/top_header.php[49]:draw_navigation_text(),  
  /lib/functions.php[2537]:CactiErrorHandler()
)
2019/02/28 22:26:44 - ERROR PHP NOTICE: Array to string conversion  in file: 
  /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2537
2019/02/28 22:26:44 - CMDPHP PHP ERROR NOTICE Backtrace:   (
  /index.php[26]:top_header(), /lib/functions.php[3171]:include_once(),  
  /include/top_header.php[27]:draw_navigation_text(),  
  /lib/functions.php[2537]:CactiErrorHandler())
2019/02/28 22:26:44 - ERROR PHP NOTICE: Array to string conversion  in file: 
  /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2537

@jdcoats
Copy link
Author

jdcoats commented Mar 1, 2019


2019/02/28  22:30:32 - CMDPHP PHP ERROR WARNING Backtrace:   (
  /poller.php[796]:api_plugin_hook(),  
  /lib/plugins.php[74]:api_plugin_run_plugin_hook(),  
  /lib/plugins.php[177]:thold_poller_bottom(),  
  /plugins/thold/includes/polling.php[46]:thold_update_host_status(),  
  /plugins/thold/includes/polling.php[571]:CactiErrorHandler()
)
2019/02/28 22:30:32 - ERROR PHP WARNING in  Plugin 'thold': A  non-numeric value encountered in file:  
  /var/www/localhost/htdocs/cacti/plugins/thold/includes/polling.php  on  line: 571
2019/02/28 22:30:32 - CMDPHP PHP ERROR WARNING Backtrace:   (
  /poller.php[796]:api_plugin_hook(),  
  /lib/plugins.php[74]:api_plugin_run_plugin_hook(),  
  /lib/plugins.php[177]:thold_poller_bottom(),  
  /plugins/thold/includes/polling.php[46]:thold_update_host_status(),  
  /plugins/thold/includes/polling.php[570]:CactiErrorHandler()
)
2019/02/28 22:30:32 - ERROR PHP WARNING in  Plugin 'thold': A  non-numeric value encountered in file:  
  /var/www/localhost/htdocs/cacti/plugins/thold/includes/polling.php  on  line: 570

@jdcoats
Copy link
Author

jdcoats commented Mar 1, 2019

should i post this one in thold or wait?

@netniV netniV changed the title Trying to create thold for new device polling time Bad navigation items cause Array to string conversion errors Mar 1, 2019
netniV added a commit that referenced this issue Mar 1, 2019
Bad navigation items cause Array to string conversion errors
@netniV
Copy link
Member

netniV commented Mar 1, 2019

I've applied a suppression fix for this, it doesn't cure the issue but logs it to the cacti.log. If you update to the latest version and then check the log, you should see "Navigation Item Suppressed" messages, post them here for us to investigate. Likely an issue with the plugin but the core should handle it.

@netniV netniV added bug Undesired behaviour plugins Plugin related issue labels Mar 1, 2019
@netniV netniV added this to the v1.2.3 milestone Mar 1, 2019
@jdcoats
Copy link
Author

jdcoats commented Mar 1, 2019

2019/03/01  08:34:59 - CMDPHP PHP ERROR NOTICE Backtrace:   (/settings.php[257]:top_header(),  /lib/functions.php[3188]:include_once(),  /include/top_header.php[43]:draw_navigation_text(),  /lib/functions.php[2554]:CactiErrorHandler())
--
2019/03/01 08:34:59 - ERROR PHP NOTICE: Array to string conversion  in file: /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2554
2019/03/01 08:34:58 - CMDPHP PHP ERROR NOTICE Backtrace:   (/settings.php[257]:top_header(),  /lib/functions.php[3188]:include_once(),  /include/top_header.php[27]:draw_navigation_text(),  /lib/functions.php[2554]:CactiErrorHandler())
2019/03/01 08:34:58 - ERROR PHP NOTICE: Array to string conversion  in file: /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2554
2019/03/01 08:34:57 - CMDPHP PHP ERROR NOTICE Backtrace:   (/user_admin.php[71]:top_header(),  /lib/functions.php[3188]:include_once(),  /include/top_header.php[43]:draw_navigation_text(),  /lib/functions.php[2554]:CactiErrorHandler())
2019/03/01 08:34:57 - ERROR PHP NOTICE: Array to string conversion  in file: /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2554
2019/03/01 08:34:57 - CMDPHP PHP ERROR NOTICE Backtrace:   (/user_admin.php[71]:top_header(),  /lib/functions.php[3188]:include_once(),  /include/top_header.php[27]:draw_navigation_text(),  /lib/functions.php[2554]:CactiErrorHandler())
2019/03/01 08:34:57 - ERROR PHP NOTICE: Array to string conversion  in file: /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2554
2019/03/01 08:34:47 - CMDPHP PHP ERROR NOTICE Backtrace:   (/settings.php[257]:top_header(),  /lib/functions.php[3188]:include_once(),  /include/top_header.php[43]:draw_navigation_text(),  /lib/functions.php[2554]:CactiErrorHandler())
2019/03/01 08:34:47 - ERROR PHP NOTICE: Array to string conversion  in file: /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2554
2019/03/01 08:34:47 - CMDPHP PHP ERROR NOTICE Backtrace:   (/settings.php[257]:top_header(),  /lib/functions.php[3188]:include_once(),  /include/top_header.php[27]:draw_navigation_text(),  /lib/functions.php[2554]:CactiErrorHandler())
2019/03/01 08:34:47 - ERROR PHP NOTICE: Array to string conversion  in file: /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2554

2019/03/01  08:35:07 - CMDPHP PHP ERROR NOTICE Backtrace:   (/clog.php[40]:clog_view_logfile(),  /lib/clog_webapi.php[205]:general_header(),  /lib/functions.php[3203]:include_once(),  /include/top_general_header.php[49]:draw_navigation_text(),  /lib/functions.php[2554]:CactiErrorHandler())
--
2019/03/01 08:35:07 - ERROR PHP NOTICE: Array to string conversion  in file: /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2554
2019/03/01 08:35:07 - CMDPHP PHP ERROR NOTICE Backtrace:   (/clog.php[40]:clog_view_logfile(),  /lib/clog_webapi.php[205]:general_header(),  /lib/functions.php[3203]:include_once(),  /include/top_general_header.php[27]:draw_navigation_text(),  /lib/functions.php[2554]:CactiErrorHandler())
2019/03/01 08:35:07 - ERROR PHP NOTICE: Array to string conversion  in file: /var/www/localhost/htdocs/cacti/lib/functions.php  on line:  2554

@jdcoats
Copy link
Author

jdcoats commented Mar 1, 2019

installed the latest thold and this error does not happen.

@netniV
Copy link
Member

netniV commented Mar 1, 2019

But did you update Cacti's core before you saw all those issues? I'm assuming so. I noticed I made a mistake with current_action so the likelihood is that it was that field making the warning appear.

@jdcoats
Copy link
Author

jdcoats commented Mar 1, 2019

yes, I sync'd cacti core and still received the messages so I upgraded thold.

@netniV
Copy link
Member

netniV commented Mar 1, 2019

Ok, I'm going to close this for now. I've added some logic to record the problem should it happen again.

@netniV netniV closed this as completed Mar 1, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour plugins Plugin related issue
Projects
None yet
Development

No branches or pull requests

2 participants