87915[BUGFIX] Fix extbase persistence with wrong localized UID scheme
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Torben Hansen +1
- Benni Mack +1
-
Verified V +2 Done
- Garvin Hicking +2
- Benni Mack +1
- core-ci +1 CI
Issues 2
Files 1
Review log 1417
-
Garvin Hicking uploaded patch set 1 01/28/25, 10:36
-
Garvin Hicking commented on patch set 1 01/28/25, 10:37
A sample extension to test this with: https://github.com/bytesinmotion/b4b Please see slack thread for further info: https://typo3.slack.com/archives/C0CRS7RFH/p1738047624729679 -
core-ci voted on patch set 1 V +1 01/28/25, 10:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73089
-
Garvin Hicking commented on patch set 1 01/28/25, 10:44
(Ideally we should add a functional test covering this scenario, I just don't know how to create such a test covering this easily - if someone has a "boilerplate" for it please let me know) -
Garvin Hicking commented on patch set 1 02/04/25, 08:47
From Mathias Brodala in Slack: ``` I wonder if the SelectViewhelper should be adjusted instead to directly use $value->getUid() instead, with all necessary checks around that. This will then always be the default language UID, even for localizations, thus a reliable value. The backend normally handles this the same way. ``` -
Garvin Hicking commented on patch set 1 02/04/25, 09:19
More notes, better link to the whole slack thread: https://typo3.slack.com/archives/C03AM9R17/p1738657226055599 ``` - Adjust SelectViewHelper to not use getIdentifierByObject() but $value->getUid() - Adjust AbstractFormFieldViewHelper's `convertToPlainValue()` to also use $value->getUid() (I'm afraid of breakage here?) AbstractFormViewHelper.php has the comment "intentionally not using getIdentifierByObject" there already - Does PersistenceManager->registerNewObject() need adoption too? - Does JsonView->transformObject() need adoption too? - Add "important.rst" to state this "x_y" uid usage and urge 3rd party code to not use getIdentifierByObject() where specific UIDs shall be returned for linking? ``` ``` PersistenceManager::registerNewObject() also looks broken, but unrelated to this topic. If you register multiple unpersisted objects, only the last one will be kept, with null as identifier. ``` -
Garvin Hicking updated the commit message in patch set 2
V +102/28/25, 20:08 -
core-ci voted on patch set 2 V +1 02/28/25, 20:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74923
-
Christian Kuhn voted on patch set 2 CR +1 V +1 03/02/25, 01:27
-
Christian Kuhn commented on patch set 2 03/02/25, 01:27
PersistentObjectConverter.php:205a not here this is legacy handling that should be changed to not happen anymore wouldn't be bad. -
Garvin Hicking commented on patch set 3
CR +1V +103/02/25, 07:35Published edit on patch set 2. -
core-ci voted on patch set 3 V +1 03/02/25, 07:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74959
-
Torben Hansen voted on patch set 3 CR +1 03/04/25, 18:28
-
Garvin Hicking commented on patch set 3 03/04/25, 19:11
PersistentObjectConverter.php:205ReplyDone -
Benni Mack voted on patch set 3 CR +1 V +1 03/10/25, 16:21
-
Garvin Hicking commented on patch set 3 CR +2 V +2 03/10/25, 18:51
We discussed this in a group. I will be merging this as an intentional provisionary fix discussed with Torben, Benni and Christian, because it can potentially negatively impact most extbase relation operations through `<f:form.select>`. The todo note is placed to properly look into this, but we're lacking time to do that at this time. Help is appreciated to address this in a follow-up, and should then also at best include functional tests covering the scenario. -
Garvin Hicking merged patch set 4 03/10/25, 18:52