Issue Bug Closed

#23980Relations with MM_opposite_field don't update the relation count of opposite field

Kevin Ulrich Moschallski 11/07/10, 17:24 updated 06/03/25, 19:35

Description

I use this config in TCA for symmetric relations between two tables:

Local side:

‘config’ => array(
‘type’ => ‘group’,
‘internal_type’ => ‘db’,
‘allowed’ => ‘tx_specialoffersmvc_domain_model_item’,
‘foreign_table’ => ‘tx_specialoffersmvc_domain_model_item’,
‘MM_opposite_field’ => ‘portals’,
‘MM’ => ‘tx_specialoffersmvc_portal_item_mm’,
‘MM_match_fields’ => array(
‘tablenames’ => ‘tx_specialoffersmvc_domain_model_portal’
),
‘size’ => 5,
‘maxitems’ => 9999
)

Foreign side:

‘config’ => array(
‘type’ => ‘group’,
‘internal_type’ => ‘db’,
‘allowed’ => ‘tx_specialoffersmvc_domain_model_portal’,
‘MM_match_fields’ => array(‘tablenames’ => ‘tx_specialoffersmvc_domain_model_portal’),
‘foreign_table’ => ‘tx_specialoffersmvc_domain_model_portal’,
‘foreign_field’ => ‘items’,
‘prepend_tname’ => 1,
‘size’ => 5,
‘maxitems’ => 9999,
‘MM’ => ‘tx_specialoffersmvc_portal_item_mm’,
)

The realation works fine but the field values aren’t updated correctly.

I found this in the mailing list:

http://lists.typo3.org/pipermail/typo3-dev/2010-February/038917.html

Franz Koch gave me the right posision to fix this. Unfortunately his approach with the TCEMain_postProc wasn’t availible anymore on the pastbin page.

So i tried to fix it in the core. I’ll append a patch for review. The patch is against TYPO3 4.4.4

(issue imported from #M16294)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.