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

Review main Ready for review

97056[BUGFIX] Keep file metadata when moving or renaming files

Benni Mack CR +1 V +1 Normal +136 −12 updated 11/10/26, 09:22

Commit message

Moving or renaming a file or folder re-indexed the affected files
including metadata extraction, which overwrote metadata edited by
users with extracted values again.

Files whose contents did not change now only get their sys_file
record updated via Indexer->updateIndexEntryOfRelocatedFile().
This also applies to files the indexer detects as moved.

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

Review

  • Code review CR +1 Needs a vote
    • Wouter Wolters +1
  • Verified V +1 Needs a vote
    • Oliver Klee +1
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 57

  1. Benni Mack uploaded patch set 1 10/23/26, 08:19

  2. core-ci voted on patch set 1 V -1 10/23/26, 09:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112244

  3. Benni Mack rebased onto patch set 2 V -1 10/23/26, 12:19

  4. core-ci voted on patch set 2 V +1 10/23/26, 12:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112293

  5. Wouter Wolters voted on patch set 2 CR +1 V +1 10/25/26, 09:48

  6. Oliver Klee voted on patch set 2 V +1 10/25/26, 10:38

  7. Oli Bartsch commented on patch set 2 10/25/26, 15:06

    Indexer.php:103 Unresolved

    Should this really be public API?

    ResourceStorage.php:1963 Unresolved

    the cross-storage branch of `moveFile()` now also goes throughh `updateIndexEntryOfRelocatedFile()`, so neither `autoExtractMetadata` nor `extractRequiredMetaData()` runs for the target storage. A file moved from a remote storage into a Local storage can keep 0/0 dimensions, while `copyFile()` extracts. Please either fill only the empty metadata keys when the storage changed, or state in the commit message that cross-storage moves no longer extract. Either way, we should cover this with a test.