Highfivery / zero-spam-for-wordpress

The WordPress Zero Spam plugin makes blocking spam a cinch without all the bloated options. Just install, activate, and say goodbye to spam.
https://wordpress.org/plugins/zero-spam/
72 stars 32 forks source link

tab Blocked IPs is empty #308

Closed EnerKnis closed 2 years ago

EnerKnis commented 2 years ago

WordPress version: 5.9 ZeroSpam version: 5.2.12

Zero Spam for WordPress Dashboard 1) tab Blocked IPs is empty, nothing found. Plus unable to "Add Blocked IP Address" : error "Please enter a valid IP address." 2) tab Log : all IPs are shown but unable to "Add/Update Blocked IP". Changing Type or Reason, both will give the error "Please enter a valid IP address."

Database looks ok: wdps_wpzerospam_log holds 599 records wdps_wpzerospam_blocked holds 1411 records

PHP Error message: [Sun Feb 20 17:02:32.084645 2022] [proxy_fcgi:error] [pid 28866:tid 139933224015616] [client xx.xx.xx.xx:xxxxx] AH01071: Got error 'PHP message: WordPress databasefout You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc LIMIT 50' at line 1 bij query SELECT * FROM wdps_wpzerospam_blocked WHERE key_type IN ('country_code','region_code','zip','city') ORDER BY desc LIMIT 50 gemaakt door require_once('wp-admin/admin.php'), do_action('dashboard_page_wordpress-zero-spam-dashboard'), WP_Hook->do_action, WP_Hook->apply_filters, ZeroSpam\Core\Admin\Dashboard->dashboard_page, ZeroSpam\Core\Admin\Tables\BlockedLocations->prepareitems, ZeroSpam\Includes\DB::query', referer: https://xxxxxxxxxx.com/wp-admin/index.php?page=wordpress-zero-spam-dashboard&tab=blocked

key_type 'ip' is missing and ORDER BY is empty, key_type = "ip" ORDER BY date_added would work.

[Sun Feb 20 17:47:25.194396 2022] [proxy_fcgi:error] [pid 23297:tid 139933215622912] [client xx.xx.xx.xx:xxxxx] AH01071: Got error 'PHP message: WordPress databasefout You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc LIMIT 50' at line 1 bij query SELECT * FROM wdps_wpzerospam_blocked WHERE key_type = "ip" ORDER BY desc LIMIT 50 gemaakt door require_once('wp-admin/admin.php'), do_action('dashboard_page_wordpress-zero-spam-dashboard'), WP_Hook->do_action, WP_Hook->apply_filters, ZeroSpam\Core\Admin\Dashboard->dashboard_page, ZeroSpam\Core\Admin\Tables\BlockedTable->prepare_items, ZeroSpam\Includes\DB::query', referer: https://xxxxxxxxxx.com/wp-admin/index.php?page=wordpress-zero-spam-dashboard&tab=blocked

ORDER BY is empty, ORDER BY date_added would work.

Previous ZeroSpam version was ok, problem started on 18/19-02-2022 after update to version 5.2.12.

bmarshall511 commented 2 years ago

@EnerKnis Thanks for the report! This will be fixed in the next release.