Hi,

I've recently tried to use Features Extra module to export and import blocks between 2 sites. I found that one of the functions is calling the _block_rehash function. Features extra did the box import ok, but the block settings weren't imported properly. I found that if I modify

// Add defaults and save it into the database.
drupal_write_record('blocks', $block);

// Set region to none if not enabled.
$block['region'] = $block['status'] ? $block['region'] : BLOCK_REGION_NONE;       
          

To:

 
// Set region to none if not enabled.
$block['region'] = $block['status'] ? $block['region'] : BLOCK_REGION_NONE;
          
// Add defaults and save it into the database.
drupal_write_record('blocks', $block);

it works. Please let me know if I'm incorrect but I see no reason to save the block to the database before setting additional information.

Thanks

Rob

Comments

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.