[TYPO3-core] RFC: #11168: Wrong substitution of ###THIS_UID### in t3lib_loaddbgroup.php

Steffen Kamper info at sk-typo3.de
Wed Nov 4 01:04:48 CET 2009


Hi,

i want to drop this RFC for following reason:

MM_table_where isn't used in core, also nit in DAM and their extensions 
which uses MM very much.

The whole concept is a bit clouded. MM_table_where is a free 
configuration for TCA which is defined as "additional where clause for 
MM". So
1) naming is wrong, should be MM_table_andWhere
2) you should use it like 'MM_table_where' => ' AND 
tx_dam_mm_cat.uid_foreign!=###THIS_UID###' or simular.

Adding AND here would break other extensions having this defined.

3) totally underdocumented, missing any "real" example. From the naming 
you may think, it's simular to "foreign_table_where" which doesn't use 
AND, but this is wrong.

Looking to extbase, they also use it the wrong way, look to 
Datamp_testcase where they define
'MM_table_where' => 'WHERE 2=2',

I will report it in extbase list.

Joey, please have a look to your tagpack where you use it. Add the AND 
in your extension and everything should work fine.

4) Comparing loaddbgroup to the 
t3lib_beFunc::exec_foreign_table_where_query only replacing 
###THIS_UID### might be too less, there you see also other placeholders 
like ###CURRENT_PID###, ###THIS_CID###, ###STORAGE_PID### etc.
maybe we need real usecases to see what makes sense here, but for me it 
looks bit inconsistent.

Sry for writing long story, but i think this shows how it works. As 
nobody else complaint i think this is used very seldom. Anybody who 
configured MM in TCA know the many hours of try&error until 
configuration works as expected. Don't misunderstand, for core cases it 
works, but core has no real MM defined, this is something for 
extensions, and of course extbase which has to deal with that in datamapper.

vg Steffen


More information about the TYPO3-team-core mailing list