Project

General

Profile

Actions

Bug #91310

closed

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

Added by Raphael Zschorsch over 4 years ago. Updated about 4 years 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?

Actions #1

Updated by Gerrit Code Review over 4 years 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

Actions #2

Updated by Gerrit Code Review over 4 years 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

Actions #3

Updated by Gerrit Code Review over 4 years 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

Actions #4

Updated by Wittkiel Gruppe over 4 years 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

Actions #5

Updated by Gerrit Code Review over 4 years 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

Actions #6

Updated by Gerrit Code Review over 4 years 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

Actions #7

Updated by Riccardo De Contardi over 4 years ago

Related, I guess: #45512

Actions #8

Updated by Gerrit Code Review over 4 years 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

Actions #9

Updated by Gerrit Code Review over 4 years 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

Actions #10

Updated by Gerrit Code Review over 4 years 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

Actions #11

Updated by Gerrit Code Review over 4 years 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

Actions #12

Updated by Raphael Zschorsch over 4 years ago

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

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF