[TYPO3-dev] Possible bug: Relations with MM_opposite_field don't update the relation count of opposite field

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Feb 25 14:36:45 CET 2010


Hi,

> could you please post your hook solution here?
> It would save my day! Thanks!

I recently found some missing features in my hook solution. I needed the 
functionality for group fields, but my hook is for now only working with 
select fields (foreign_table). I also noticed that if you edit the 
'local' side, the foreign side doesn't get updated (of course), because 
it's nowhere defined that there is a bidirectional relation here. So in 
future there might be a additional option/setting needed for the local 
side to define that it's bidirectional. But besides of that it's working 
like a charm.

http://pastebin.com/hSpkTp6Z

Please note that it's only working in recent 4.4 trunk, because I make 
use of a recently added feature where old and new MM relations get 
stored in a cache inside TCEMain (mmHistoryRecords). So for 4.3 you 
would need to apply the according TCEMain patch or find another way to 
find out the old relations inside the hook (that's what I tried at first 
until I found that mmHistoryRecords in latest trunk).

Hth.
-- 
kind regards,
Franz Koch




More information about the TYPO3-dev mailing list