Bug #67611
closedParent type in TCA work only after record saving
0%
Description
Hi,
I have a created a custom element who have a field defined as inline (IRRE).
This child element is used in several custom content elements. So to have different palette depending on the CType I have addes "'type' => 'tt_content:CType'" in my TCA.
It work fine when the IRRE exists really in the database (is not new) but if I create a new content element, the palettes with the index 0 is shown.
Thanks,
Eric
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Christian Kuhn over 9 years ago
The TCA of the child table points in its ctrl['type'] back to parent with 'tt_content:CType' ?
This can not work if "parent" is new and was not yet persisted and I see no chance to implement that in the near future.
Updated by Christian Kuhn over 9 years ago
The only way to achieve that is to have per CType that connects to the child one field which then holds the inline configuration to child and use the "foreign_types" inline option to override the child type array as needed. This will work, however, do not try to have different CTypes connected over the same field to child and have different "foreign_types" in a columnsOverrides, since this would lead to the same "it does not work if parent is new" issue. So, stick to one field per connection type.
Updated by Hannes Lau almost 9 years ago
To my eyes, this issue has not yet been resolved. So I wonder whether we could keep this issue open.
One solution would be, to add the type information of the parent record to the JSON stack.