Actions
Bug #101918
closedEpic #99669: CKEditor5 Collection
Story #101905: CKEditor4 to CKEditor5 Migration Issues
CKEditor5 migration for contentsCss with cache busting query string does not load the actual CSS file
Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2023-09-14
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
With the following valid TYPO3 v11 ckeditor configuration in a v12 installation…
editor:
config:
contentsCss: "EXT:site/Resources/Public/Page/css/rte.css?v=4"
…the CSS file is not taken into account, but a PHP warning is emitted instead.
The happens because the URL is read from the filesystem (by the ScssProcessor) instead of being requested directly via web request, without stripping the query string:
PHP Warning Core: Error handler (BE): PHP Warning: sha1_file(/var/www/html/typo3conf/ext/site/Resources/Public/Page/css/rte.css?v=4): Failed to open stream: No such file or directory in /var/www/html/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php line 135
Note: A query string needed to be appended to RTE contentCss configuration in order to enforce browser cache busting on updates of the CSS file, when the default TYPO3 .htaccess configuration is used, which applies long-lived cache headers for resources by default.
Actions