This is a patch to block.inc that allows several extra, optional, arguments to be passed to the install_set_block() function. Backwards compatibility is not broken.
Please let me know if this is useful, or if you can suggest improvements.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | block.inc_.no-debug.patch | 1.68 KB | James Andres |
| block.inc_.patch | 1.93 KB | James Andres |
Comments
Comment #1
James Andres commentedComment #2
James Andres commentedLeft some debugging stuff in the first patch. Use this one instead.
Comment #3
damienmckennajamesandres: I've noticed that the blocks are not compiled during the install process but rather afterwards, which can be verified by running a bare install and looking at the blocks table right afterwards. Do you use _block_rehash() to compile the initial list first, so there are no records for install_set_block() to update?
Comment #4
damienmckennaI've noticed a problem.. I assign a new default theme but then when I run block functions, e.g. _block_rehash() to re-hash all of the available blocks, it still happens on the Drupal default Minnelli rather than on the theme I've added.
Comment #5
damienmckennaIt turns out that the problems I was experiencing are because of #399212: install_default_theme() should set the $theme_key global and #399224: Blocks not rehashed after module installation, so blocks cannot be correctly modified.
Comment #6
damienmckennaThis patch works well, I used it as part of a fairly complete install profile.
Comment #7
James Andres commentedAppears to be no complaints, committing.