Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In origin pull mode, it does not appear that css aggregation will convert root relative links (ex: url(/sites/all/modules/ctools/images/status.active.gif)) to absolute urls. This poses a problem if you want to host CSS files on a CDN but not some of the other content. I tracked the issue down to file_create_url(). On a Drupal 7 install this function always returns an absolute URL however on a Drupal 6 install this function does *not* always return an absolute URL.
Comments
Comment #1
jcotton1123 CreditAttribution: jcotton1123 commentedComment #2
jcotton1123 CreditAttribution: jcotton1123 commentedComment #3
jcotton1123 CreditAttribution: jcotton1123 commentedComment #4
mr.j CreditAttribution: mr.j commentedSame here. The setup I am trying to use is CDN 6.x-2.6 + Advagg 6.x-1.9.
Our CDN settings:
Mode: Origin Pull
CDN Mapping:
http://cdn.example.com|.gif .jpg .jpeg .png .ico .zip
http://cdn2.example.com|.js .css
Far Future Expiration is Off (we have always done this with .htaccess anyway and it completely broke our site when it was first added to the module without an off switch).
Imagecache and other Drupal images are correctly served from cdn.example.com. All CSS background images with relative paths are aggregated with the relative path intact, and are therefore served from whatever domain the CSS script is served from (in this case cdn2.example.com).
I have read these and others:
#1452092: Automatically distribute certain filetypes over multiple CDNs
#1410318: Merge into CDN module?
#1164544: AdvAgg - Use the CDN module for images referenced in CSS aggregates.
From what I can tell from those issues, this is supposed to be working but it isn't, so I'm marking this as a bug.
Comment #5
Wim LeersPlease try without AdvAgg. http://driverpacks.net uses the CDN module too and is a Drupal 6 site, no such problems there.
Comment #6
Wim Leers.