Review main Merged

93797[BUGFIX] Apply alias adaptation when warming backend module cache

Benni Mack CR +2 V +2 Normal +133 −0 updated 10/15/26, 08:22

Commit message

When modules register using a legacy identifier as their `parent` or
`position` reference (e.g. `'parent' => 'web'` instead of the current
`'parent' => 'content'`), the backend module cache warmer silently
stores those unadapted references.

The normal (non-warmed) load path in `ServiceProvider::getModuleRegistry`
calls `ModuleFactory::adaptAliasMappingFromModuleConfiguration()` before
writing to cache, which rewrites any legacy alias references to their
real module identifiers. The `getBackendModulesWarmer` closure that runs
during `cache:warmup --group system` was missing this call, so the alias
adaptation was never applied to the cached data.

On subsequent requests the cache is hit immediately, the adaptation step
is skipped entirely (the early-return guard `if ($modulesFromPackages ===
false)` is never entered), and `ModuleRegistry::applyHierarchy()` matches
submodules by comparing `getParentIdentifier()` against real identifiers.
A module whose parent is still the alias string (e.g. `'web'`) is never
attached to the resolved parent module (`'content'`), so it disappears
from the backend module menu after every cache warmup.

The issue exists since the alias feature was introduced in 2022
(commit 12568884a5b) but only became visible in practice once extensions
that ship TYPO3 14-compatible releases still use legacy identifiers while
recommending `cache:warmup` as part of deployment.

The fix mirrors what `getModuleRegistry` already does: call
`adaptAliasMappingFromModuleConfiguration()` inside the warmer closure
before persisting the result, ensuring both code paths produce identical
cache content.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Stefan Bürk +1
    • Niklas Grieger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1721

  1. Benni Mack uploaded patch set 1 04/22/26, 12:54

  2. Benni Mack marked it work in progress 04/22/26, 13:03

  3. core-ci voted on patch set 1 V +1 04/22/26, 13:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100899

  4. Benni Mack marked it ready for review 04/28/26, 15:50

  5. Benni Mack rebased onto patch set 2 V +1 04/28/26, 15:50

  6. core-ci voted on patch set 2 V +1 04/28/26, 16:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101223

  7. Benjamin Franzke commented on patch set 2 CR +1 04/28/26, 16:38

    also 14.3? (and ideally 13.4 since these kind of bugs are truly annoying to debug)

    ServiceProvider.php:111

    ideally this should be part of the backend.modules service (e.g. by registering as a serviceprovider extension), but fine for me this way in a bugfix.
  8. Benjamin Franzke commented on patch set 2 04/28/26, 16:39

    ServiceProvider.php:111 Reply

    well, i see, an extension will not work because of ordering. fine as is.
  9. Benni Mack updated the commit message in patch set 3 CR +1 V +1 04/30/26, 07:06

  10. Benni Mack commented on patch set 3 04/30/26, 07:06

    Reply

    I only had this issue in 14.x due to the heavy renaming of main modules in core.
  11. core-ci voted on patch set 3 V +1 04/30/26, 07:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101314

  12. Niklas Grieger voted on patch set 3 CR +1 05/07/26, 10:49

  13. Benni Mack updated the commit message in patch set 4 CR +1 V +1 05/11/26, 12:27

  14. Benni Mack commented on patch set 4 05/11/26, 12:27

    Reply

    is this OK as is?
  15. core-ci voted on patch set 4 V +1 05/11/26, 12:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101821

  16. Benjamin Franzke voted on patch set 4 CR +1 V +1 05/11/26, 12:46

  17. Niklas Grieger voted on patch set 4 CR +1 05/11/26, 13:42

  18. Stefan Bürk voted on patch set 4 CR +1 V +1 05/11/26, 13:59

  19. Benni Mack voted on patch set 4 CR +2 V +2 05/11/26, 14:06

  20. Benni Mack merged patch set 5 05/11/26, 14:06

  21. Benni Mack wrote 10/15/26, 08:22

    Hashtag added: no-backport