WHen utlizing CDN module, the logo has a problem since $vars['logo_img'] is a full URL and not a direct file mapping when 960 preprocessing is called.

This caused warning of this:

Warning: is_file() [function.is-file]: Unable to find the wrapper "ttps" - did you forget to enable it when you configured PHP? in theme_image() (line 1274 of /mnt/apci/main/www/includes/theme.inc).
Warning: is_file() [function.is-file]: Unable to find the wrapper "ttps" - did you forget to enable it when you configured PHP? in theme_image() (line 1274 of /mnt/apci/main/www/includes/theme.inc).

the back trace was this:

#0 theme_image(ttps://d2advj8u2v0d4a.cloudfront.net/sites/all/themes/allplayers960/logo.png, Home, Home)

#1 call_user_func_array(theme_image, Array ([0] => ttps://d2advj8u2v0d4a.cloudfront.net/sites/all/themes/allplayers960/logo.png,[1] => Home,[2] => Home)) called at [/mnt/apci/apcore/www/includes/theme.inc:668]

#2 theme(image, ttps://d2advj8u2v0d4a.cloudfront.net/sites/all/themes/allplayers960/logo.png, Home, Home) called at [/mnt/apci/apcore/www/sites/all/themes/ninesixty/template.php:13]

#3 ninesixty_preprocess_page(Array ([template_files] => Array ([0] => page-home,[1] => page-front,[2] => layout-left),[content] =>

Related to http://drupal.org/node/415528

Comments

bcmiller0’s picture

StatusFileSize
new1.06 KB

oops, left an extra line in, here is cleaned up patch file.

bcmiller0’s picture

StatusFileSize
new1.05 KB

third time, spacings better, original file must have tabs.

bcmiller0’s picture

StatusFileSize
new881 bytes

ok this is cleaner with URL, so can be any proper protocol, and protects from xss.

torgospizza’s picture

Status: Active » Needs review

Setting to "needs review" so that a maintainer may (hopefully) see it. I'll be testing this hopefully soon.

rupl’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Needs review » Needs work

Hello, thanks for reporting this and helping to fix it. I was unable to apply the patch in #4. It appears that the patch was made against the 6.x-1.0 release.

Could you confirm that the CDN issue persists in the 6.x-1.x dev branch, and if so, re-roll against 6.x-1.x instead of the 6.x-1.0 official release?

bcmiller0’s picture

StatusFileSize
new773 bytes

Still a problem on latest dev branch. I've attached a new patch file.

Also this section will patch the dev branch using drush make, to get ninesity built from latest dev branch, in my testing.

; Themes
; ------
;;projects[ninesixty][version] = "6.x"
projects[ninesixty][download][type] = "git"
projects[ninesixty][download][url] = "http://git.drupal.org/project/ninesixty.git"
projects[ninesixty][patch][] = "http://drupal.org/files/1305632-ninesixty-basepath-cdn-fix-6.patch"

and seems to correct the issue for me.

thanks,

torgospizza’s picture

Status: Needs work » Needs review
vinmassaro’s picture

I ran into this same issue when updating to Pressflow 6.25. theme.inc in Pressflow uses file_create_url() instead of base_url(). Confirmed that the latest 6.x-dev release works for me in Pressflow without this patch.