Issue Bug Closed

#84879set_localizedUid($l10nParent) changes the $l10nparent instand of the new created Entity (over the createAction)

alem ramic 04/26/18, 11:17 updated 11/07/26, 18:03

Description

Hello guys

i’ve an approach to build a form that creates an object and his translation at the same time (one submit).
So i do that with jquery.ajax.

there are two forms and with one submit i fire first the german than i get the uid of the germans one after that i fire the french one and set on this post the $_localizedUid.
Both forms have a hiddenfield “$_languageUid” with the value of the languages they have to post. additionally i add on the f:form this one additionalParams=”{L:‘1’}”.

so everythings works fine. if i post both forms without localizedUid it works like excepted but if i add now this to my second post (post the french form with the uid of the record who is created in the german form) this thngs happen:

1. the french object isnt french. it is the default language without l10n_parent
2. the german object – who was on creating ok – will be updated: i get the values from the french entity (for example i get the french title) and he is self on french.

so setting the $localizedUid dosent work on the object and he update the referenced object who should be the translationorigin….

several settings ($querySettings->setRespectSysLanguage/ setLanguageMode, setLanguageOverlayMode etc) doesn’t helps anything.

Why is typo3 this kind of hard to the translations.
a form that create severall data on severall language is a normal approach…

Reviews 0

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

History 5

  1. alem ramic changed removed the assignee priority Must have Should have <span data-processor="relativetime" data-value="2018-04-29T16:23:04+00:00" > 04/29/18, 16:23 </span>

  2. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-07T18:03:59+00:00" > 11/07/26, 18:03 </span>

    _localizedUid is the uid of the translated row that Extbase overlays onto a default-language object when reading. On persisting, Backend::updateObject() replaces the row uid with _localizedUid (see Persistence/Generic/Backend.php), so setting it to the uid of the German record updates that record. It is not a way to create a translation.

    To create a translation, set _languageUid and map/set the l10n_parent field on the new object yourself, or create the translation via DataHandler. Extbase has no dedicated API for creating translations.

    If this is still valid for you in v14, please open a new issue and provide information how to reproduce it. Thanks!