Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Quiet

97246[BUGFIX] Separate file display and selection in file browsers

Stefan Froemken CR 0 V 0 Hard +299 −12 updated 10/31/26, 09:33

Commit message

Move IsFileSelectableEvent back into resourceSelectableMatcher
combined with ResourceFileExtensionMatcher via AndMatcher in both
FileBrowser and FileLinkHandler.

Disable the primary click action for non-selectable files in
FileList::renderName() and Tiles.fluid.html while keeping folders
clickable for navigation.

Introduce IsFileDisplayedEvent and evaluate it within
resourceDisplayMatcher in FileBrowser and FileLinkHandler to allow
hiding files from the listing.

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/46/97246/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/46/97246/2 && git cherry-pick FETCH_HEAD

Review

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

Issues 1

Files 8

Review log 46

  1. Stefan Froemken uploaded patch set 1 10/30/26, 22:13

  2. core-ci voted on patch set 1 V +1 10/30/26, 22:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112921

  3. Stefan Froemken voted on patch set 1 CR -1 10/30/26, 22:23

  4. Stefan Froemken uploaded patch set 2 CR -1 V +1 10/30/26, 22:34

  5. core-ci voted on patch set 2 V +1 10/30/26, 22:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112924

  6. Oli Bartsch commented on patch set 2 10/31/26, 09:33

    IsFileDisplayedEventTest.php:29 Unresolved

    This only tests the getters, so reverting the behaviour keeps everything green. This logic has already been added, removed and re-added, each time with a regression, so please let's add a functional test now. In `Mode::BROWSE`, a listener denying selection should give a disabled file with no primary action, checkbox or `+`. A folder should keep its primary action, and a file denied by `IsFileDisplayedEvent` should be absent.

    Feature-108711-IntroduceIsFileDisplayedEvent.rst:6 Unresolved

    Don't think this should go into 14.3, because listeners using `denyFileSelection()` to hide files will show them greyed after an update. If it stays main-only, this needs a breaking rst plus the Feature. Dropping the `FileLinkHandler` part keeps the 14.3 surface small, which makes a backport easier to justify.

    Important-108711-RestoreIsFileSelectableEventBehavior.rst:17 Unresolved

    "Restored" hides that this reverses a decision, since the event was never in `resourceSelectableMatcher`. Please say so in the commit message and RST, explain why the reasoning no longer holds and how the folder exemption avoids the #106818 regression. Also wee should relate to #106818 and #106560.

    Important-108711-RestoreIsFileSelectableEventBehavior.rst:22 Unresolved

    In v13.0.0 the event set `isSelectable` in `FileList::render()`. The move to the display matcher was deliberate.

    FileList.php:674 Unresolved

    The disabled state now applies to every `FileList` consumer. `CreateFileBrowser` has a `null` selectable matcher, so all its files render as greyed-out buttons. Please disable only when a selectable matcher is set and denied the file, or use an explicit primary-action flag set by `FileBrowser`, so the change stays inside the element browser.

    FileLinkHandler.php:84 Unresolved

    Please drop the `FileLinkHandler` part from this change. Setting a selectable matcher makes `FileList` render the checkbox column, check-all and `+` in every file link browser, but `multi-record-selection.js` isn't loaded there, so the controls do nothing.

    FileLinkHandler.php:97 Unresolved

    Please don't dispatch `IsFileSelectableEvent` here either. The event carries no context. A listener written for FAL relation fields (e.g. "no images without alt text") would suddenly block linking in the RTE as well. If you want it, a separate main-only change that adds request or browser context to the event would IMO be the way.