Open walderT opened 7 years ago
On my machine Minify is at the URL path /local/minify/
. In config I set:
$min_symlinks = array('//root' => __DIR__);
I requested /local/minify/?f=root/quick-test.css
and it worked correctly:
docRoot : /Users/steve/Sites
currentDir : /Users/steve/Sites/local/minify
symlinks : array (
'/Users/steve/Sites/root' => '/Users/steve/Sites/local/minify',
)
file-relative URI : more.css
path prepended : /Users/steve/Sites/local/minify/more.css
symlink unresolved : /Users/steve/Sites/root/more.css
docroot stripped : /root/more.css
traversals removed : /root/more.css
This is 3.x.
I have currently no access to my development machine. Can you set a breakpoint at
\Minify_CSSmin::minify
and look if there is the symlink in the $options parameter?
I am sure, that this was in my case not set. Maybe because I am using the new "static" feature? Or using a group config?
My request:
/min/static/0/g=cssV3&z=.css
I will look tomorrow if its different if I use the "normal" call, as you in your example.
Yes, my $min_symlinks value was available in Minify_CSSmin::minify
. I'll try with static tomorrow, indeed may be a bug there.
Hi, here is my result.
Request:
/min/&f=/min/quick-test.css
$options in \Minify_CSSmin::minify
Array
(
[docRoot] => /app/web
[symlinks] => Array
(
[//myfiles] => /app/web/myfiles
[//min] => /app/web/min
)
[currentDir] => /app/web/min
)
Request:
/min/static/0/&f=/min/quick-test.css
Array
(
[currentDir] => /app/web/min
)
docRoot
is also missing, don't know if this is also required?
Hi there,
I think the config option "$min_symlinks" is ignored.
I use sysmlinks on my project and all paths to e.g. webfonts are broken.
As I can see, the parameter $symlinks is an empty array in \Minify_CSS_UriRewriter::rewrite
When I hardcode my symlink array in \Minify_CSSmin::minify
its working as excepted.
Here the output of print_r of $options in \Minify_CSSmin::minify
The latest 3.x is used.
Any Ideas?
Thanks Thomas