Bug #31239
compressor doesn't resolves files linked with domain
| Status: | Accepted | Start date: | 2011-10-24 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | Dmitry Dulepov | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| TYPO3 Version: | 4.6 | Complexity: | ||
| PHP Version: | 5.3 | |||
| Votes: | 0 |
Description
The compressor doesn't correctly handles files that are added with the e.g. pageRenderer method addJsFile with the domain applied.
Example:
http://localhost/site/myFile.js
Results in the following example warning:
PHP Warning: filemtime(): stat failed for /var/www/Intro/http://localhost/site/myFile.js in /var/www/typo3_src-git/t3lib/class.t3lib_compressor.php line 461
The attached patch is more or less a workaround, because this would increase the I/O burden on the server as it should not be needed to resolve and save the contents of local urls.
Related issues
| related to Core - Bug #32397: Page renderer provides files to compressor incorrectly | Under Review | 2011-12-08 | ||
| related to Core - Bug #34162: Merging CSS/JS files with absRefPrefix set causes PHP error | Resolved | 2012-02-21 | ||
| duplicated by Core - Bug #32517: t3lib_compressor set local filename to remote uri for ext... | Resolved | 2011-12-13 |
Associated revisions
[BUGFIX] Set filename to downloaded resource in t3lib_compressor
Compressor fails to properly reference external URLs.
It should use the downloaded copy of the resource.
Change-Id: I6ce8dc07fff4b056558aa22760a2b5ef126fb55d
Fixes: #32517
Related: #31239
Releases: 4.7, 4.6
Reviewed-on: http://review.typo3.org/7127
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Reviewed-by: Henrik Møller Rasmussen
Tested-by: Henrik Møller Rasmussen
Tested-by: Stefan Neufeind
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Set filename to downloaded resource in t3lib_compressor
Compressor fails to properly reference external URLs.
It should use the downloaded copy of the resource.
Change-Id: I6ce8dc07fff4b056558aa22760a2b5ef126fb55d
Fixes: #32517
Related: #31239
Releases: 4.7, 4.6
Reviewed-on: http://review.typo3.org/9469
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Set filename to downloaded resource in t3lib_compressor
Compressor fails to properly reference external URLs.
It should use the downloaded copy of the resource.
Change-Id: I0966b430bd650fa85fa63215cbe19f52795a35f2
Fixes: #32517
Related: #31239
Releases: 4.7, 4.6
Reviewed-on: http://review.typo3.org/9872
Reviewed-by: Philipp Gampe
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
History
Updated by Dmitry Dulepov over 1 year ago
- Assignee set to Dmitry Dulepov
- Priority changed from Should have to Must have
There is more problems with this If config.absRefPrefix is set:
1. none of default styles are added to the output because path to the current site is prepended to the URL
2. even if the file is a local file, it always fetched using http from the current server [perfomance!!!]
The solution is very simple:
- do not add config.absRefPrefix (it is applied later to all URLs anyway)
- use is_file to check if the file is local and avoid fetching it using curl, etc