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.
Hello!
I'm creating a dashboard for my site using homebox which uses blocks for the widgets. Chaos Blocks is a great tool for doing this, because I'm creating a ton of blocks which is painful in straight Drupal.
However, homebox is passing its special per-user settings to hook_block() via the $edit argument on $op == 'view'. But ctools_block_handle_block() doesn't pass it along. Of course, just passing it could cause problems, because what if the block doesn't care about homebox!
Attached is a patch attempting to fix it. Let me know what you think!
Regards,
David.
Comment | File | Size | Author |
---|---|---|---|
#2 | homebox-compat.patch | 987 bytes | dsnopek |
homebox-compat.patch | 777 bytes | dsnopek |
Comments
Comment #1
neclimdulI don't see a problem with just passing $edit to all the callbacks functions. It'll be backwards compatible(as if that mattered since there isn't a release) because arguments that aren't in the function definition will just be dropped by PHP.
Thanks for your interest and would love to have you test this!
Comment #2
dsnopekSounds good to me! Attached is a new patch that always passes $edit to all callbacks. It works fine in my use case!
Best regards,
David.
Comment #3
neclimdulLooks great. Committed and pushed.