Jump to:
| Project: | Node displays contributions |
| Version: | 6.x-2.4 |
| Component: | ND Context |
| Category: | bug report |
| Priority: | normal |
| Assigned: | frega |
| Status: | postponed (maintainer needs more info) |
Issue Summary
A tiny module attached exposing nd-build modes of a full node view as conditions and reactions to context-3.x; Context-2.x will not work.
Condition and reaction currently *only* operate on full node page views.
nd_context_bm-condition: currently only makes sense in unison with e.g. nd_switch_bm (because otherwise the build mode will always be "full", and you could just use context's node-type condition :).
nd_context_bm-reaction: add nodes (e.g. node/1, node/2 ...), add a new context with a path condition for some of these nodes (node/1) and as reaction choose a different build mode (and context's debug) to see that it is activated, check node/1 etc.
note:
- something to potentially watch out for: i don't think that context reacts on changes triggered by contexts, i.e. if you change a build mode via a nd_context_bm-reaction to build mode "A", an existing nd_context_bm-condition on build mode "A" is not necessarily triggered!
- it might make sense to overrule all kinds build modes of nodes being displayed by means of context (e.g. in views), but this could get really crazy :)
| Attachment | Size |
|---|---|
| nd_context_bm.tar_.gz | 1.48 KB |
Comments
#1
Nice again - did a quick test and works out fine.
Code is fine too, it's ready to commit as far as I know!
#2
sure, if you're cool with the code, go ahead! i would like to explore where one can go with this integration module: one could do great things but also cause a lot of havoc on a site :)
#3
Committed, thanks!
You indeed could go wild with this one, love it!
#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
This no longer seems to work, which is a real shame. I suspect it's just an issue with the API change in the latest version of Context.
#6
They did an API change in the latest version of context, now that's fun, sigh. Hope I can get frega to chime in here.
#7
Sure i'll be happy to have a look - but it'll be a few days - if you can point me to the context.module api-change it'll maybe go faster :)
best,f
#8
I am afraid - I can't reproduce the problem with ds-6.x-1.4, nd-6.x-2.4, nd_contrib-6.x-2.4.
Since there hasn't been any changes in context (still at 6.x-3.0), i think something else is at work.
I've had problems w/ contexts (w/o this module) mysteriously not being activated in the past; resaving the context has helped in most cases (i know that's hacky).
w/o more input i am afraid there's not much i can do - sorry. setting to "needs more info" - please reopen, will look it into it then.
#9
also mentioned in #1073102: Buildmode not switched
#10
Will close this for now, as frega said, clear steps to reproduce will probably help more to debug.
#11
Finally back on a project where I need this. Quick test and not working, so will do some debugging and provide some more information and a patch.
#12
Ok, so I narrowed it down to the conditions, even though the conditions I were using where valid and the reaction was being applied (on the second hit of hook_nodeapi('view') (which in itself is suspect)), it appears that I can only (so far) get it to work if I use the 'path' condition, whereas my initial test cases where using taxonomy as the condition. I also tried content type as the condition, but no luck there either.
Strange. Not sure if it's just a limitation of Context, this sub-module, or something else.
Happy to provide more information if I can, but for now I'm just going with path condition as a workaround.
Cheers,
Deciphered.
(Leaving open for a response).
#13
Did you get anywhere with this? I wonder if you have two nodes being loaded on one path, with the second one cancelling out the behaviour of the first?
Im going to mark this 'needs more info'.
#14
I can confirm that attempting to use either the node type condition or the taxonomy condition kills the build mode reaction even though other reactions (like adding a block) will work just fine. The theme condition added by Context Plugin Extras works fine.
Context 6.x-3.0
Context Plugin Extras 6.x-3.0-beta5
Node displays 6.x-2.8
Node displays contributions 6.x-2.8
#15
I can confirm that the configuration in #14 works to trigger the build mode.
Just a note on this, if you are using Mobile Tools module and the Mobile build mode for your mobile theme you need to select "Enable a Mobile Tools display mode" in the mobile_tools settings. Otherwise your build mode doesn't get triggered. This might help out some others who get stuck like I just did.
#16
Looks like I've been thrown a red herring. Turns out the context wasn't working at all, but Mobile Tools provides its own build modes that integrate with display suite.
I can't get the Context Plugin Extras theme condition to work for my mobile theme at all, possibly because of inteference by Mobile Tools module. See http://drupal.org/node/1156852 for some more details on that issue, which may be useful for others who end up here with problems with mobile themes.