Cacti / plugin_reportit

ReportIt Plugin for Cacti
GNU General Public License v2.0
7 stars 8 forks source link

Raportit: Uncaught Error: Call to undefined function get_graph_permissions_sql() #98

Closed stefanbrudny closed 10 months ago

stefanbrudny commented 2 years ago

Hi there, I tried completing this howto again: viewtopic.php?t=31307

Upon selecting 'Add Data Items' I get:


[Thu Jun 09 21:18:52.717907 2022] [php7:notice] [pid 575983] [client 192.168.1.23:40576] PHP Notice:  Undefined index: ? in /var/www/html/lib/functions.php on line 3651, referer: https://192.168.1.34/plugins/reportit/reports.php?action=report_edit&id=1
[Thu Jun 09 21:18:52.718234 2022] [php7:notice] [pid 575983] [client 192.168.1.23:40576] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/lib/functions.php on line 3651, referer: https://192.168.1.34/plugins/reportit/reports.php?action=report_edit&id=1
[Thu Jun 09 21:18:52.719149 2022] [php7:notice] [pid 575983] [client 192.168.1.23:40576] PHP Notice:  Undefined index: ? in /var/www/html/lib/functions.php on line 3653, referer: https://192.168.1.34/plugins/reportit/reports.php?action=report_edit&id=1
[Thu Jun 09 21:18:52.719485 2022] [php7:notice] [pid 575983] [client 192.168.1.23:40576] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/lib/functions.php on line 3653, referer: https://192.168.1.34/plugins/reportit/reports.php?action=report_edit&id=1
[Thu Jun 09 21:18:52.755483 2022] [php7:notice] [pid 575983] [client 192.168.1.23:40576] PHP Notice:  Undefined index: ? in /var/www/html/lib/functions.php on line 3651, referer: https://192.168.1.34/plugins/reportit/reports.php?action=report_edit&id=1
[Thu Jun 09 21:18:52.755950 2022] [php7:notice] [pid 575983] [client 192.168.1.23:40576] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/lib/functions.php on line 3651, referer: https://192.168.1.34/plugins/reportit/reports.php?action=report_edit&id=1
[Thu Jun 09 21:18:52.757383 2022] [php7:notice] [pid 575983] [client 192.168.1.23:40576] PHP Notice:  Undefined index: ? in /var/www/html/lib/functions.php on line 3653, referer: https://192.168.1.34/plugins/reportit/reports.php?action=report_edit&id=1
[Thu Jun 09 21:18:52.757858 2022] [php7:notice] [pid 575983] [client 192.168.1.23:40576] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/lib/functions.php on line 3653, referer: https://192.168.1.34/plugins/reportit/reports.php?action=report_edit&id=1

More info: https://forums.cacti.net/viewtopic.php?p=287933#p287933

netniV commented 2 years ago

get_graph_permissions_sql seems to be an older function not present in recent versions of cacti. I'm going to guess that a new version of this function will have to be implemented by reportit or call a similar function that now exists if it does at all. Going to have to check with @browniebraun and @TheWitness

TheWitness commented 2 years ago

Yea, replaced by gatallowed*().

TheWitness commented 2 years ago

Just looked at the code and wow! @browniebraun... Help! You move to remove the permissions SQL kind of makes it work assuming you have no lockdowns on permissions. So, it's not bad, but we should do better.

TheWitness commented 2 years ago

Okay, did a small patch. Need a Cacti core AUTH api function to replace what was there.