Actions
Bug #93466
closedcreateVersionNumberedFilename doesn't support absolute paths
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-02-08
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Just discovered that files in TYPO3 Backend are lacking cache busting, e.g.
https://example.com/typo3/sysext/backend/Resources/Public/Css/backend.css
This used to work in TYPO3 8
https://example.com/typo3/sysext/backend/Resources/Public/Css/backend.css?1599168500
As far as I see, the root cause is `getRegisteredStylesheetFolders()` returning absolute file names, but `createVersionNumberedFilename` expects relative file names and therefore ignores the file completely.
public/typo3/sysext/backend/Classes/Template/ModuleTemplate.php::getRegisteredStylesheetFolders()
/**
* Returns an array of all stylesheet directories registered via $TBE_STYLES['skins']
*/
protected function getRegisteredStylesheetFolders(): array
{
$stylesheetDirectories = [];
foreach ($GLOBALS['TBE_STYLES']['skins'] ?? [] as $skin) {
foreach ($skin['stylesheetDirectories'] ?? [] as $stylesheetDir) {
$directory = GeneralUtility::getFileAbsFileName($stylesheetDir);
if (!empty($directory)) {
$stylesheetDirectories[] = $directory;
}
}
}
return $stylesheetDirectories;
}
public/typo3/sysext/core/Classes/Utility/GeneralUtility.php::createVersionNumberedFilename()
Files
Actions