I have a bit of TCA headache. I want to configure two records of the same table as combinable
,
so I have a field that let's you select records of the same table, but i need that bidirectional.
If I edit record #1 and select #2 as combinable
, then I expect #1 selected when I open record #2.
I'm aware of bidirectional mm relations, but it seems that it won't work if both sides are handled by the same table AND the same field.
Any ideas?
UPDATE: I've attached a possible solution. Unfortunatelly it works by replacing the TYPO3 RelationHandler
.
// ... TCA
'combinable_adventures' => [
'label' => $lll . '.combinable_adventures',
'config' => [
'type' => 'select',
'foreign_table' => 'tx_tripshop_domain_model_adventure',
'foreign_table_where' => ' AND tx_tripshop_domain_model_adventure.tour = ###REC_FIELD_tour### AND tx_tripshop_domain_model_adventure.uid <> ###THIS_UID###',
'foreign_sortby' => 'sorting',
'MM' => 'tx_tripshop_domain_model_adventure_combinations',
'MM_opposite_field' => 'combinable_adventures',
'maxitems' => 99,
],
],
Thanks for this @smichaelsen
TYPO3 v10 version: