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.

CommentFileSizeAuthor
#2 block.module.patch952 byteselectricmonk
block.module.patch958 byteselectricmonk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, block.module.patch, failed testing.

electricmonk’s picture

FileSize
952 bytes
electricmonk’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, block.module.patch, failed testing.

electricmonk’s picture

Status: Needs work » Needs review

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

thedavidmeister’s picture

Version: 6.16 » 6.x-dev
Status: Needs review » Needs work

Someone should fix the 6.x branch first, then this patch will pass tests.

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

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.