Project

General

Profile

Actions

Bug #23980

open

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

Added by Kevin Ulrich Moschallski about 14 years ago. Updated about 1 year ago.

Status:
Accepted
Priority:
Could have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2010-11-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
nightmare
Is Regression:
No
Sprint Focus:

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)


Files

bug_16292.patch (4.91 KB) bug_16292.patch Administrator Admin, 2010-11-07 17:25
class.tx_elementshelpers_tcemain.php (4.41 KB) class.tx_elementshelpers_tcemain.php Administrator Admin, 2010-11-13 10:48

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #66574: Relations of definitions using MM_opposite_field are missing in ReferenceIndexClosed2015-04-24

Actions
Actions

Also available in: Atom PDF