You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
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
To Reproduce
Go to simple history, filter on type (e.g. all plugin activity) and on clicking the search button the request fails and no filtered output is shown.
System information (please complete the following information):
WordPress version: 6.4.3
PHP version: 8.2
MySQL: 8.2
The text was updated successfully, but these errors were encountered:
Describe the bug
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
inweb/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
To Reproduce
Go to simple history, filter on type (e.g. all plugin activity) and on clicking the search button the request fails and no filtered output is shown.
System information (please complete the following information):
The text was updated successfully, but these errors were encountered: