-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative CSS paths are wrong #11
Comments
See |
Hi, thanks for you issue. I've recently used EXT:min in a project including fonts and there I had no issues. When your CSS is located in
Also I'm suspisious that your approach really works, because when you create the |
@a-r-m-i-n thanks, the same file name is a mistake, point taken, the rest is still valid, but maybe you have an idea how to solve it:
|
Hey. I'm currently working on #2 and I think I know where the problem is. When you concatenate css files, TYPO3 is fixing the relative links, because the location of the actual called file moved to typo3temp/assets/compressed When min is doing the same, the file paths are not getting adjusted. Need to investigate further, but it looks promising. Now, I'm on your page ;) |
@wazum I think I got it :) Could you please test with the latest master? Thank you |
@a-r-m-i-n thanks for version 2.1.0. The relative css paths of fonts in a compressed file are working now, but not if you already use the composer-installer v4 package with TYPO3 11, which has a different folder structure of public assets. See also: https://b13.com/core-insights/typo3-and-composer-weve-come-a-long-way |
Thanks for your response. I think this worth a dedicated issue. |
This issue did already exist in the forge and bitbucket tracker, but was never fixed.
Now I changed to the recent version and had to adapt my patch.
Example:
in the CSS file generated by TYPO3 there's path like
../../../typo3conf/ext/my_ext/Resources/Public/fonts/myfont.xxx
and the problem is that your extension passes the content of the file to the$minifier->add
method, which results in appending another../../..
in front of the already correct relative paths (because the source is missing).The solution is to write the output of
compressCss
to a file and pass the file name to$minifier->add
, then the source path is correctly determined by minifier and not changed.Here's my local patch:
The text was updated successfully, but these errors were encountered: