WPIntell

Source evidence

SQL error when cleaning up options via cron job

Maspik – Ultimate Spam Protection · support · 2024-09-13T13:43:00+00:00

mixedsentiment
highseverity
0.95relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 32 rows with source links

15.6% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

27 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
speed4trade resolved
The cron job or WordPress triggers a cleanup process of maspik plugin once a day. Within the file contact-forms-anti-spam/includes/includes/functions.php there is a function named “maspik_clean_expired_ip_check_transients” The errornous SQL is: $wpdb->query(“DELETE FROM {$wpdb->options} WHERE option_name LIKE ‘ transient_maspik_ip_check %’ AND option_name NOT IN (SELECT CONCAT(‘ transient ‘, SUBSTRING(option_name, 20)) FROM {$wpdb->options} WHERE option_name LIKE ‘ transient_timeout_maspik_ip_check %’)”); This creates the following error message: Output: WordPress database error You can’t specify target table ‘wp_options’ for update in FROM clause for query MySQL doesn’t allow to deleting from a table when the subselect is using the same table. See also: https://dev.mysql.com/doc/refman/8.4/en/update.html Thank you so much for reporting, i will check it out soon It’s fixed at version 2.2.2 please update thank you Thanks for your help and quick response!

Comments

3 shown
yonifre 2024-09-13T13:53:00+00:00

Thank you so much for reporting, i will check it out soon

yonifre 2024-09-15T12:59:00+00:00

It’s fixed at version 2.2.2 please update thank you

speed4trade 2024-09-16T11:29:00+00:00

Thanks for your help and quick response!