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.
Assume that the site admin has created a box (custom block) with input filter 'full html'. Next, an authenticated user without permission to use 'full html' attempts to configure this block. A bug in block.module's hook_block implementation causes the fields added by the box form (description and body) not to be added to the form.
Unfortunately, this causes validation in block_admin_configure_validate() to fail, since $form_state['values']['info'] is empty. It shouldn't be - the correct thing to do is to only hide the box body, not all box fields.
Patch attached.
Comment | File | Size | Author |
---|---|---|---|
#2 | block.module.patch | 952 bytes | electricmonk |
block.module.patch | 958 bytes | electricmonk | |
Comments
Comment #2
electricmonk CreditAttribution: electricmonk commentedComment #3
electricmonk CreditAttribution: electricmonk commentedComment #5
electricmonk CreditAttribution: electricmonk commentedApparently. 6.x-dev branch has an OLDER version of block.module than the 6.16 branch (6.16 is v1.299.2.4 2009/10/06 12:13:01 goba, 6.x branch is v 1.299.2.3 2008/06/24 14:40:08 goba). The only difference is the version number, everything else is identical between the two files.
Someone should fix the 6.x branch first, then this patch will pass tests.
Comment #6
thedavidmeister CreditAttribution: thedavidmeister commentedPatches always need to be rolled against HEAD.
This patch introduces trailing whitespace issues anyway so it would need work if you wanted to pursue this further.