Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.65k stars 406 forks source link

1.2.x - unknown sorting columnt (combaination with plugin reportit) #5695

Closed xmacan closed 8 months ago

xmacan commented 8 months ago

Go to management -> Reports Set sorting column (public, state, ...) Go to Reporting tab

In logs will be SQL error:

2024-03-17 16:41:00 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column 'public' in 'order clause' 2024-03-17 16:40:46 - CMDPHP SQL Backtrace: (/reports_admin.php[166]:reports(), /lib/html_reports.php[1909]:db_fetch_assoc(), /lib/database.php[707]:db_fetch_assoc_prepared(), /lib/database.php[727]:db_execute_prepared()) 2024-03-17 16:40:46 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column 'last_run' in 'order clause'

TheWitness commented 8 months ago

Up late.

TheWitness commented 8 months ago

Must be a session name.

TheWitness commented 8 months ago

I suspect that ReportIT plugin is using the same settings session variable as Cacti's reports.

image

The session is $_SESSION['sess_reports'] set in the function call:

validate_store_request_vars($filters, 'sess_reports');

If you can fix this in ReportIT, I would appreciate it.

xmacan commented 8 months ago

Ok, I will fix it

TheWitness commented 8 months ago

@xmacan, Thanks!

xmacan commented 8 months ago

Fixed in reportit plugin, closing