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'];
      }

Comments

johnv’s picture

StatusFileSize
new2.17 KB

Attached 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.

fabsor’s picture

This 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?

zabelc’s picture

This 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)

geoffreyr’s picture

Issue summary: View changes
StatusFileSize
new2.86 KB

Minor change to this patch to add an extra check for a value of $cache_plugin.