When saving, the DataHandler calls fillInFieldArray, which calls checkValue, which calls checkValueForGroupSelect, which at last calls castReferenceValue - and that one converts the empty string to a 0.
generic_gallery
tt_content.tx_generic_gallery_collection has the exact same settings in Configuration/TCA/Overrides/tt_content.php as pages.mount_pid.
During debugging I found that this configuration changes, and DataHandler has a different config than what is written in the Overrides file: type: inline, foreign_table: sys_file_collection, maxitems: 1, no default
When creating a gallery plugin with a file collection, saving that and then removing the file collection and saving again, an error occurs:
As suspected in #35, this is because the SQL mode of the MariaDB server is not empty but
The problem can be worked around by modifying the database connection in
LocalConfiguration.php
:TYPO3 core
The TYPO3 core uses the same configuration but does see this bug. Example:
pages.mount_pid
.mount_pid int(10) unsigned DEFAULT '0' NOT NULL,
type: group, internal_type: db, maxitems: 1, default: 0
When saving, the
DataHandler
callsfillInFieldArray
, which callscheckValue
, which callscheckValueForGroupSelect
, which at last callscastReferenceValue
- and that one converts the empty string to a0
.generic_gallery
tt_content.tx_generic_gallery_collection
has the exact same settings inConfiguration/TCA/Overrides/tt_content.php
aspages.mount_pid
.During debugging I found that this configuration changes, and
DataHandler
has a different config than what is written in the Overrides file:type: inline, foreign_table: sys_file_collection, maxitems: 1, no default
So the problem is that the conversion to the inline selection removes the default value, and
castReferenceValue
is unable to use it!