You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System information:
TYPO3 11.5
PHP 7.4.30
MariaDB 10.5 (MySQL 5.5.5-10.5.15-MariaDB-0+deb11u1)
If you try to create a translation for a necessary_cookie_options item, the following SQL error is thrown: 2: SQL error: 'Incorrect integer value: '' for column db.tx_mindshapecookieconsent_domain_model_cookieoption.cookie_category at row 1' (tx_mindshapecookieconsent_domain_model_cookieoption:NEW636d1917988cd937434709)
The problem should be the new defaults for MariaDB. It enforces field types more strictly, and therefore '' is not cast to integer.
Adding a default => 0 value to the TCA configuration fixed the issue.
I could'nt reproduce this, will have to investigate further when I'm finding some time.
But as you describe the problem this also can be a core issue with the new mariadb features!?
Yes, it also could be a core issue. Depending on how the core handles default values.
It looks like empty string is the current default for at least select fields, but the column is defined as integer.
In older Mariadb/MySQL Versions this was cast to integer or ignored (I am not really sure)
Here are the current default sql modes for MySQL 5.7 and MariaDB 10.2 ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, and NO_ENGINE_SUBSTITUTION. https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
The flag STRICT_TRANS_TABLES should be responsible.
Strict mode. Statements with invalid or missing data are aborted and rolled back, except that for non-transactional storage engines and statements affecting multiple rows where the invalid or missing data is not the first row, MariaDB will convert the invalid value to the closest valid value, or, if a value is missing, insert the column default value.
System information:
TYPO3 11.5
PHP 7.4.30
MariaDB 10.5 (MySQL 5.5.5-10.5.15-MariaDB-0+deb11u1)
If you try to create a translation for a necessary_cookie_options item, the following SQL error is thrown:
2: SQL error: 'Incorrect integer value: '' for column db.tx_mindshapecookieconsent_domain_model_cookieoption.cookie_category at row 1' (tx_mindshapecookieconsent_domain_model_cookieoption:NEW636d1917988cd937434709)
The problem should be the new defaults for MariaDB. It enforces field types more strictly, and therefore '' is not cast to integer.
Adding a
default => 0
value to the TCA configuration fixed the issue.mindshape_cookie_consent/Configuration/TCA/tx_mindshapecookieconsent_domain_model_cookieoption.php
Lines 68 to 75 in 8aba632
The text was updated successfully, but these errors were encountered: