Closed GoogleCodeExporter closed 9 years ago
Thanks. I'm refactoring this class right now so I'll look into that.
Original comment by mrclay....@gmail.com
on 18 Mar 2009 at 2:44
What are your docRoot and symlink settings?
Original comment by mrclay....@gmail.com
on 18 Mar 2009 at 4:39
Please update your files that were changed in R309, enable debug mode in
config.php,
and add &debug=1 to your minify CSS URI. This will prepend the output with
debugging
info for the URI rewriting process.
The new rewriter also removes trailing slashes from realpath()s, so it's
possible
the update could solve some issues.
Original comment by mrclay....@gmail.com
on 19 Mar 2009 at 4:44
I'm having the same problem also (with latest checkout from Trunk).
As I only use UriRewriter class and not the whole minify suite, how do I enable
debug
mode so I can provide additional info?
Original comment by laya...@yahoo.com
on 4 May 2009 at 8:37
@laya... : If you're just using that class, just echo Minify_CSS_UriRewriter::
$debugText after calling rewrite() or rewriteRelative().
Original comment by mrclay....@gmail.com
on 4 May 2009 at 8:59
Thanks for the quick reply ;)
With the help of $debugText, I have fixed most of my problems (with one problem
remaining). Previously I was passing $path including the css file name, now I'm
passing just the path [with dirname($path)].
Info:
Trying to use Minify_CSS_UriRewriter::rewrite with YUI.
Doc Root: c:\projects\abc\web
Yui located in: c:\projects\abc\web\yui
CSS I was testing UriRewriter with:
c:\projects\abc\web\yui\menu\assets\skins\sam\menu.css
Code:
$path = 'c:\projects\abc\web\yui\menu\assets\skins\sam\menu.css'
$content = Minify_CSS_UriRewriter::rewrite(
file_get_contents($path)
,dirname($path)
,'c:\projects\abc\web'
,array()
);
$debugText:
docRoot : sf_root_dir\web
currentDir : sf_root_dir\web\yui\menu\assets\skins\sam
file-relative URI : ../../../../assets/skins/sam/sprite.png
path prepended :
sf_root_dir\web\yui\menu\assets\skins\sam\..\..\..\..\assets\skins\sam\sprite.pn
g
docroot stripped :
\yui\menu\assets\skins\sam\..\..\..\..\assets\skins\sam\sprite.png
traversals removed : /yui/menu/assets/assets/skins/sam/sprite.png
The correct absolute path should be: /yui/assets/skins/sam/sprite.png
Original comment by laya...@yahoo.com
on 5 May 2009 at 2:45
@laya... Yep, definitely a bug. When I remove the traversals by hand I get the
right
URI:
\yui\menu\assets\skins\sam\..\..\..\..\assets\skins\sam\sprite.png
\yui\menu\assets\skins\..\..\..\assets\skins\sam\sprite.png
\yui\menu\assets\..\..\assets\skins\sam\sprite.png
\yui\menu\..\assets\skins\sam\sprite.png
\yui\assets\skins\sam\sprite.png
Original comment by mrclay....@gmail.com
on 5 May 2009 at 12:35
Fix in R328. Can you verify the UriRewriter.php in that rev works for you? I
added a
testcase with your input and it now passes.
Original comment by mrclay....@gmail.com
on 5 May 2009 at 1:09
Fixed!!
YUI has many deeply nested structure, so hopefully this fix will work with even
deeper nesting (more traversals).
Thanks.
Original comment by laya...@yahoo.com
on 5 May 2009 at 9:12
Yay
Original comment by mrclay....@gmail.com
on 5 May 2009 at 9:18
Sort of a general question, but any idea when a tag might be made containing
this
fix? Not sure if you have a 2.1.3 release in mind. Your fix seems to have
solved
the issues I was having regarding this bug, but I'm hesitant to run off of a
trunk
checkout in case there is work in progress being done. No rush, just wondering
is
all. Thanks again.
Original comment by bmhar...@gmail.com
on 9 Jun 2009 at 9:02
2.1.3 will be tagged soon. There are bigger changes I want in 2.2.
Original comment by mrclay....@gmail.com
on 11 Jun 2009 at 1:14
Original issue reported on code.google.com by
bmhar...@gmail.com
on 18 Mar 2009 at 2:25