Fatal Error: ‘link_id cannot be null’ in Track The Click Plugin on PHP 8+
-
Hi there,
I’ve recently started encountering intermittent blank pages on my WordPress site (https://sniptoit.com), and after some investigation, I’ve traced the issue to a fatal database error triggered by the Track The Click plugin.
Here’s the relevant error from the debug log:
WordPress database error Column ‘link_id’ cannot be null for query INSERT INTOwp5s_track_the_click_hit(link_id) VALUES (NULL) made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Track_The_Click_Public->track_click_v2This error appears to be happening intermittently, possibly when a click is being tracked without a valid
link_id. The issue only became apparent after I upgraded to PHP 8.3 (though it persisted when I rolled back to PHP 8.0), so it may be related to stricter error handling in newer PHP versions.For now, I’ve disabled the plugin and that has stopped the blank pages from appearing. If there’s a fix or update planned, or if I can help troubleshoot further, I’d be happy to assist.
Thanks in advance!
— Ian
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.