• Resolved NETPROFIT

    (@netprofit)


    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 INTO dhdl_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_insert

    I found these 2 topics related to this error:

    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
    WHERE
    option_name LIKE ('%\_transient\_ctf\_%')
    " );
    $wpdb->query( "
    DELETE
    FROM $table_name
    WHERE option_name LIKE ('%\_transient\_timeout\_ctf\_%')
    " );

    global $wpdb;
    $table_name = $wpdb->prefix . "options";
    $result = $wpdb->query("
    DELETE
    FROM $table_name
    WHERE option_name LIKE ('%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?

    • This topic was modified 11 months, 3 weeks ago by NETPROFIT.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Smash Balloon Louis

    (@smashballoonlouis)

    Hi @netprofit,

    Thanks for contacting us! I would first suggest going to the WordPress plugins page, deactivating and deleting the Twitter feed plugin, and then doing a fresh install and recreating your feed. If you’ve already done this and it does not resolve the problem, please send us a support request through out website here and we’ll be happy to take a closer look.

    Thanks!
    Louis

    Thread Starter NETPROFIT

    (@netprofit)

    Hi Louis,
    thanks for your reply!

    Unfortunately I don’t think I can create a new legacy feed after the reinstall though. So the current shortcodes won’t work afterwards.

    If I use the “preserve settings” option, the error still persists.

    Plugin Support Smash Balloon Louis

    (@smashballoonlouis)

    Hi @netprofit,

    It’s my pleasure to help and thanks for the update. Could you send us a support request through our website here  so we can take a closer look at this for you?

    Thanks!
    Louis

    Hi @smashballoonlouis,

    just a quick question before I send the support request:
    Do hashtag-feeds via legacy feeds + shortcodes still work in general? Because I saw that creating a new hashtag-feed now requires a subscription. So maybe that’s why it’s throwing an error?
    If yes, I would suggest catching that early on, so it does not come to an error only when trying to insert into the database.

    Plugin Support Smash Balloon Louis

    (@smashballoonlouis)

    Hi @greller,

    Thank you for the update. Under our current licensing for the Pro plugin, creating hashtag feeds requires the Plus version of the plugin or higher. Pro users who had an earlier license that allowed hashtag feeds are grandfathered in as long as they continued renewing their original license. Due to the rules of this forum though, we are only able to provide support here for the free version, so for Pro support we’d have to continue on a support request through our website.

    On new installations of the current version of the plugin, legacy feeds are not available. In some cases, such as the need to create feeds with dynamic shortcodes, we have a way to re-enable this though.

    I will also share your feedback here with our development team so they can review any updates that need to be made to handle cases like this better.

    Thanks!
    Louis

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘WordPress database error: cache_key cannot be null’ is closed to new replies.