If you export custom blocks (that already existed) with Features Extra, they will fail to create properly in any site receiving them. The problem is fe_block_boxes table does not have a db record for these blocks. When the feature is enabled/reverted/rebuilt, it hits this line of code:

$bid = fe_block_get_bid($object->machine_name);

Problem is, if the block record does not exist in fe_block_boxes, the code after it will always fail and thus not properly create the block in-full when the Feature is enabled.

The $object itself has a machine_name, but the table has no record of it. I found this to be the case with blocks that existed prior to Features Extra being used... it was a little confusing tracking this down. It came down to me having to do this in a hook_update for my upgrade scripts:

  db_insert('fe_block_boxes')
    ->fields(array(
      'bid' => 1,
      'machine_name' => 'footer_address',
    ))
    ->execute();

Comments

kevinquillen’s picture

Issue summary: View changes
JenniferRader’s picture

Subscribe.

Rafal Lukawiecki’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev

I can add that this issue affects the current version of fe_block, incl 7.x-1.x-dev. If the block existed *before* importing via a feature, it will fail to have its machine name retrieved upon feature enable or revert.