Filters don’t work – SQL error
-
Hi,
Since one of the last updates (I think since 4.9) filters don’t work for me.
I did some digging in the code and saw that an SQL error is the problem.
The sql call
$result_log_rows = $wpdb->get_results( $sql_query_log_rows, OBJECT_K ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
in web/app/plugins/simple-history/inc/class-log-query.php:409 gives the following error:Unknown column 'c1.value' in 'where clause'
If I change c1.value to context_message_key it works.
Also, the way this error is handled (exit if wpdb has last_error property) is not the best way of debugging, because of this error the simple history admin view just freezes after filtering but shows no error message.
Can you have a look at this problem? It seems to me that it doesn’t happen on all installations. Probably has something to do with sql version. I’m on version: mysqlnd 8.2.16
- The topic ‘Filters don’t work – SQL error’ is closed to new replies.