The following error appears:
Notice: Undefined index: cache in _cache_actions_clear_view() (line 568 of .../cache_actions.rules.inc).
My Rule is: after saving a Node of type X, disable a cache of View Y.
The obvious patch would be the following, but that might only fix the symptom, not the cause
- if (!isset($display->display_options['cache']) && isset($view->display['default'])) {
+ if (!isset($display->display_options['cache']) && isset($view->display['default']->display_options['cache'])) {
$display->display_options['cache'] = $view->display['default']->display_options['cache'];
}
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | cache_actions-no_cache_type.patch | 2.86 KB | geoffreyr |
| #1 | cache_actions_1439716_no_cache_type.patch | 2.17 KB | johnv |
Comments
Comment #1
johnvAttached patch resolves this conflict in 2 places.
The error occurs if you define to flush views/displays which have no cache defined.
The patch is not git-style, sorry for that, but is is simple enough.
Comment #2
fabsor commentedThis seems nice, but I can't get my setup to output the issues your experiencing. I created a view without caching, and added a rule to purge it, and it seems to work fine. Could you provide some more detailed steps to reproduce?
Comment #3
zabelc commentedThis seems patch to have removed the error above that I was getting when I added content (I have a cache action to clear caches when content is added)
Comment #4
geoffreyr commentedMinor change to this patch to add an extra check for a value of $cache_plugin.