Reputation: 394
I created a new content element which adds a field called heroslider to tt_content
.
The TCA looks like this:
'heroslider' => [
'config' => [
'type' => 'inline',
'allowed' => 'tx_ext_domain_model_heroslider_item',
'foreign_table' => 'tx_ext_domain_model_heroslider_item',
'foreign_field' => 'tt_content_uid',
'foreign_sortby' => 'sorting',
'foreign_label' => 'header',
'maxitems' => 99,
'appearance' => [
'collapseAll' => 1,
'expandSingle' => 1,
],
],
],
Now when I add a heroslider_item
in the BE, it gets stored properly, except for the field tt_content_uid
. This fields contains a zero instead of the uid
of the content element.
Do you have any idea what I am missing?
Thanks in advance!
Upvotes: 1
Views: 448
Reputation: 10800
In your table tx_ext_domain_model_heroslider_item
you miss a field for the reverse table name. at least you have not declared it in your relation:
foreign_table_field = parent_table
You know that your parent records always are tt_content
, but TYPO3 needs some help.
ANFSCD:
why do you have
'allowed' => 'tx_ext_domain_model_heroslider_item',
I can not find any documentation about an option allowed
.
Upvotes: 2