Actions
Bug #104998
closedType error on using addCacheTags from TypoScriptFrontendController
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-09-17
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Error occurs when addCacheTags function in TypoScriptFrontendController is used by extensions.
I had this with installed news in my TYPO3 13 (main branch) instance.
TYPO3\CMS\Core\Cache\CacheDataCollector::addCacheTags(): Argument #1 must be of type TYPO3\CMS\Core\Cache\CacheTag, array given, called in /app/vendor/typo3/cms-frontend/Classes/Controller/TypoScriptFrontendController.php on line 424
The relevant code is this line (424) in TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
$cacheDataCollector->addCacheTags(array_map(fn(string $tag) => new CacheTag($tag), $tags));
That should be changed to
$cacheDataCollector->addCacheTags(...array_map(fn(string $tag) => new CacheTag($tag), $tags));
I will add a patch for that afterwards.
Updated by Gerrit Code Review 2 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86133
Updated by Christian Kuhn 2 months ago
- Related to Feature #104990: Automatic frontend cache tagging added
Updated by Gerrit Code Review 2 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86133
Updated by Karsten Nowak (undkonsorten) 2 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 39c304fa984553cc4e2f7c7f4e1b5396e58ef08a.
Actions