Review main Ready for review

96587[BUGFIX] Resolve FlexForm file references outside frontend context

Wolfgang Klinger CR 0 V 0 Normal +83 −3 updated 11/17/26, 18:29

Commit message

FileRepository::findByRelation() resolved the TCA column of the
given field name in backend and CLI context and handed it to the
RelationHandler. File references stored by an inline field inside
a FlexForm have no such column: "pi_flexform" is of type "flex"
and yields no relations, and a stored field name like
"settings.file" is no TCA column at all and threw an exception.
The frontend path never looked at TCA, so the same call worked
there and returned nothing elsewhere.

The RelationHandler now keeps the configuration of a TCA column
that relates to sys_file_reference, so custom field name mappings
still work, and falls back to matching on the stored table and
field name for all other field names. The workspace handling of
the RelationHandler stays untouched. The PHPDoc now names the
restrictions that apply per context.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/87/96587/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/87/96587/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 1

Issues 2

Files 3

Review log 24

  1. Wolfgang Klinger uploaded patch set 1 10/10/26, 05:47

  2. core-ci voted on patch set 1 V +1 10/10/26, 06:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110755

  3. Benni Mack uploaded patch set 2 V +1 11/17/26, 18:23

  4. core-ci voted on patch set 2 V +1 11/17/26, 18:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114775