#106323Import throws error because inline fields has no DB default value
Description
Hi!
I get an error when trying to import a t3d or xml file. (test data is an empty page)
TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(): Argument #2 ($string) must be of type string, null given, called in /var/www/html/vendor/typo3/cms-core/Classes/DataHandling/DataHandler.php on line 2586
the problem is an inline field on the page table that has no default value in the DB
in this case from the blog extension:
CREATE TABLE pages (
comments text,
'comments' => [
'label' => $ll . 'pages.comments',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_blog_domain_model_comment',
'foreign_field' => 'parentid',
'foreign_table_field' => 'parenttable',
'size' => 10,
'maxitems' => 9999,
'autoSizeMax' => 30,
'multiple' => 0,
'appearance' => [
'collapseAll' => 1,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
'showAllLocalizationLink' => 1,
],
],
],
setting $valueArray in the checkValueForInline function to [] when $value is null should fix it, but who knows what that would ruin elsewhere :D
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.