Closed (duplicate)
Project:
Features
Version:
7.x-1.0-rc1
Component:
Context
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2012 at 20:12 UTC
Updated:
9 Apr 2012 at 02:57 UTC
I've created several contexts that I want to reuse, and exported them as part of a feature. When I build/install a site and enable my feature, all of the the contexts are listed on the feature page, in a default state. But the contexts do not appear on /admin/structure/context/list.
I've run drush site-install --verbose --debug and noticed nothing out of the ordinary.
Comments
Comment #1
hefox commentedIs the .features.inc there and is hook_ctools_api in that file?
Comment #2
davidtrainer commented.features.inc has hook_ctools_plugin_api, but not hook_ctools_api:
Comment #3
davidtrainer commentedForgot to change status.
Comment #4
hefox commentedAh I was thinking of d6 hook; guess this is the equalent d7 so that looks good
And features.inc is included at top of your .module?
Comment #5
davidtrainer commentedNo (!) features.inc was not included in the .module. I added it and confirmed that it fixed the issue. Thanks, hefox.
The module contained some custom code and, prior to that, the comment
// Drupal needs this blank file.Could this have happened because I added custom code to the module, before adding contexts to the feature?Comment #6
hefox commentedf the feature was created and didn't have that line added, the line isn't automatically added when it's readded. There's at least one issue about fixing that (don't have NID handy)
Comment #7
gauravkumar87 commentedA related issue persists :
When I try and export contexts via features, the contexts do not get installed. Upon further investigation, it turned out that the features.inc file in my feature export contained :
instead of
Once I replaced this function with the actual contents, the context was installed.
~Gaurav
Comment #8
hefox commentedThere's quite a few issues about this, and has been fixed in -dev