[TYPO3-dev] writeMM problem

Nikolas Hagelstein hagelstein at shr.cc
Wed Apr 26 01:40:39 CEST 2006


Hi,
assuming i got 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.

Cheers,
            Nikolas




More information about the TYPO3-dev mailing list