Hey guys -
I use CB to power multiple event registration sites. After each year's event, I need to reset certain user profile fields in prep for the next event.
After upgrading to Jooma4, I ran into an issue resetting datetime fields using native MySQL.
CB creates datetime fields like this: <column name="acceptedtermsconsent" type="sql:datetime" null="false" default="0000-00-00 00:00:00" />,
e.g. NOT NULL DEFAULT '0000-00-00 00:00:00'
Because Joomla 4 implements strict mode, the MySQL sql_mode variable contains "NO_ZEROE_DATE" which prevents me from resetting a datetime field; "0000-00-00 00:00:00" is not allowed, and the field can't be NULL. The work around was to temporarily modify the sql_mode variable inside my reset SQL transaction: SET sql_mode=(SELECT REPLACE(@@sql_mode,"NO_ZERO_DATE", ""));
All other date fields accept NULL.
Will you be addressing datetime fields as NULLable in an upcoming release?