Bug #91310

config.concatenateJs = 1 disables auto generation of text/javascript

Added by Raphael Zschorsch 7 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-05-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When using config.concatenateJs = 1 and config.doctype = 1, the attribute type="text/javascript" is hardcoded and not omitted, like described here: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.0/Breaking-88772-JavaScriptScriptTagsOmitTypetextjavascriptInHTML5.html

This is due to the fact, that the type is hardcoded here:

https://github.com/TYPO3/TYPO3.CMS/blob/7b919798c8784ba3a3dd8cb82ab2d8a7e777878a/typo3/sysext/core/Classes/Resource/ResourceCompressor.php#L189

Do we need the type attribute when used with concatenate?

#1

Updated by Gerrit Code Review 7 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64413

#2

Updated by Gerrit Code Review 7 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64413

#3

Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64414

#4

Updated by Wittkiel Gruppe 7 months ago

We are using no concatenation for developement and the output for script-tags also contains type="", but only for files in includeJSLibs and includeJSFooterlibs.

Reduced TypoScript:

page.includeJSLibs {
    jslib110 = EXT:myext/Resources/Public/Libs/jquery/jquery.min.js
}

page.includeJS {
    js110 = EXT:myext/Resources/Public/JavaScript/init.js
}

page.includeJSFooterlibs {
    jslibfooter110 = EXT:myext/Resources/Public/Libs/fancybox/jquery.fancybox.min.js
}

page.includeJSFooter {
    jsfooter110 = EXT:myext/Resources/Public/JavaScript/script.js
}

Frontend output:

<script src="/typo3conf/ext/myext/Resources/Public/Libs/jquery/jquery.min.js?1588600180" type=""></script>
<script src="/typo3conf/ext/myext/Resources/Public/JavaScript/init.js?1588085965"></script>
<script src="/typo3conf/ext/myext/Resources/Public/Libs/fancybox/jquery.fancybox.min.js?1552302428" type=""></script>
<script src="/typo3conf/ext/myext/Resources/Public/JavaScript/script.js?1586870336"></script>

I think renderAdditionalJavaScriptLibraries needs a change like renderJavaScriptFiles: https://github.com/TYPO3/TYPO3.CMS/blob/ee0664929512c8f9f5fda920782c71491fed7d64/typo3/sysext/core/Classes/Page/PageRenderer.php#L2146

#5

Updated by Gerrit Code Review 6 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64414

#6

Updated by Gerrit Code Review 6 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64414

#7

Updated by Riccardo De Contardi 5 months ago

Related, I guess: #45512

#8

Updated by Gerrit Code Review 4 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64414

#9

Updated by Gerrit Code Review 4 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64414

#10

Updated by Gerrit Code Review 4 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64414

#11

Updated by Gerrit Code Review 3 months ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65299

#12

Updated by Raphael Zschorsch 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#13

Updated by Benni Mack about 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF