Hello,
I’m afraid it’s not a known problem. What do you have set for your server and WordPress timezones?
Hello,
Thanks for your answer.
I’ve checked the timezone and I found that it was erroneous on WordPress.
But after corrected it, the problem is not solved.
Also, I’ve uninstalled and installed again, but not works.
timedatectl
Local time: Tue 2022-03-29 12:43:43 CEST
Universal time: Tue 2022-03-29 10:43:43 UTC
RTC time: Tue 2022-03-29 10:43:43
Time zone: Europe/Madrid (CEST, +0200)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
It sounds like you’re comfortable looking in the database itself – is the timestamp on the hit records still showing up as “0000-00-00 00:00:00”? Is the database you’re using a normal MySQL or MariaDB installation?
Yes, the records still “0000-00-00 00:00:00”.
The MySQL is normal:mysql-community-server-8.0.23
It looks like your MySQL has a non-default setting (explicit_defaults_for_timestamp disabled). https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html
I’ll update Track The Click to use an explicit default – look for a new version with this change in the next day or two.
This var is enabled:
mysql> show variables like 'explicit_defaults_for_timestamp';
+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| explicit_defaults_for_timestamp | ON |
+---------------------------------+-------+
1 row in set (0.00 sec)
I just tested with the variable enabled and disabled and the result is the same.
I have changed the table wp_track_the_click_hit.
In the field ‘timestamp’ I’ve put the value ‘CURRENT_TIMESTAMP’.
CREATE TABLE
wp_track_the_click_hit` (
id
bigint UNSIGNED NOT NULL,
link_id
bigint UNSIGNED NOT NULL,
timestamp
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;`
Now works fine!
Thanks a lot.
Perfect, thank you for testing the change that’s coming in the next version!
0.2.19 has just been released which fixes this issue.