Closed (fixed)
Project:
Context
Version:
6.x-3.0-beta5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2010 at 14:39 UTC
Updated:
28 Jun 2010 at 17:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
sirkitree commentedI'm not getting an error message, but I am getting nothing imported. I've tried in 3.x-dev, beta4 and beta5
Here's a simple export that isn't working:
Comment #2
q0rban commentedWhat version of ctools are you using?
Comment #3
sirkitree commentedthis was with 1.4
Comment #4
thebuckst0p commentedI'm having the same issue: multisite installation with 2 databases on the same core and modules, created a feature in the first with a context, tried to enable the feature on the second, and the context won't import. (Also says the feature is overridden, I try drush features-update on it and it removes the context.) Tried to import the context manually and got the errors described above.
CTools 6.x-1.4, Context 6.x-3.0-beta5 (Context and UI enabled, Context Layout not enabled), Features 6.x-3.0-beta4.
Comment #5
thebuckst0p commentedThe common.inc errors are caused by a syntax error in context_ui.admin.inc, patch attached. It's trying to drupal_set_message "An error occurred while importing. Please check your context definition." but the syntax error with t() caused the intermediate message.
This doesn't solve the problem, just allows it to be accurately debugged.
Comment #6
thebuckst0p commentedThe bug is in the import code.
eval()creates each variable/object defined in the string, so$contextin the eval string will become an object, but$context = eval($import);where$contextis set inside$importmeans the outer$contextwill override the imported/eval'd one.This patch fixed both the issue in the previous comment and the larger one, and contexts seem to be importing now.
Comment #7
thebuckst0p commentedComment #8
mrtorrent commentedThe patch from #6 works for me in the regular context import. Reverting contexts from features still does not work, however, but perhaps this is a separate issue.
Comment #9
q0rban commentedI would make sure you all are using the latest stable releases of each of these modules, re-create your contexts, and then update your feature.
Comment #10
mrtorrent commentedI am and I have. Reverting contexts from features just seems to have no effect
Comment #11
q0rban commented> Reverting contexts from features just seems to have no effect
Just to clarify, did you recreate the context and update the feature first?
Comment #12
mrtorrent commentedYes, that's right. So, for example, this afternoon I created a new context, exported it in a feature, and then deployed (copied and enabled) the feature to another server. On enabling the feature, the context was not created and shows as 'overridden.' Attempting to revert the context from within features has no effect -- there is a success message saying it has been reverted, but it still shows as overridden and does not appear in the contexts admin UI.
Comment #13
mrtorrent commentedTurns out it was indeed a Features issue. Patch here fixes it: http://drupal.org/node/814414
Comment #14
miklI’ve tried the latest dev version of Features that includes the patch from #814414: Exported contexts are overridden and removed, but it does not appear to solve this issue.
Comment #15
miklThe patch from #6, however, does solve the problem.
Comment #16
yhahn commentedThanks, committed: http://drupal.org/cvs?commit=379734