Breaking: #91563 - PHP-based JS + CSS inclusions for Frontend removed

See forge#91563


In the past, TYPO3's TSFE object allowed to manually add CSS or JavaScript snippets via PHP code with the following method and properties:

  • TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->setJS()
  • TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->additionalJavaScript
  • TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->additionalCSS
  • TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->JSCode
  • TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->inlineJS

These have been removed due to better APIs like PageRenderer (available since TYPO3 v4.5) and AssetCollector (available since TYPO3 v10).


Accessing the method and properties will have no effect and trigger PHP errors.

Affected Installations

TYPO3 installations with custom extensions using this functionality directly to inject custom CSS or JavaScript.


Use the AssetCollector API in PHP to add JavaScript and CSS code or use files directly.