Closed 4creator closed 6 months ago
Thank you very much for reporting the issue!
Indeed, this looks wrong. Seemingly, MySQL is tolerant in a lot of installations and I never got an error for myself.
You can try substituting NOW() by UTC_DATE(). That should provide a date instead of a datetime.
I will also check in my own installations in the next days. If it works, I will publish a bugfix release.
After diving deeper into this issue, I found out that MySQL does not accept dynamic default values for the date datatype if the rules are strictly applied. However, most of the installations seem to accept NOW() or CURRENT_TIMESTAMP() as default values and also convert datetimes into date. That is the reason why usually no errors occur.
To be on the save side, I changed the default value for date_start
to '2020-01-01'. I will publish a new release soon.
Hello,
I attempted to install the joomla_plugin_sexypolling_reloaded_v5.1.1.zip on Joomla 4.1.1, but encountered the following error and was unable to complete the installation: Invalid default value for 'date_start'
Upon inspecting the install.sql file, I found these lines:
Changing them to the following resolved the issue and allowed the installation to proceed:
According to ChatGPT, the use of the NOW() function is inappropriate for a DATE type column because it returns both date and time. A DATE type column should only have a date set as its default value.
I wanted to report this so that it can be addressed in future updates of the plugin.
Best regards