SQLSTATE[42S22]: Column not found: when using custom dimensions

(Ivanvtimofeev) #1

I’ve added a Custom Dimension for Actions. I can see a new menu item named the same name as the custom dimension I’ve created. But when I try to click that new menu item and see dimension values, I have an error: SQLSTATE[42S22]: Column not found: 1054 Unknown column
’log_link_visit_action.time_spent’ in ‘field list’ - caused by plugin

(Ivanvtimofeev) #2

I correct that. The problem was: the plugin CustomDimensions was not installed properly (the table log_link_visit_action huge and and not be altered). The decision: I’ve delete module and reinstall in manually using console.


This helped me to fix an issue on our instance after an upgrade, where time_spent was being set to NULL for all new logs, despite time_spent_ref_action being updated as normal. The root cause was that a migration had been performed, and Custom Dimensions was not installed (despite being configured database-side).

I hope this can save someone else the confusing process of debugging that error!