When trying to save a new Survey type event, iPeer shows "Add event failed" and cannot save it.
Problem seems to be related to the Maria DB version 10.2.4 and later, in which Strict Mode is enabled by default.
For survey events, the result_release_date_begin and result_release_date_end fields for the event are not needed. CakePHP generated SQL to insert empty string '' instead of null. With Strict Mode turned on, this causes DB insertion error.
One possible fix is to turn off Strict Mode. e.g. adding command: --sql_mode="" in docker-compose.yml seems to get around it.
EDIT: With MariaDB 10.4.14, the default SQL modes:
When trying to save a new Survey type event, iPeer shows "Add event failed" and cannot save it.
Problem seems to be related to the Maria DB version 10.2.4 and later, in which Strict Mode is enabled by default.
For survey events, the
result_release_date_begin
andresult_release_date_end
fields for theevent
are not needed. CakePHP generated SQL to insert empty string''
instead ofnull
. With Strict Mode turned on, this causes DB insertion error.One possible fix is to turn off Strict Mode. e.g. adding
command: --sql_mode=""
indocker-compose.yml
seems to get around it.EDIT: With MariaDB 10.4.14, the default SQL modes:
Removing
STRICT_TRANS_TABLES
can avoid the issue.