Views 7.x-3.0RC1
Panels 7-3.0-alpha3

Objective Summary: Create a view of nodes (View_A) and create View Pane and Context from View_A. Create another view (View_B) that takes a node ID as argument and create a View Pane from View_B. Display View_A with pager 1 and View_B in a panel that uses Context from View_A.

Note: I used this feature in 6.x-2 and it worked perfectly. After migrating to 7.x-3 , I can't get it to work. I suppose this is an issue with views as the context is available in panel but not in View_B pane

Repeatable: Always

Steps to repeat:
1. Create a view of nodes (View_A) and create View Pane and Context from View_A
2. Create another view (View_B).
- Add contextual filter Content:Nid
3. Create View Pane from View_B
- Set "Argument input" -> Content: Nid source to Context and Required Context to Content ID
3. Create panel page
- Add context of View_A
- Add relationship Node from View_A and "Row Number" 1
- Add Content View_A view pane
- Add Content View_B view pane

Expected Results:
As per my 6.x implementation, I should see View_B listed in view panes list of the panel page adding content section. When adding the pane, the settings should have Node:Nid set to "Node from View_A"
Now my panel page should show the View_A nodes one by one and related content of View_B.

Actual Results:
View_B is not listed in view panes list of the panel page adding content section so I can not add my View_B pane. If I make the View_B pane argument input optional, then the pane shows up in the list but does not propose the setting "Node from View_A". So it appears to me that the context in the view pane is the issue. (I am also using the same context for custom panes and it works fine.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Chaos Tool Suite (ctools)
Version: 7.x-3.0-rc1 » 7.x-1.x-dev
Component: Views Data » Views Content

This seems to be a bug of ctools not of views.

thill_’s picture

Subscribe, ran into this today on a complicated page

merlinofchaos’s picture

FileSize
2.43 KB

This patch should fix it.

thill_’s picture

This patch along with #1274720: Node contexts created by relationships from Views Context cannot be passed to a Views Pane. seemed to solve my issue, I am not sure which one did it as i had both applied at the same time.

I will be testing/building some additional pages and will report back any further findings.

Thank you

francois o’s picture

I applied the patch in #3. It fixed the problem of not showing the view in the view panes list of the panel page.
Now I'm facing a problem that may not be related but want to share here to make sure.
View_A is configured to show one node per page.
View_B displays the content related to View_A node (Content:ID acquired through the "node from view" context)
For the first node of the view this works well, but when I switch to the second node of View_A, View_B displays empty. This was working fine in D6, the context was passig the change in nodeID properly to the second view.

merlinofchaos’s picture

Status: Active » Fixed

#5: For the second part, can you please file a new issue with reproduction instructions? That sounds interesting and needs to be investigated.

This patch is committed and pushed.

andypost’s picture

Status: Fixed » Needs work
+++ b/plugins/contexts/node.incundefined
@@ -35,6 +36,7 @@ $plugin = array(
+  dsm(debug_backtrace());

this should be removed

andypost’s picture

Status: Needs work » Needs review
FileSize
418 bytes

Please remove this dependency

francois o’s picture

I opened http://drupal.org/node/1298660 for issue in #5

Cyberwolf’s picture

Subscribing.

andypost’s picture

Status: Needs review » Fixed

Already commited

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.