The original code assumes that drupal is installed in the site root. This needs to be changed to account for drupal installations that might be in a subfolder. Here is the original code:

function advuser_init() {
  $headhtml = "<style type='text/css'>@import \"/". drupal_get_path("module", "advuser") ."/advuser.css\";</style>";
  drupal_set_html_head($headhtml);
}

Here is the code that fixes the problem:

function advuser_init() {
  $headhtml = "<style type='text/css'>@import \"". base_path() . drupal_get_path("module", "advuser") ."/advuser.css\";</style>";
  drupal_set_html_head($headhtml);
}

Comments

Mojah’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)