I'm currently using Context 6.x-2.0-beta7 together with Panels 6.x-3.0 and I cannot get my head arround it.
Context works fine everywhere except when I choose "Node Pages" as a context setter on overriden content types. I used Panels 3 to override my nodetype gallery put I want to show several blocks which should be delivered from the context module. It seems context is not detecting the content type properly, because of the override action coming from panels.
Is there anything i can do about that? Or is there a workaround? I already lost several days and nights to this issues which tracks me for about 5 month now - yeah, I'm could use another solution or views attach instead of node overrides - but these two modules are just perfect and could be even better if they would work in conjunction.
Maybe its just the way context distinguishes between the nodetypes? any hints pls
Comment | File | Size | Author |
---|---|---|---|
#16 | node-view-ctools-595744-16.patch | 639 bytes | james.williams |
#6 | context_ctools_override_integration.zip | 976 bytes | mani.atico |
#4 | context_ctools_override_integration.zip | 957 bytes | mani.atico |
#3 | context_ctools_override_integration.zip | 950 bytes | mani.atico |
Comments
Comment #1
Pasquallecontext/context.core.inc
ctools/plugins/content_type/node.inc
http://api.drupal.org/api/function/node_view/6
The third param $page is always FALSE in Panels. And it is required for context module to identify it as a node page..
note: This is a quick code analysis only. I did not test if this is what really happens here..
Comment #2
Johnnyk CreditAttribution: Johnnyk commentedWell then I'll take this issue over to the panels issues
Maybe Merlinofchaos has an Idea/Solution or a good reason why this is the way it is ;)
Thank you for you quick answer - I'll link the panels issue as soon as it appears.
Interesting that for example the Custom Breadcrumb Module has no problem to distinguish the node type at all (talking about the 2.x dev release) - But I don't know anything about their approach
Comment #3
mani.atico CreditAttribution: mani.atico commentedHere is an small module I wrote to prevent this from happening. TEll me how it goes.
Comment #4
mani.atico CreditAttribution: mani.atico commentedSent the wrong version, sorry.
Comment #5
Pasquallethe 'argument_nid_1' value does not seems like a general identifier of node context in the panels module..
Comment #6
mani.atico CreditAttribution: mani.atico commentedHi Pasqualle,
Indeed, this would cause some trouble if the user (or other module) has defined a custom path through ctool's page manager which involves one or more nid arguments (example: examplepath/%nid). I'm not complety sure, but I think 'argument_nid_1' stands for 'argument_{type}_{delta}'. So I agree with you: maybe checking 'argument_nid_1' is not the best way to do it, 'gramatically' speaking.
Anyway, the real problem is determing if a 'node page' or a costum path is being rendered. This information is available in the $task argument passed by the alter function. Here is what dprint_r prints:
I really don't know which value should be used to determine if a 'node page' is being rendered, but maybe 'admin path' or 'title' are fine.
I attach the new version of the module.
Comment #7
Johnnyk CreditAttribution: Johnnyk commentedThat is absolutely awesome!
Thank you very much!
Comment #8
pokadan CreditAttribution: pokadan commentedDoes not work for me. I use Context 6.x-2.0-beta7 together with CTOOLS 6.x-1.2.
As I understand it, this is not a Panels incompatibility but rather a Ctools incompatibility.
Enabling the module at http://drupal.org/node/595744#comment-2136758 does not change anything for me.
Comment #9
yhahn CreditAttribution: yhahn commentedFYI, I committed a very similar implementation of this to the 3.x branch: http://drupal.org/cvs?commit=326196
Comment #10
mstef CreditAttribution: mstef commentedI'm still having this problem with:
Context 6.x-2.0-beta7
Panels 6.x-3.3
CTools 6.x-1.3
Where do we stand?
Comment #11
mstef CreditAttribution: mstef commented#6 works perfectly.
So this is a context problem? Is it being committed?
Anyway to turn that into a patch, rather than another module?
Comment #12
Steven Jones CreditAttribution: Steven Jones commentedThe code from #9 should be easy enough to integrate into Context 2.x.
Comment #13
Steven Jones CreditAttribution: Steven Jones commentedYup, need to backport this.
Comment #14
Steven Jones CreditAttribution: Steven Jones commentedCommitted to CVS: http://drupal.org/cvs?commit=357350
Comment #16
james.williams CreditAttribution: james.williams commentedI'm re-opening this, because unfortunately the structure of the CTools contexts array that gets inspected has changed, so this issue is once again a problem. The attached patch fixes this.
Comment #17
james.williams CreditAttribution: james.williams commentedAnd now actually changing the status of the issue...
Comment #18
febbraro CreditAttribution: febbraro commentedThanks. Committed to 7.x
http://drupalcode.org/project/context.git/commit/d4ad75a