Cacti / plugin_reportit

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

Viewing report results breaks plugin #18

Closed SergejLT closed 5 years ago

SergejLT commented 6 years ago

Created report. Runed. Watching results cant sort them by any columns. Report breaks and plugins automaticly disables. Cant even sort by list of 10,20,... and etc. breaks plugin. In the report search not working. breaks also.

Viewing report results seems to me there are aloot of problems

netniV commented 6 years ago

Do you have any error logs to show what is happening ? If there are multiple issues, can you report them separately (unless they all seem to the same sort of backtrace).

SergejLT commented 6 years ago

2018/04/12 08:20:01 - CMDPHP SQL Backtrace: (/plugins/reportit/view.php: 64 standard)(/plugins/reportit/view.php: 197 db_fetch_assoc)(/lib/database.php: 361 db_fetch_assoc_prepared)(/lib/database.php: 402 cacti_debug_backtrace)

2018/04/12 08:20:01 - DBCALL ERROR: SQL Assoc Failed!, Error: Unknown column 'traffic_in__3' in 'order clause'

2018/04/12 08:20:01 - DBCALL ERROR: SQL Assoc Failed!, Error:1054, SQL:'SELECT a.*, b.description AS template_description FROM plugin_reportit_reports AS a INNER JOIN plugin_reportit_templates AS b ON b.id = a.template_id WHERE a.last_run!=0 AND a.user_id=866 ORDER BY traffic_in__3 DESC LIMIT 0,40'

netniV commented 6 years ago

This would suggest that a name from row is being used as a column sort order which will never work. Do you have screenshots of how you build up this report?

netniV commented 6 years ago

Hi @SergejLT, I know it's been a while (apologises), can you capture the URL that's being used to view the page? You can find it in the Apache access logs or by using the network tab of the browser's development debugging tools.

gmourani commented 6 years ago

Same problem for me, when going into the reporting page and trying to use the filtering feature, this returns a blank page and disable the reportit plugin.

Here a screenshot of the network tab of my browser. Hope it's this one you asked for. screen shot 2018-09-06 at 9 59 57 am

SergejLT commented 5 years ago

filtering and sorting with the new report plugin now works.