In my theme's CSS, I set a background image for the header block by setting background-image to a full URL (including http://www.domain.com/etc...)
When I turn on CSS caching, the background image disappears, and a peek at the aggregated CSS file shows that the background-url attribute has been changed.
It should be:
#header{background:#555;background-image:url('http://www.domain.com/images/blogbanners/rotator.php');
It is:
#header{background:#555;background-image:url(/sites/all/themes/k2_dnorman/'http://www.domain.com/images/blogbanners/rotator.php');
Looks like it's prepending the /sites/all/theme/themename/ string even before a full URL. I use the full URL so it works properly at all levels of the site's URL hierarchy.
Any ideas?
Comments
Comment #1
dnorman commentedAh. In line 1519 of common.inc, it's adjusting all paths, but it's not specific enough to ignore paths starting with 'http://'
Comment #2
andrenoronha commentedit's happening the same with me.
but I can't understand... in some way the cache is catching only the image url. I wrote it wrong in the first time... then I got it right, but it didn't change in the css. But other values I changed like the font-size, after clearing the cache registry it took effect, but the images urls don't change at all!
please help me!
Comment #3
andrenoronha commented@dnorman
you said that your new url becomes: /sites/all/themes/k2_dnorman/'http://www.domain.com/images/blogbanners/rotator.php' after cache is turned on....
well... I'd like it to happen to me.... but it only puts /sites/all... if it'd put also themes/theme_name I think my backgound images would apper...
One thing I hate about it....is that even after cache clearing... the images urls still remains the same....
I cannot understand...
Comment #4
andrenoronha commentedI found the answear myself...
the thing is: drupal was adding by itself the path: /drupal/sites/all/css before my path to the image...
so I put my own /drupal/sites/all/themes/themename/images/* and it worked either with abled as disabled css optimization...
Comment #5
dpearcefl commentedConsidering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.