I noticed that with 6.x-2.0 beta2 when you disable a region, all regions are disabled in that content

I was able to fix this in context.core.inc on line 438

 // Kill blocks in disabled regions
  foreach (array_keys($disabled_regions) as $r) {
    unset($blocks[$r]);
  }

Changed to

 // Kill blocks in disabled regions
  foreach ($disabled_regions as $r) {
    unset($blocks[$r]);
  }

Comments

loze’s picture

Title: Disabling a any region will disable all regions » Disabling any region, disables all regions
stijndm’s picture

I just want to confirm this issue, and to confirm that this fix works for me.

pasqualle’s picture

Status: Active » Needs review
StatusFileSize
new1.82 KB

the problem is that the 'checkboxes' form type is stored like this (I only disabled the footer region):

  'theme_regiontoggle' => array(
    'footer' => 'footer',
    'left' => 0,
    'right' => 0,
    'content' => 0,
    'header' => 0,
  ),

The best solution would be to not save the unchecked items (with using array_filter() php function)

  'theme_regiontoggle' => array(
    'footer' => 'footer',
  ),
pasqualle’s picture

StatusFileSize
new2.4 KB

ok, the patch #3 messed up the path setting (context reaction), since I made use of the same save functionality for context conditions and reactions. Conditions saved the array key from the form item, and reaction saved the array value. So lets always save the array keys only..

  'theme_regiontoggle' => array(
    '0' => 'footer',
  ),
yhahn’s picture

Assigned: Unassigned » yhahn
Status: Needs review » Fixed

Great, committed.

Status: Fixed » Closed (fixed)

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