This module fails because it uses a wrong theme path.

My custom css file is is where it should be, in the css folder of the theme folder. But this module claims the file doesn't exist. Because, the module is using a wrong path to the theme, sites/all is doubled in the path used by the module:

/sites/all/sites/all/themes/zen7adv/css/mycustomfile.css

The theme is actually at normal location /sites/all/themes/zen7adv/, and all other files of this theme work properly, including other css files that I've customized. This is an existing installation, working fine for several years. This module would be helpful, but why is it creating and using an imaginary path, then failing?

Comments

webiator GmbH’s picture

What exactly did you enter into the css file text field on the Domain CSS Module configuration page?

hawkdrupal’s picture

I named the custom file holly4health.css, put it in the css folder of the theme, and entered this exact path:

css/holly4health.css

nessollo’s picture

Solved modifing domain_css.module

line 142
$file = drupal_get_path('theme', $theme) . '/' . $config->css_file;

line 165
if ($file != '' && !file_exists(DRUPAL_ROOT .'/'. drupal_get_path('theme', variable_get('theme_default', NULL)) . '/' . $file)) {

line 167
form_set_error('domain_css_file', 'File does not exists: /' . drupal_get_path('theme', variable_get('theme_default', NULL)) . '/' . $file);

webiator GmbH’s picture

Thank you nessollo,
I will test it and release a new version!

nessollo’s picture

I also suggest you to set 'group' => CSS_THEME on line 145.

If the stilesheet is rendered after the main css of the active theme is hard to override per domain specific classes.

I hope this helps.

nessollo’s picture

Status: Active » Needs work