#105319Extbase domain model combined identity for localized entries
Description
Hello,
After the upgrade to TYPO3 v12 we started receiwing following error after property mapping back to the object from the f:form:
Exception while property mapping at property path "idea": The identity property "16901_16902" is no UID.
It looks it changed in the core https://github.com/TYPO3/typo3/blob/v12.4.22/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php#L137
Following piece of code cause the error: https://github.com/TYPO3/typo3/blob/v12.4.22/typo3/sysext/extbase/Classes/Property/TypeConverter/PersistentObjectConverter.php#L228
Combined identifier is created by Form VH from here: https://github.com/TYPO3/typo3/blob/v12.4.22/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php#L198
So any form input like this:
<f:form.hidden value="{idea}" property="idea" />
results in this:
<input type="hidden" name="tx_ext_plugin[idea][__identity]" value="16901_16902">
same goes for checkboxes, etc …
In the default language, it’s ok, the problem is only for localized records
—————————
EDIT This has been also question on slack, added link here as reference.
https://stackoverflow.com/questions/79361820/typo3-extbase-localized-id-from-datamapper-does-not-map-in-propertymapper
Reviews 5
- 13.4 89084[BUGFIX] Fix f:form SelectViewHelper with wrong localized UID scheme
- main 88891[BUGFIX] Fix f:form SelectViewHelper with wrong localized UID scheme
- 13.4 88562[BUGFIX] Fix extbase persistence with wrong localized UID scheme
- 12.4 88563[BUGFIX] Fix extbase persistence with wrong localized UID scheme
- main 87915[BUGFIX] Fix extbase persistence with wrong localized UID scheme
Related issues 1
History 914
-
Garvin Hicking changed Related to #59992 <span data-processor="relativetime" data-value="2024-10-16T10:52:11+00:00" > 10/16/24, 10:52 </span>
-
Garvin Hicking changed Tags
extbae, property mapperextbase, property mapper Is Regression 1 <span data-processor="relativetime" data-value="2024-10-16T10:52:25+00:00" > 10/16/24, 10:52 </span> -
Andreas Kostner commented <span data-processor="relativetime" data-value="2024-12-19T10:44:27+00:00" > 12/19/24, 10:44 </span>
-
Andreas Kostner commented <span data-processor="relativetime" data-value="2024-12-19T12:01:02+00:00" > 12/19/24, 12:01 </span>
To add to this.
In v12 the Select Viewhelper and Persistance use the UID_UIDtranlsated format and it seems that the new Propertymapper / doMapping does not account for that. -
Gerrit Code Review pushed patch set 1 for main to change 87915 status
NewUnder Review <span data-processor="relativetime" data-value="2025-01-28T10:36:36+00:00" > 01/28/25, 10:36 </span> -
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-01-28T10:45:28+00:00" > 01/28/25, 10:45 </span>
I’ve created a “simple” patch for this which may help with it. Would be happy to get feedback on this.
-
Andreas Kostner commented <span data-processor="relativetime" data-value="2025-01-28T10:56:54+00:00" > 01/28/25, 10:56 </span>
Patch seem to work fine for me!
-
Stefan Bürk changed description <span data-processor="relativetime" data-value="2025-02-06T22:25:44+00:00" > 02/06/25, 22:25 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 87915 <span data-processor="relativetime" data-value="2025-02-28T20:08:07+00:00" > 02/28/25, 20:08 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 87915 <span data-processor="relativetime" data-value="2025-03-02T07:35:02+00:00" > 03/02/25, 07:35 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88562 <span data-processor="relativetime" data-value="2025-03-10T18:19:05+00:00" > 03/10/25, 18:19 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 88563 <span data-processor="relativetime" data-value="2025-03-10T18:19:14+00:00" > 03/10/25, 18:19 </span>
-
Garvin Hicking commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-03-10T18:55:09+00:00" > 03/10/25, 18:55 </span>Applied in changeset commit:62804096e9446a2855514b3df028f08c8b0955ba.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:32:52+00:00" > 12/02/25, 14:32 </span>
I’ve run into this problem too after upgrading to v12.
I can’t edit any record in the secondary language anymore. Every select field gets values with _ and saving the record gives then errors such as:
Exception while property mapping at property path “branche”: The identity property “22_48” is no UID.
—> I just checked on an old dev copy running on v11. There the SELECT gets filled with the uid’s from the original language “22”.
Is there a setting in v12 I’m missing or why is it rendered with the form-viewhelper wrongly now?