Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you use your installation profile to create something that has a block attached, like an aggregator feed, I think you should be able to enable that block using install_set_block(). However, at present, there is only an "UPDATE" sql statement, which of course cannot enable blocks that don't already exist in the {blocks} table. The workaround is just to write a db_query to insert the block manually before running install_set_block, but I think we should just have the function itself do that if it's necessary.
Comment | File | Size | Author |
---|---|---|---|
#1 | 869040_install_set_block.patch | 679 bytes | dnotes |
install_set_block_for_new_blocks.patch | 878 bytes | dnotes |
Comments
Comment #1
dnotes CreditAttribution: dnotes commentedBad patch sorry here's one that seems to work better...