Review 13.4 Merged

89084[BUGFIX] Fix f:form SelectViewHelper with wrong localized UID scheme

Stefan Bürk CR +2 V +2 Normal +86 −14 updated 04/12/25, 15:52

Commit message

Extbase `<f:form>` editing with relations to localized records
utilizes a `[defaultLanguageRecordUid]_[localizedRecordUid]` identity
scheme.

The two methods `SelectViewHelper->getOptionValueScalar()` and
`AbstractFormFieldViewHelper->convertToPlainValue()` access
these records with a compound identity like this, and return
their full identity string.

This however fails, when for example a model's property with
persisted localized records is checked against matching these
identities, and where just the defaultLanguageRecordUid is
expected (for an "is selected" check of <option> tags).

With this patch, the `getUid()` method calls are preferred
over the full identity, in case we're dealing with
`DomainObjectInterface` objects.

Tests to validate this behaviour in #106493
are adopted, now showing properly selected categories.

An Important.rest has been created to notify consumers of
the `AbstractFormFieldViewHelper` or
`persistenceManager->getIdentifierByObject()` about possibly
needed changes.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 5

Files 4

Review log 34

  1. Stefan Bürk commented on patch set 1 04/12/25, 15:44

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 04/12/25, 15:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77628

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 04/12/25, 15:52

  4. Stefan Bürk merged patch set 2 04/12/25, 15:52