Got this problem when trying to write a views handler patch to fe_nodequeue and didn't have access to the nodequeues views handlers.

Comments

ptrl’s picture

Title: Be sure the modules are running before its dependencies » Be sure the modules are running after its dependencies

AFTER :)

wizonesolutions’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)
Issue tags: +module weight
StatusFileSize
new2.08 KB

I'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.

pfrenssen’s picture

Title: Be sure the modules are running after its dependencies » Be sure the modules are running after their dependencies
Status: Patch (to be ported) » Needs work
Issue tags: -module weight +D7 stable release blocker

In 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.

pfrenssen’s picture

dkingofpa’s picture

Is this just a case of setting fe_block's weight to the maximum weight in the system table + 1?

pfrenssen’s picture

@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.