Blocks added to a created theme region are evaluating to blank even when context is active.

I'm using a Zen subtheme. Commenting out zen_blocks does not change it.

Adding that same block to the region via the Block module will display it.

I think this is a major bug but will leave it to others to mark the priority. I've been developing with Context and Zen for a year or so now and never seen this bug before.

Steps to replicate:

Zen theme, context. Create a new region. Add blocks to it with context.

Comments

glass.dimly’s picture

This is the bug over at the Zen module.

http://drupal.org/node/1233610

glass.dimly’s picture

Alright, I figured out what's causing this bug.

Bug: Unable to populate theme region via context (but possible through block module)

More reporting:

  1. Context inspector shows the context as the only active context
  2. Blocks can be added to other theme regions

Here's the fix:
Under Conditions->Context I had "~other_context".

Removing that causes the context to populate the region with content.

glass.dimly’s picture

$context = new stdClass;
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'client_publications';
$context->description = 'Active on publication pages that are not books or the books landing page.';
$context->tag = 'publications';
$context->conditions = array(
  'context' => array(
    'values' => array(
      '~client_block' => '~client_block',
    ),
  ),
  'node' => array(
    'values' => array(
      'publication' => 'publication',
    ),
    'options' => array(
      'node_form' => '0',
    ),
  ),
);
$context->reactions = array(
  'block' => array(
    'blocks' => array(
      'views-publications-block_4' => array(
        'module' => 'views',
        'delta' => 'publications-block_4',
        'region' => 'sidebar_second',
        'weight' => 0,
      ),
      'cck_blocks-field_related_experts' => array(
        'module' => 'cck_blocks',
        'delta' => 'field_related_experts',
        'region' => 'sidebar_second',
        'weight' => 1,
      ),
      'views-related_content-block_7' => array(
        'module' => 'views',
        'delta' => 'related_content-block_7',
        'region' => 'sidebar_second',
        'weight' => 2,
      ),
      'block-2' => array(
        'module' => 'block',
        'delta' => 2,
        'region' => 'sidebar_second',
        'weight' => 3,
      ),
      'block-1' => array(
        'module' => 'block',
        'delta' => 1,
        'region' => 'sidebar_second',
        'weight' => 4,
      ),
      'block-5' => array(
        'module' => 'block',
        'delta' => 5,
        'region' => 'page_closure',
        'weight' => 0,
      ),
      'block-11' => array(
        'module' => 'block',
        'delta' => 11,
        'region' => 'page_closure',
        'weight' => 1,
      ),
      'block-3' => array(
        'module' => 'block',
        'delta' => 3,
        'region' => 'page_closure',
        'weight' => 2,
      ),
    ),
  ),
);
$context->condition_mode = 1;

// Translatables
// Included for use with string extractors like potx.
t('Active on publication pages that are not books or the books landing page.');
t('publications');
glass.dimly’s picture

....and here's the context that works:

$context = new stdClass;
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'client_publications';
$context->description = 'Active on publication pages that are not books or the books landing page.';
$context->tag = 'publications';
$context->conditions = array(
  'node' => array(
    'values' => array(
      'publication' => 'publication',
    ),
    'options' => array(
      'node_form' => '0',
    ),
  ),
  'node_taxonomy' => array(
    'values' => array(
      4 => 4,
      5 => 5,
      6 => 6,
      7 => 7,
      8 => 8,
      334 => 334,
    ),
    'options' => array(
      'node_form' => '0',
    ),
  ),
);
$context->reactions = array(
  'block' => array(
    'blocks' => array(
      'views-publications-block_4' => array(
        'module' => 'views',
        'delta' => 'publications-block_4',
        'region' => 'sidebar_second',
        'weight' => 0,
      ),
      'cck_blocks-field_related_experts' => array(
        'module' => 'cck_blocks',
        'delta' => 'field_related_experts',
        'region' => 'sidebar_second',
        'weight' => 1,
      ),
      'views-related_content-block_7' => array(
        'module' => 'views',
        'delta' => 'related_content-block_7',
        'region' => 'sidebar_second',
        'weight' => 2,
      ),
      'block-2' => array(
        'module' => 'block',
        'delta' => 2,
        'region' => 'sidebar_second',
        'weight' => 3,
      ),
      'block-1' => array(
        'module' => 'block',
        'delta' => 1,
        'region' => 'sidebar_second',
        'weight' => 4,
      ),
      'block-5' => array(
        'module' => 'block',
        'delta' => 5,
        'region' => 'page_closure',
        'weight' => 0,
      ),
      'block-11' => array(
        'module' => 'block',
        'delta' => 11,
        'region' => 'page_closure',
        'weight' => 1,
      ),
      'block-3' => array(
        'module' => 'block',
        'delta' => 3,
        'region' => 'page_closure',
        'weight' => 2,
      ),
    ),
  ),
);
$context->condition_mode = 1;

// Translatables
// Included for use with string extractors like potx.
t('Active on publication pages that are not books or the books landing page.');
t('publications');
alberto56’s picture

This is a zen bug I've come across before. I think it has nothing to do with context.

I remember it being fixed in zen, but can't find the specific issue. Anyhow, just make sure you are using v. 6.x-2.1 or higher of zen and it will work.

Cheers,

Albert.

paulocs’s picture

Issue summary: View changes

Closing this issue as context 6.x is no longer supported.

Thanks.

paulocs’s picture

Status: Active » Fixed
paulocs’s picture

Status: Fixed » Closed (outdated)