From cd6f284ad36a10d839e4f7972450466cd570dfb8 Mon Sep 17 00:00:00 2001
From: Diogo Correia <diogocorreia@devuo.net>
Date: Fri, 30 Dec 2011 20:28:16 +0000
Subject: [PATCH] Fix missing contexts in views content panes.

The reported behavior happened when a replacement token was inserted unto a views argument input field in panels and at render time as there was no required context set in the views display plugin, and as such was entirely optional, ctools_content_select_context() would simply return NULL for a context (see line 756 of ctools/includes/content.inc). The following fix solves the issue by setting the view_pane key to 'all contexts' as true, thereby forcing ctools_content_select_context() to process and return all the defined contexts. As far as I know this is a sensible approach since a view pane, much like a custom pane, can accept optional (contextual) arguments.
---
 .../plugins/content_types/views_panes.inc          |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc b/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc
index 3a45a40..ae3468e 100644
--- a/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc
+++ b/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc
@@ -13,6 +13,7 @@ function views_content_views_panes_ctools_content_types() {
   return array(
     'title' => t('View panes'),
     'admin settings' => 'views_content_admin_form',
+    'all contexts' => TRUE,
   );
 }
 
-- 
1.7.5.4

