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
Comment #1
webiator GmbH CreditAttribution: webiator GmbH commentedWhat exactly did you enter into the css file text field on the Domain CSS Module configuration page?
Comment #2
hawkdrupal CreditAttribution: hawkdrupal commentedI named the custom file holly4health.css, put it in the css folder of the theme, and entered this exact path:
css/holly4health.css
Comment #3
nessollo CreditAttribution: nessollo commentedSolved 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);
Comment #4
webiator GmbH CreditAttribution: webiator GmbH commentedThank you nessollo,
I will test it and release a new version!
Comment #5
nessollo CreditAttribution: nessollo commentedI 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.
Comment #6
nessollo CreditAttribution: nessollo commented