The change to run css through ctools to clean it isn't working right for image paths. When I save css, something that starts out like:

body {
  background-image: url(http://localhost/drupal/sites/default/files/sweaver/sweaver_image_77.jpg);
}

Ends up as:

body {
  background-image: url(http;
}

CommentFileSizeAuthor
#4 922462.patch1.86 KBswentel

Comments

karens’s picture

It's this ctools issue #916796: _ctools_css_disassemble_declaration() sometimes break a valid value for a property. Looks like you already found the issue, but Sweaver image handling is horribly broken until it is fixed.

swentel’s picture

There are actually 2 remaining bugs in css.inc, see #916796: _ctools_css_disassemble_declaration() sometimes break a valid value for a property and #916532: ctools_css_disassemble() sometimes overwrites a selector - I've already sent a pull request for the D7 port to fix it there (http://github.com/sdboyer/ctools) - it's not included yet, but I hope it will soon. I'm going to write tests for those 2 patches so they might get in faster.

If this is blocking for you guys (read, you don't want to run a patched version of CTools), I can make a workaround for the time being to exclude the dependency on css.inc (but will definitely bring it back once it gets in).

karens’s picture

I put in a temporary patch to the code we're using to avoid running the css through ctools so my images will work. I'll pull my patch out when ctools is working right. Other people might like to have a workaround too, though. I'll leave that up to you.

I thought it would be a good idea to leave this issue active so people who are having trouble can see what's going on, because it's pretty baffling and frustrating when images don't work right.

swentel’s picture

StatusFileSize
new1.86 KB

Extra patch which needs to be ported to D7 also for more allowed properties when using CTools css functions.

swentel’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Patch (to be ported)
swentel’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.