Bug #52597
closed
Compressor: Fetch external files correctly
Added by Stefan Neufeind about 11 years ago.
Updated almost 8 years ago.
Description
The ResourceCompressor currently only handles external files correctly for compression if they are also already "merged" in the step before. For files that should stay separate (not merged) an incorrect filename is created, the external file is not fetched, and finally an "empty" file is being compressed.
The merger already has the relevant code to check filenames for being an url and fetch them if needed. This just needs to be split out and be called in both places.
TypoScript-code to reproduce it:
page = PAGE
page {
config {
compressCss = 1
concatenateCss = 1
extTarget = _blank
}
includeCSS {
accordionCss = http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css
accordionCss.excludeFromConcatenation = 1
#accordionCss.disableCompression = 1
accordionCss.external = 1
accordionCssOverwritten = fileadmin/sys/Public/StyleSheet/accordionCssOverwritten.css
}
}
Cases to try out:
- excludeFromConcatenation BUT NOT disableCompression (like here): empty file gets compressed
- excludeFromConcatenation AND disableCompression: external file gets referenced directly (external URL is kept as is)
- excludeFromConcatenation: file is fetched be the merger already and afterwards exists as a "local" file
- Status changed from New to Under Review
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24471
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24471
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24471
- Status changed from Under Review to Rejected
Ok, I think we should get rid of that patch: The feature "fetch external file locally" is imho bogus in the first place, should be deprecated and removed. There is no point in doing that, an external resource should stay that way. Thus, there is also no point in fixing the follow-up problem that the compressor doesn't properly deal with that.
abandoned, rejected, we should remove the 'fetch external resources to make them local'.
Also available in: Atom
PDF