Review 14.3 Merged

95677[BUGFIX] Avoid stale deleted state on reprocessed files

Stefan Bürk CR +2 V +2 Normal +70 −0 updated 09/07/26, 09:38

Commit message

When a processed file is detected as outdated - for example because
the original file was changed externally, or because a rename on a
remote storage such as S3 alters the modification time - the stale
physical file is removed as a side effect of
ProcessedFile->needsReprocessing(), which also marks the in-memory
object as deleted.

Processors that do not immediately write a new local file never reset
this flag: the DeferredBackendImageProcessor (used by the file list
tiles view) only assigns a new target name and processing URL, and
image processors fall back to the original file via
setUsesOriginalFile() when no processing is required. Any subsequent
access to the very same object, such as getForLocalProcessing() when
building an ImageResource, then throws a RuntimeException
"File has been deleted" (1329821486).

The deleted state is now reset in the two places where the processed
file object starts a new life cycle: when a new target file name is
assigned, and when the object is switched to delegate to the original
file. This keeps the flag intact for actually deleted files while
making all processor implementations behave consistently, as the
reset no longer only happens in updateWithLocalFile().

Review

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

Issues 2

Files 2

Review log 34

  1. Stefan Bürk uploaded patch set 1 09/07/26, 09:24

  2. core-ci voted on patch set 1 V +1 09/07/26, 09:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107991

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 09/07/26, 09:38

  4. Stefan Bürk merged patch set 2 09/07/26, 09:38