Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation goes up 4 directory levels when a relative path is specified in a css (scss), thus leading to the following effect:
let's say, the root of the typo3 installation is
http://localhost/foo/bar
The generated css is thus available under
http://localhost/foo/bar/typo3temp/DynCss/style-xxxxxxx.css
If the scss contains a url reference, the post-processor rewrites the url and prefixes it with ../../../../
That means, relative to the generated css, it goes up to
http://localhost/
and looks for the orignal subdirectory (e.g. typo3conf) there.
This might not have a negative effect if the typo3 installation is in the root of the webspace, but causes this problem if it's installed in a subdirectory.
I modified the Parser to go up 2 levels instead of 4, which would be always the root of the typo3 installation as the generated .css is stored under typo3temp/DynCss
It works for me and I hope that this change does not break anything. I do not see a problem, but I admit that I do not really understand why it's currently going 4 levels up instead of 2. There must be a reason for that, but I do not really see it. Could anybody please explain?
An alternative might be to introduce support for "FILE:EXT":-Prefix in url.
Andreas