These occurs when using clean urls and under paths not under root.. so example,
user/uid .. it would look for the styles in
user/modules/onlinestatus/style.css instead of
/modules/onlinestatus/style.css
so this patch brings in global $base_url and fixes that. We can't simply just add a / in it because some people put their installs in a folder to it self.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | css_fix.patch | 863 bytes | Anonymous (not verified) |
| broken_style_css_link.patch | 984 bytes | Anonymous (not verified) |
Comments
Comment #1
xeniac commentedI reconfigured my local apache2 installation, with mod_rewrite to test it out with cleanurls enabled.
drupal_get_path called on http://localhost/j-fan.at/user/8 created the right path for me (/j-fan.at/modules/onlinestatus/style.css).
Seems that i can't recreate this false behaviour so easy...
On the other side, i really don't like this line:
I think i should use theme_add_style() instead, this also uses $base_url and my function does not need to import a global var.
Could you try out if this runs smoothly on your configuration:
Comment #2
Anonymous (not verified) commentedmy bad.. i forgot the right way to do this..
this is right now..
your not suppose to use theme_add_style. you never wana call a theme function directly.
we want..
Comment #3
xeniac commentedI found the Answer for all questions on http://drupal.org/node/60096:
Having theme('add_style') and theme('import_style') is to confusing.
I will add your Patch for the next release, but i have to fix the MSN Bug bevor i can commit the changes to CVS.
Comment #4
Anonymous (not verified) commentedcool.
this is something drupal needs documented on a page in the handbook!
thanks xeniac
Comment #5
xeniac commentedDrupal 4.7 uses
drupal_set_html_head(theme('stylesheet_import', base_path() .drupal_get_path('module','onlinestatus').'/style.css'));
The New DRUPAL-5 Branch makes use of the new drupal_add_css() instead.
This Bug is fixed.
Comment #6
(not verified) commented