Got this problem when trying to write a views handler patch to fe_nodequeue and didn't have access to the nodequeues views handlers.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | features_extra_747128_module_weights.patch | 2.08 KB | wizonesolutions |
| weight_install_module.patch | 2.23 KB | ptrl |
Comments
Comment #1
ptrl commentedAFTER :)
Comment #2
wizonesolutionsI've re-rolled this patch properly against 6.x-1.x and added hook_update_N() implementations.
This patch is for reference, but I've pushed the changes. Needs porting to 7.x-1.x.
Comment #3
pfrenssenIn the case of blocks I've encountered cases where FE Block was running before the module that creates the block (ie Views), effectively trying to place a block that not yet exists. So FE Block should run after all modules that implement
hook_block_info(). This problem can usually be solved by reverting the feature a second time.Also the current patch only sets weights when the module is initially installed. To be able to support block-generating modules that are installed after FE Blocks it would be necessary to set the weight on
hook_modules_enable()as well.Comment #4
pfrenssen#1830180: Page visibility is exported but empty when editing block is marked as a duplicate of this issue.
Comment #5
dkingofpa commentedIs this just a case of setting fe_block's weight to the maximum weight in the system table + 1?
Comment #6
pfrenssen@dkingofpa, no that would not be necessary, it is sufficient if it is 1 higher than the highest module that implements hook_block_info(). I still have to investigate if this actually works. An alternative would be to implement a Features Pipe that would add the block settings automatically if a module such as Views would export their blocks, in the same way as Strongarm exports node variables when a node type is exported.