I haven’t seen this error before, indeed the code should make sure that that value is not null before trying to insert it into the database. Could you share the site you’re seeing this on, and if you know it, which page or link is causing this error to be generated?
I can’t tell which page is causing the error. It seems very sporadic… it has happened 6 times over the past 24 hours. The website is fytogreen.com.au
I’ve tried triggering the error by viewing pages across the site, and then looking at the error_log file to see if it’s logged a new entry but I can’t figure out how it’s being triggered.
I’m having the same error in the log, a lot of lines like this one actually:
[15-Oct-2024 22:30:49 UTC] WordPress database error Column ‘link_id’ cannot be null for query INSERT INTO wp7c_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_v2
We are still seeing this error in our server logs.
eg.
[10-Feb-2025 23:08:43 UTC] WordPress database error Column ‘link_id’ cannot be null for query INSERT INTO wp_21_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_v2
Any update on this?
We are still seeing this error in our server logs:
[15-May-2025 04:01:09 UTC] WordPress database error Column ‘link_id’ cannot be null for query INSERT INTO wp_21_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_v2, QM_DB->query
It’s been several months since first reported… can someone respond?
I just gave up an uninstalled the plugin…