Closed (fixed)
Project:
Features
Version:
7.x-2.0-rc5
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2012 at 10:10 UTC
Updated:
31 Oct 2013 at 12:10 UTC
My specific requirement involves a context plugin which has been added as a new dependency of an existing feature. This feature also includes a context which requires the new context plugin. Due to context module not picking up new context plugins until after a cache clear, the context requiring the new plugin simply seems to not work. Clearing the cache makes the new plugins settings appear on the context admin page, and the context magically begins working again.
Comments
Comment #1
hefox commentedThere's an issue about adding a hook called after revert, could look for that issue.
However, it sounds like a bug that the context isn't showing, which is likely either a ctools or a context issue.
Comment #2
mpotter commentedClosing this for lack of activity. Please re-open this issue if you can reproduce it in the latest version.
Comment #3
dmsmidtReopening this as I have the same problem as the original poster.
Using:
Context 7.x-3.0-rc1
Features 7.x-2.0-rc5
- Created a custom context reaction plugin
- Created a context with the reaction from the plugin
- Created a feature with the context and dependency on the custom plugin
- Install new site with in its install profile the given feature
- On the new site the custom reaction plugin is enabled
- Context UI doesn't show the custom plugin until a clear cache
Any ideas?
Comment #4
dmsmidtTo answer the main question:
There are some hooks which can be used to run some code after a rebuild / revert:
See: http://drupalcontrib.org/api/drupal/contributions%21features%21features.api.php/7
You can put that code in your features .module file.
I thought a
cache_clear_all('plugins:context:plugins', 'cache');would do the trick.But it doesn't, even
registry_rebuild();doesn't. So for now I use a hook_enable() in my .install file with a consumingdrupal_flush_all_caches();.Maybe a thing for the context module to automate ...