fix(cache): detect not-cached elements via PageParts on TYPO3 v14 - #472
Merged
Conversation
TYPO3 v14 removed INTincScript from FrontendTypoScript::getConfigArray() as part of the TypoScriptFrontendController dissolution (#107831/#107578), so this listener silently stopped adding cache rule explanations and pages with USER_INT/COA_INT or uncached extbase plugins were statically cached. Read the not-cached content element registry from the "frontend.page.parts" request attribute (PageParts) instead. The nonce-substitution skip is kept and now evaluates the cspGenerationOverride setting once per call. getInformation() is strictly typed and reports the new "substKey" key. PageParts is marked "@internal Experimental, will change" by the core and may change during v14/v15 development; a @todo documents this. Refs: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.0/Breaking-107831-RemovedTypoScriptFrontendController.html
Owner
|
Hey Carsten / @biebricher-of |
Contributor
Author
|
Hej Tim, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TYPO3 v14 removed INTincScript from FrontendTypoScript::getConfigArray() as part of the TypoScriptFrontendController dissolution (#107831/#107578), so this listener silently stopped adding cache rule explanations and pages with USER_INT/COA_INT or uncached extbase plugins were statically cached.
Read the not-cached content element registry from the "frontend.page.parts" request attribute (PageParts) instead. The nonce-substitution skip is kept and now evaluates the cspGenerationOverride setting once per call. getInformation() is strictly typed and reports the new "substKey" key.
PageParts is marked "@internal Experimental, will change" by the core and may change during v14/v15 development; a @todo documents this.
Refs: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.0/Breaking-107831-RemovedTypoScriptFrontendController.html
Short description
This fixes the problem that
USER_INTlike FeLogin->Login forms are cached in TYPO3 14.More Details
The
@todocomments are there because PageParts are marked Experimental. The fix solves the problem that USER_INT are cached - but for the cost that this may break later again. The@todocomment can, of course, be removed to please validator.