[TYPO3-dam] mmforeign causes troubles...

Karl-Ernst Kiel kekiel at kekiel.de
Tue Jun 13 18:57:25 CEST 2006


Hi!

I found a solution to the "automatically growing number of DAM elements" 
using tt_news, dam_ttcontent and mmforeign:

When the backend form was loaded, the list of DAM elements was selected 
using the MM-Records in Table tx_newsdamcon_tt_news_dam_elements_mm. 
Additionaly the number of DAM elements (stored in column 
tx_newsdamcon_dam_elements in tt_news) was added to the results - so 
each time you loaded the form, an additional DAM element was added (pid 
= number of current DAM elemens).

Rupert Germann already fixed a similar bug regarding categorys:
http://bugs.typo3.org/view.php?id=3437
(see his posting in typo3.projects.dam 07.05.2006 17:11)

He modified function "renderRecord_selectProc" in 
"typo3conf\ext\mmforeign\class.ux_t3lib_transferdata.php".

I did the same with the function "renderRecord_groupProc" (same file).
After line 108 ("case 'db':") I added the following two lines:

// unset $data if table has a MM relation because it contains the count 
of records which is not used in mmforeign
if ($fieldConfig['config']['MM']) $data = false;

($data ist used as first argument in $loadDB->start(...))

I don´t know whether this is a "clean" solution an don´t know about 
possible "side effects", but that made my problems disappear :-)

Greetings,
Karl-E.



More information about the TYPO3-project-dam mailing list