I kept getting my css injector rules loaded no matter what.
So i've made some modifications, in both modules (context and css_injector):
In Context module, file plugins/context_reaction_css_injector.inc , line 28
Replace with:
drupal_add_css(file_create_path(_css_injector_rule_path($css_rule['crid'])), 'module', $css_rule['media'], $css_rule['preprocess']);
And in CSS Injector module, file css_injector.admin.inc, line 151
Add:
if (module_exists('context')) {
$options[] = t('Let Context Module control this CSS rule');
$description .= ' '. t('This rule will be controled by Context Module.');
}
I will now place a link to this on CSS Injector issue page.
Comments
Comment #1
rfayI'm not in favor of writing specific hacks for specific modules, as mentioned in #909986-1: Enhance compatibility with Context module
Comment #2
milos.kroulik commentedThis does not work for me. Maybe I'm doing something wrong?
Contents of my files:
(removed code tag around "TRUE")
Comment #3
hlopes commentedYou'll need to make changes in both modules (Context and CSS Injector). And there was a typo on one of them.
#EDIT: sorry, i'm not fully functional before coffee addition. The code you posted seems ok.
You can just download both modules already modified.
And make sure you've cleared the cache or that cache / css aggregation is disabled.
Comment #4
milos.kroulik commentedSorry, I don't use this module anymore and don't have time right now to test it. Will report back later.
Comment #5
soulfroysUnfortunately it still doesn't work...Context 6.x-3.x-dev (2011-02-25)
CSS Injector 6.x-1.x-dev (2011-02-25)
Drupal 6.14
[ Edited: Works great! I forget "if($css_rule['rule_type']!=3)" in css_injector.module ]
Comment #6
hefox commentedPlease provide a patch for others to review; there's no patch here.
Comment #7
TimelessDomain commentedthis is a problem for drupal 7 as well
Comment #8
francewhoaIt seems this is fixed in the latest versions. We were not able to reproduce this with:
If you update to the above versions but your CSS Injector rules load no matter what, in CSS Injector ensure your rules are saved but disabled. Instead enable them only in Context module.
Comment #9
paulocsI also could not reproduce using the last dev versions of Context and Css Injector for drupal 7.
As 6.x-3.x-dev is no longer supported, I'm closing it.
Please reopen it if you still have problems.
Thanks @all.
Comment #10
paulocsComment #11
paulocs