Feature #16089
closedwriteMM deletion trouble
0%
Description
assuming the following tca setup:
--------
"groups1" => Array (
"exclude" => 1,
"l10n_mode" => "exclude",
"label" => "LLL:EXT:test/locallang_db.php:tx_test_product.groups1",
"config" => Array (
"type" => "select",
"foreign_table" => "tx_test_product_group",
"foreign_table_where" => "and x=1 ORDER BY tx_test_product_group.uid",
"size" => 10,
"minitems" => 0,
"maxitems" => 100,
"MM" => "tx_test_product_prod_group_mm",
)
),
"groups2" => Array (
"exclude" => 1,
"l10n_mode" => "exclude",
"label" => "LLL:EXT:test/locallang_db.php:tx_test_product.groups2",
"config" => Array (
"type" => "select",
"foreign_table" => "tx_test_product_group",
"foreign_table_where" => "and x=2 ORDER BY tx_test_product_group.uid",
"size" => 10,
"minitems" => 0,
"maxitems" => 100,
"MM" => "tx_test_product_prod_group_mm",
)
),
--------
writeMM of class.t3lib_loaddbgroup.php would be called twice, so that only the groups2 would be saved because writeMM first deletes all relations. This will become a problem especially in common with e.g.dynaflex. I suggest to modify it to be aware of the "foreign_table_where" field. Withhin this context it may be also useful to integrate pid handling and bidirectional relations.
(issue imported from #M3347)