Issue Bug Under Review Stale

#102336Add support for localizing n:1 relations

Jan Kornblum 11/07/23, 10:08 updated 07/22/26, 10:16

Description

When localizing a parent-child relationship (IRRE) from the parent side, DataHandler correctly creates the localized children and also sets their “parent” relation (n:1) field to the localized parent.

But when localizing a parent-child relationship from the other (child) side (or localizing any record containing n:1 relations in general), DataHandler does not set these (n:1) relations to point to the localized record (instead, they point to the L=0 record). This is not a consistent behavior and at least breaks extbase, too.

The current behaviour is also problematic in the following use case: When having a parent-child relationship with 100 parents each owning 100 children. In addition to the “parent” (n:1) relation, these children also contain any other n:1 relations to different models. Now after localizing a “parent”, for each “children” these additional n:1 relations must be modified manually by an editor to point to the localized record (which is impossible when dealing with larger datasets).

My suggestion is, when localizing a record containing any n:1 relation, DataHandler should behave like this:

  • Lookup if there is any localized version of this (n:1) relation target
  • If there is, set the relation to the localized records uid
  • If there isn’t, set the relation to the original records uid (as a fallback)

Reviews 1

History 67

  1. Jan Kornblum changed subject Add support for localizing n:1 relations to DataHandler Add support for localizing n:1 relations <span data-processor="relativetime" data-value="2023-11-07T10:11:20+00:00" > 11/07/23, 10:11 </span>