#19443Localization of IRRE-children for n:m relations with useCombination=1
Description
related to #0006087
Is it planned to extend the localization feature of IRRE for n:m relations in useCombination=1 mode?
We have the following database model (n:m relation, intermediate table with additional fields beside the foreign keys):
1 person has many projects. A project has many persons. A person has a special role in a project. Therefore we have 3 tables: person — person-project — project. The role is a field in the person-project table.
In the person we have IRRE-fields for person-project records with useCombination=1. So you can edit the role (field in person-project) and also you can edit the project in the person record.
With the localization mode “select” you can translate the person-project records with the button “synchronize”. The problem is now, that all the created localized person-project records reference correctly to the localized person record but to the projects in the default language what is definitely wrong.
Instead the projects should also have been localized when pressing the “synchronize”-Button.
Looking at the other side: Editing projects and inside the projects the related persons:
Localizing the related project results and pressing the “syncronize” button in the localized records results in new localized person-project records with reference to the correct localized project but the wrong reference to the persons in the default language.
The missing feature is a way to handle localization for editing the m:n relations from each side via IRRE (from persons or from projects), resulting in person-project records where both foreign keys reference correctly to the localized projects and persons.
I tried also to define the foreign keys in person-project as l10n_mode=>‘exclude’, because the relation between persons and projects is the same in translation as in the original language. When I clicked “synchronize” in person, it results in creating new project records in the default language, this is a misbehaviour.
here is our tca:
$TCA[“tx_smshisdb_person”] = array (
“project” => Array (
“exclude” => 0,
“label” => “LLL:EXT:sms_his_db/locallang_db.xml:tx_smshisdb_person.project”,
“config” => Array (
“type” => “inline”,
“foreign_table” => “tx_smshisdb_person_project”,
“foreign_field” => “uid_person”,
“foreign_label” => “uid_project”,
“appearance” => Array (
“useCombination” => 1,
‘showSynchronizationLink’ => 1,
‘showAllLocalizationLink’ => 1,
‘showPossibleLocalizationRecords’ => 1,
‘showRemovedLocalizationRecords’ => 1,
),
‘behaviour’ => array(
‘localizationMode’ => ‘select’,
‘localizeChildrenAtParentLocalization’ => 1,
),
“foreign_selector” => “uid_project”,
“foreign_unique” => “uid_project”,
)
),
),
);
$TCA[“tx_smshisdb_person_project”] = array (
“uid_person” => Array (
“exclude” => 0,
“label” => “LLL:EXT:sms_his_db/locallang_db.xml:tx_smshisdb_person_project.uid_person”,
“config” => Array (
“type” => “select”,
“foreign_table” => “tx_smshisdb_person”,
“foreign_table_where” => “ AND tx_smshisdb_person.sys_language_uid=###REC_FIELD_sys_language_uid### ORDER BY tx_smshisdb_person.nachname”,
“size” => 1,
“minitems” => 0,
“maxitems” => 1,
)
),
“uid_project” => Array (
“exclude” => 0,
“label” => “LLL:EXT:sms_his_db/locallang_db.xml:tx_smshisdb_person_project.uid_project”,
“config” => Array (
“type” => “select”,
“foreign_table” => “tx_smshisdb_project”,
“foreign_table_where” => “ AND tx_smshisdb_project.sys_language_uid=###REC_FIELD_sys_language_uid### ORDER BY tx_smshisdb_project.uid”,
“size” => 1,
“minitems” => 0,
“maxitems” => 1,
)
),
“role” => Array (
“exclude” => 0,
“label” => “LLL:EXT:sms_his_db/locallang_db.xml:tx_smshisdb_person_project.role”,
“config” => Array (
“type” => “input”,
“size” => “30”,
)
),
);
$TCA[“tx_smshisdb_project”] = array (
“person” => Array (
“exclude” => 0,
“label” => “LLL:EXT:sms_his_db/locallang_db.xml:tx_smshisdb_project.person”,
“config” => Array (
“type” => “inline”,
“foreign_table” => “tx_smshisdb_person_project”,
“foreign_field” => “uid_project”,
“foreign_label” => “uid_person”,
“appearance” => Array (
“useCombination” => 1,
“expandSingle” => 1,
“collapseAll” => 1,
‘showSynchronizationLink’ => 1,
‘showAllLocalizationLink’ => 1,
‘showPossibleLocalizationRecords’ => 1,
‘showRemovedLocalizationRecords’ => 1,
),
“foreign_selector” => “uid_person”,
“foreign_unique” => “uid_person”,
“behaviour” => Array (
“localizationMode” => “select”,
),
),
),
);
(issue imported from #M9526)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 8
-
Alexander Bohndorf commented <span data-processor="relativetime" data-value="2008-10-28T16:55:57+00:00" > 10/28/08, 16:55 </span>
-
Alexander Opitz commented and changed status
NewNeeds Feedback target version <span data-processor="relativetime" data-value="2013-05-07T23:10:09+00:00" > 05/07/13, 23:10 </span>The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
-
Alexander Opitz commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2013-09-09T10:14:02+00:00" > 09/09/13, 10:14 </span>No feedback for over 90 days.
-
Claus Due commented and changed status
ClosedAccepted <span data-processor="relativetime" data-value="2017-01-28T12:07:52+00:00" > 01/28/17, 12:07 </span>Revived, a solution has been found. Patch coming shortly!
-
Susanne Moog commented and changed category status
AcceptedNeeds Feedback assigned to Claus Due <span data-processor="relativetime" data-value="2017-10-29T16:36:16+00:00" > 10/29/17, 16:36 </span>Claus, are you still working on this?
-
Oliver Hader changed priority
Should haveCould have <span data-processor="relativetime" data-value="2017-11-14T17:09:59+00:00" > 11/14/17, 17:09 </span> -
Alexander Opitz commented and changed status
Needs FeedbackNew removed the assignee <span data-processor="relativetime" data-value="2018-02-16T11:58:03+00:00" > 02/16/18, 11:58 </span>Response from Claus on Slack: “nope – patch ended up with side effects and never got submitted”
-
Christian Kuhn commented and changed status
NewClosed <span data-processor="relativetime" data-value="2025-06-03T18:31:36+00:00" > 06/03/25, 18:31 </span>hey.
i hope it is ok taking the decision to close this issue (again): inline n:m useCombination plus localize is a rather obscure, seldom used, edgy configuration. the issue is very old without further feedback or tons of watchers. the tca is quite outdated.
if something like this is still needed, we probably have quite a bit of work: styleguide examples, a core data scenario extension, a set of tests – i’d estimate a week to really get going, to see the current state and what is really needed. as long as nobody actively picks this up (in a fresh issue), i’d say we’re good to close here.
this behaviour can be solved with the following TCA in the config-array for the intermediate table fields uid_person and uid_project:
“localizeReferencesAtParentLocalization” => 1,
but there is still another bug:
“localizeReferencesAtParentLocalization” => 1,
does not work together with
“config”/“behavior”/“localizeChildrenAtParentLocalization” => 1 for the field “project” in table tx_smshisdb_project”. If you try to localize a project with this configuration it results in an empty form (ajax response error).