When drupal is not located in the web root, the path for image.css is broken. The attached patch corrects this by changing image.module to use the standard drupal_set_html_head(theme('stylesheet_import'... function. This has been tested and works as expected.

Comments

Bèr Kessels’s picture

+1 it uses the better Drupal APIs. using apis+++ :)

neclimdul’s picture

Status: Needs review » Reviewed & tested by the community

WFM. This is pretty straight forward so lets push this through.

walkah’s picture

Status: Reviewed & tested by the community » Fixed

committed, thanks!

neclimdul’s picture

Status: Fixed » Needs review

Reopening this as its come to my attention by moshe that this isn't actually the right way to do this. This breaks the $custom_theme function. Here's a patch to do it the correct way.

note: see a href="http://drupal.org/node/56182>#56182 for moshe's comments and patch to E-Commerce

neclimdul’s picture

StatusFileSize
new778 bytes

and to quote moshe "grr."

decafdennis’s picture

StatusFileSize
new646 bytes

+1 for the patch, applies and works fine.

Because I am a nitpicker and noticed little clutter at the end of the patch file provided by neclimdul, I remembered that all PHP files should remove the last php closing tag. My modified patch does that additionally.

TDobes’s picture

Status: Needs review » Needs work

Under no circumstances should modules use theme_add_style for this sort of thing. Use of theme_add_style makes it considerably more difficult for themers to override the CSS.

Please see the long explanation.

decafdennis’s picture

Status: Needs work » Fixed

Thanks to TDobes for explaining the correct way to reference stylesheets. Maybe you should add some more documentation about this to the theme_add_style function, to prevent other modules from using it as well.

Settings the status back to fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)