Issue Bug Closed

#100954Additional attributes for page.include** partially broken

Peter Neumann 06/03/23, 19:51 updated 07/09/24, 14:15

Description

TYPO3 v12.1 has introduced the possibility to add additional additional tag attributes for CSS and JavaScript files.

The feature seems to be broken for these include types:

page {
  includeJSLibs {
    someIncludeFile = EXT:sitepackage/...
    someIncludeFile.data-foo = bar
  }
  includeJS {
    someIncludeFile = EXT:sitepackage/...
    someIncludeFile.data-foo = bar
  }
  includeJSFooter {
    someIncludeFile = EXT:sitepackage/...
    someIncludeFile.data-foo = bar
  }
}

These are working:

page {
  includeCSSLibs {
    someIncludeFile = EXT:sitepackage/...
    someIncludeFile.data-foo = bar
  }
  includeCSS {
    someIncludeFile = EXT:sitepackage/...
    someIncludeFile.data-foo = bar
  }
  includeJSFooterlibs {
    someIncludeFile = EXT:sitepackage/...
    someIncludeFile.data-foo = bar
  }
}

For includeJSFooterlibs however, it is also mapping reserved attributes like the forceOnTop in the output source code to <script src="/_assets/dca94d8cd3b58fdfd24fde44814e41a3/…" forceontop="1" data-foo="bar"></script>

Reviews 3