Project

General

Profile

Actions

Bug #105319

closed

Extbase domain model combined identity for localized entries

Added by ondro no-lastname-given 8 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2024-10-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.3
Tags:
extbase, property mapper
Complexity:
Is Regression:
Yes
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #59992: Persistence session doesn't take overlays into accountClosed2014-06-30

Actions
Actions #1

Updated by Garvin Hicking 8 months ago

  • Related to Bug #59992: Persistence session doesn't take overlays into account added
Actions #2

Updated by Garvin Hicking 8 months ago

  • Tags changed from extbae, property mapper to extbase, property mapper
  • Is Regression set to Yes
Actions #3

Updated by Andreas Kostner 6 months ago · Edited

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?

Actions #4

Updated by Andreas Kostner 6 months ago

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.

Actions #5

Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87915

Actions #6

Updated by Garvin Hicking 5 months ago

I've created a "simple" patch for this which may help with it. Would be happy to get feedback on this.

Actions #7

Updated by Andreas Kostner 5 months ago

Patch seem to work fine for me!

Actions #8

Updated by Stefan Bürk 4 months ago

  • Description updated (diff)
Actions #9

Updated by Gerrit Code Review 4 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87915

Actions #10

Updated by Gerrit Code Review 4 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87915

Actions #11

Updated by Gerrit Code Review 3 months ago

Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88562

Actions #12

Updated by Gerrit Code Review 3 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88563

Actions #13

Updated by Garvin Hicking 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF