Issue Bug Closed

#106449`getJavaScriptFileType` returns non-empty @ DocType HTML5

Marcus Förster 03/27/25, 20:44 updated 08/12/25, 14:36

Description

https://github.com/TYPO3/typo3/blob/8ea3bc234174417e0e4d5465c69af631a28a8097/typo3/sysext/core/Classes/Resource/ResourceCompressor.php#L680

var_dump($GLOBALS[‘TSFE’]->config[‘config’][‘doctype’]) => string(0) “”

PATCH via https://git.typo3.org/typo3/typo3/-/commit/4a61b1dca6611a40ad5acc95f86cc30b89b7bce7

— OR —less pref…
--- NOT REAL PATCH
+++ typo3/cms-core/Classes/Resource/ResourceCompressor.php    2025-03-27 21:36:13.443472535 +0100
@@ -689,7 +689,7 @@
     {
         if (!isset($GLOBALS['TSFE'])
             || !($GLOBALS['TSFE'] instanceof TypoScriptFrontendController)
+            || empty($GLOBALS['TSFE']->config['config']['doctype'])
+            || ($GLOBALS['TSFE']->config['config']['doctype'] === 'html5')
-            || ($GLOBALS['TSFE']->config['config']['doctype'] ?? 'html5') === 'html5'
         ) {
             // no TSFE, or doctype set to html5
             return '';

Reviews 1

History 45

  1. Marcus Förster changed description 03/27/25, 21:06

  2. Benni Mack changed Related to #102297 03/27/25, 21:48

  3. Gerrit Code Review pushed patch set 1 for 12.4 to change 88813 status New Under Review 03/27/25, 21:50

  4. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % 03/27/25, 22:05

    Applied in changeset commit:e3e6857168f4254c64386b4fdf684874f49eabfe.

  5. Benni Mack changed status Resolved Closed 08/12/25, 14:36