Bug #83476

Few attributes are missing when concatenating JS files

Added by Rune Piper over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2018-01-04
Due date:
% Done:

100%

Estimated time:
0.50 h
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

When using the config.concatenateJs = 1 option, the ResourceCompressor is loosing tag attributes such as the async attribute in the concatenateJsFiles method.
A fix would be to add 'async' => $fileOptions['async'] after line 201, but I guess, it's too dirty for the core?!

Aside: Fresh installation with just tiny template:

config {
    concatenateJs = 1
}

page = PAGE
page.10 = TEXT
page.10.value = HELLO WORLD!
page.includeJSFooter {
    combined = path/to/file.css
    combined.async = 1
}


Related issues

Related to TYPO3 Core - Bug #86982: JS async not workingClosed2018-11-23

Actions
#1

Updated by Rune Piper over 3 years ago

When using the config.concatenateJs = 1 option, the ResourceCompressor is loosing tag attributes such as the async attribute in the concatenateJsFiles method.
A fix would be to add 'async' => $fileOptions['async'] after line 201, but I guess, it's too dirty for the core?! What if one file should be loaded via async and another not?

Aside: Fresh installation with just tiny template:

config {
    concatenateJs = 1
}

page = PAGE
page.10 = TEXT
page.10.value = HELLO WORLD!
page.includeJSFooter {
    combined = path/to/file.js
    combined.async = 1
}
#2

Updated by Stephan Bauer almost 3 years ago

Maybe it would be possible to take care of async or defer.

This would be very flexible if only those file are concatenated with the same options

It would be great for Google Pagespeed

#3

Updated by Gerrit Code Review almost 3 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/57130

#4

Updated by Gerrit Code Review almost 3 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/57130

#5

Updated by Gerrit Code Review almost 3 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/57130

#6

Updated by Gerrit Code Review almost 3 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/57130

#7

Updated by Gerrit Code Review almost 3 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/57130

#8

Updated by Gerrit Code Review almost 3 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/57130

#9

Updated by Rune Piper almost 3 years ago

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

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed
#11

Updated by Susanne Moog about 1 year ago

  • Related to Bug #86982: JS async not working added

Also available in: Atom PDF