Project

General

Profile

Actions

Bug #83476

closed

Few attributes are missing when concatenating JS files

Added by Rune Piper over 6 years ago. Updated over 5 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 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Rune Piper over 6 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
}
Actions #2

Updated by Stephan Bauer almost 6 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

Actions #3

Updated by Gerrit Code Review almost 6 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

Actions #4

Updated by Gerrit Code Review almost 6 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

Actions #5

Updated by Gerrit Code Review almost 6 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

Actions #6

Updated by Gerrit Code Review almost 6 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

Actions #7

Updated by Gerrit Code Review almost 6 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

Actions #8

Updated by Gerrit Code Review almost 6 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

Actions #9

Updated by Rune Piper almost 6 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions #11

Updated by Susanne Moog about 4 years ago

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

Also available in: Atom PDF