[TYPO3-dev] processDatamap_afterDatabaseOperations called twice?

Christian Tauscher christian.tauscher at media-distillery.de
Tue Sep 22 11:48:39 CEST 2009


I have installed now EXT:devlog by Rene Fritz and Francois Suter. Great 
Tool, why didn't  I use this earlyer? Much better than only debug().


Back to business:

The logfile says The hook is calles twice. Why?

It has something to do with IRRE I use.

Sure, you will say - the reason!

But:
In my function I do a explicit test for my table. If the child tables 
are called (for what reason ever), nothing happens.


The Point is:

I have 2 IRRE Records. If I comment out all of them in TCA, one mail is 
sent as expected.

If I comment out only one of the IRREs, one mail is sent- good.

Change back to my two IRREs, two mails are sent - bad.

now the test:

Create a new IRRE field.
So there are three 3 IRREs, ans also 3 Mails are sent - very bad.



So the rule is: Conclusion:
1 mail for the master record (correct)
and n-1 mails for n IRREs (wrong)

So this seems to be the reason: IRRE.

I must find a way tho know If my hook is called recursively again by IRRE.

Who knows a way to achive this?
Maybe I could define a global counter variable to check more calls, but 
is this good behavior? If  I do so, is there a namespace for such things?

Thank you,

Christian.




More information about the TYPO3-dev mailing list