Closed (duplicate)
Project:
Features Extra
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2012 at 14:54 UTC
Updated:
25 Feb 2013 at 18:59 UTC
We have a number of blocks that are stood up with a feature and I am now noticing that their page visibility is blank when I edit a block after the feature has been enabled. Their visibility and locations are correct after enabling the feature, but these paths do not appear when editing the block. The pages are being set in code. 'Show block on specific pages' is also set to 'All pages except those listed' instead of 'Only on the listed pages' as it should in code. I was pretty sure the blocks were showing this information when being edited in the past.
$theme['views-news-block'] = array(
'module' => 'views',
'delta' => 'news-block',
'theme' => 'seven',
'status' => 0,
'weight' => '0',
'region' => '',
'custom' => '0',
'visibility' => '1',
'pages' => '<front>',
'title' => '',
'cache' => -1,
);
$theme['views-news-block'] = array(
'module' => 'views',
'delta' => 'news-block',
'theme' => 'boxed',
'status' => '1',
'weight' => '0',
'region' => 'content',
'custom' => '0',
'visibility' => '1',
'pages' => '<front>',
'title' => '',
'cache' => -1,
);
$theme['views-news-block'] = array(
'module' => 'views',
'delta' => 'news-block',
'theme' => 'standard',
'status' => '1',
'weight' => '0',
'region' => 'content',
'custom' => '0',
'visibility' => '1',
'pages' => '<front>',
'title' => '',
'cache' => -1,
);
$theme['views-news-block'] = array(
'module' => 'views',
'delta' => 'news-block',
'theme' => 'wide',
'status' => '1',
'weight' => '0',
'region' => 'content',
'custom' => '0',
'visibility' => '1',
'pages' => '<front>',
'title' => '',
'cache' => -1,
);
Comments
Comment #1
vinmassaro commentedThese are block configs exported as fe_block_settings. I have one custom block being exported as fe_block_boxes and this DOES contain the correct pages when I view its block settings.
Comment #2
vinmassaro commentedThis still seems to be happening if I export the block settings for a block created by a view, in the same feature that the view is created.
If I add the view in one feature, and stand up its block configurations in another feature afterward, then it works correctly. Thoughts?
Comment #3
vinmassaro commentedI am running the latest 7.x-1.x-dev (2012-Dec-31) by the way.
Comment #4
pfrenssenIt sounds like the block settings are being reverted before View that creates the blocks exists. I have encountered similar problems when using Features with components that depend on other components. If you are deploying your new features using update hooks you could manually specify the components to revert in the right order:
This should help you for now, but we should find a permanent solution, we could update the module weight of FE Block so it runs after the modules that define blocks. There is already an issue for this, so I'm marking this as a duplicate. See #747128: Be sure the modules are running after their dependencies.
Comment #5
vinmassaro commented@pfrenssen: FWIW, I can't the code in #4 to work as documented here.