Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm getting the following error on every page load...
There was an error collecting statistics data:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cache' in 'field list'
I looked in the accesslog table, and didn't see a cache column. I tried turning off the cache statistics, but it didn't eliminate the error. Only when I disabled the Better Statistics module did the error go away.
Comments
Comment #1
emclaughlin CreditAttribution: emclaughlin at Genuine commentedThis is happening to me, too. I'm not sure what caused it, but I did find a fix.
In a module's install file, add an update function like this:
This will add the cache column back to your access_log table. If you have other fields that are erroring out, add them to the array in better_statistics_enable_fields.