WordPress database error: cache_key cannot be null
-
After upgrading from PHP 7.4 to PHP 8.4 I get this error:
WordPress database error Column 'cache_key' cannot be null for query INSERT INTOdhdl_ctf_feed_caches(cache_value,last_updated,cache_key,cron_update,feed_id) VALUES ('[\"error\"]', '2025-04-07 15:40:17', NULL, '', 'legacy') made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/dhdl/single-gruender.php'), do_shortcode, preg_replace_callback, do_shortcode_tag, ctf_init, TwitterFeed\CtfFeed->maybeCacheTweets, TwitterFeed\CtfCache->set_transient, TwitterFeed\CtfCache->update_or_insertI found these 2 topics related to this error:
- https://wordpress.org/support/topic/cache_key-cannot-be-null-for-query-insert-into-wp_ctf_feed_caches/
- https://wordpress.org/support/topic/database-error-in-2-1-1/
Unfortunately the settings do not work anymore (they just load forever), so I cleared the cache using this code:
global $wpdb;
$table_name = $wpdb->prefix . "options";
$wpdb->query( "
DELETE
FROM $table_name
WHEREoption_nameLIKE ('%\_transient\_ctf\_%')
" );
$wpdb->query( "
DELETE
FROM $table_name
WHEREoption_nameLIKE ('%\_transient\_timeout\_ctf\_%')
" );
global $wpdb;
$table_name = $wpdb->prefix . "options";
$result = $wpdb->query("
DELETE
FROM $table_name
WHEREoption_nameLIKE ('%ctf\_\!%')
");
delete_option( 'ctf_cache_list' );But the error still persists.
Why is the cache_key rendered NULL? Is there anything I can do against it?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘WordPress database error: cache_key cannot be null’ is closed to new replies.