Hi there, there are a number of separate issues in the queue all based on the same theme. I'm attempting to reconcile that into a single issue here. Below is a code snippet that I had been using to resolve the issues, please review, and if this is satisfactory I could roll out a patch. thank you!

/**
 * Implementation of hook_ctools_render_alter().
 * Used to detect the presence of a page manager node, taxonomy or user view and form.
 */
function context_ctools_render_alter($info, $page, $data) {
  extract($data);
  // Check for node page handler
  if ($page && in_array($task['name'], array('node_view', 'node_edit'), TRUE)) {
    foreach ($contexts as $ctools_context) {
      if (in_array('node', $ctools_context->type) && !empty($ctools_context->data)) {
        context_node_condition($ctools_context->data, $task['name'] === 'node_view' ? 'view' : 'form');
        break;
      }
    }
  }
  // Check for taxonomy term page handler
  if ($page && in_array($task['name'], array('term_view', 'term_edit'), TRUE)) {
    foreach ($contexts as $ctools_context) {
      if (in_array('taxonomy_term', $ctools_context->type) && !empty($ctools_context->data)) {
        $plugin = context_get_plugin('condition', 'taxonomy_term');
        $plugin->execute($ctools_context->data, $task['name'] === 'term_view' ? 'view' : 'form');
        break;
      }
    }
  }
  // Check for user page handler
  if ($page && in_array($task['name'], array('user_view', 'user_edit'), TRUE)) {
    foreach ($contexts as $ctools_context) {
      if (in_array('user', $ctools_context->type) && !empty($ctools_context->data)) {
        $plugin = context_get_plugin('condition', 'user');
        $plugin->execute($ctools_context->data, $task['name'] === 'user_view' ? 'view' : 'form');
        break;
      }
    }
  }
}

Comments

hazah’s picture

Issue summary: View changes

Changed to <?php

damienmckenna’s picture

Assigned: hazah » Unassigned
Priority: Critical » Normal
Status: Needs review » Needs work

Please provide a patch, thank you.