Skip to content

[BUGFIX] Avoid reading missing fallback config - #470

Merged
lochmueller merged 1 commit into
lochmueller:mainfrom
BenjaminBeck:fix/fallback-missing-config
Aug 27, 2026
Merged

[BUGFIX] Avoid reading missing fallback config#470
lochmueller merged 1 commit into
lochmueller:mainfrom
BenjaminBeck:fix/fallback-missing-config

Conversation

@BenjaminBeck

Copy link
Copy Markdown

Short description

Avoid reading a fallback cache configuration file when it does not exist or is not readable.

More details

FallbackMiddleware::getCacheConfiguration() currently combines the file checks with ||. A missing index.config.json therefore satisfies !is_readable() and is passed to GeneralUtility::getUrl(), which emits a PHP warning before the request continues through TYPO3.

Besides producing unnecessary warnings, early error handlers can initialize shared Extbase services before the frontend request is available. On TYPO3 12 this can select the backend configuration manager for the rest of the request, causing cached USER_INT plugins to fail with exception #1316104317 because their controller configuration is empty.

This changes the condition to require the configuration file to both exist and be readable, and adds a regression test that converts any warning into an exception.

Tests

  • Full unit suite: 18 tests, 88 assertions
  • PHPStan on the changed production and test files
  • PHP CS Fixer dry run on the changed files
  • Reproduced and verified against TYPO3 12.4 with cached Extbase and Solr USER_INT plugins

Created by Codex for Benjamin Beck. 🛠️

@lochmueller

Copy link
Copy Markdown
Owner

Hey @BenjaminBeck Thanks for the fix. Merged!

@lochmueller
lochmueller merged commit 1a2c895 into lochmueller:main Aug 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants