When I try to configure the visibility of a multiblock, I get an error and the settings don't save.

The original block is for the front page along and the multi block is for the inside sidebar, but It won't let me save it!

I get this error Undefined index: body in block_custom_block_save() (line 537 of /var/www/vhosts/xxxxxx.net/subdomains/xxxxx/httpdocs/modules/block/block.module).

I think I may have to make this multiblock enabled, but after reading the directions, I don't understand where to put the code for that. In the PHP section of the block or what?

Comments

alphex’s picture

I'm seeing something like this also.

When I create a new instance, and place it in a region, then use page visibility settings, I get these errors.

Notice: Undefined index: body in block_custom_block_save() (line 537 of /Users/duran/Sites/drupal74/modules/block/block.module).
Notice: Undefined index: info in block_custom_block_save() (line 538 of /Users/duran/Sites/drupal74/modules/block/block.module).
Notice: Undefined index: body in block_custom_block_save() (line 539 of /Users/duran/Sites/drupal74/modules/block/block.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'info' cannot be null: UPDATE {block_custom} SET body=:db_update_placeholder_0, info=:db_update_placeholder_1, format=:db_update_placeholder_2 WHERE (bid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => [:db_update_placeholder_2] => [:db_condition_placeholder_0] => 2 ) in block_custom_block_save() (line 542 of /Users/duran/Sites/drupal74/modules/block/block.module).
andrewlevine’s picture

Status: Active » Fixed

Hey beckyjohnson and duran,

I believe I fixed this issue in the 7.x-1.x branch. Could you guys download and test the newest 7.x-1.x-dev release from http://drupal.org/project/multiblock (just make sure the date shows 2011-Aug-26 or later)?

If you guys test and find it fixes your problem, I will roll a new stable release with the fix.

Thanks,
Andrew

beckyjohnson’s picture

Sure. I'll let you know this week how it goes.

kpv’s picture

Works for me. Thanks

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bago’s picture

Status: Closed (fixed) » Active

I just tested the latest dev but it seems this patch break the module.
You don't pass anymore the $edit parameter to the view/configure hooks, so they won't work anymore for "multiblock-enabled" modules.

I've currently patched multiblock.module this way:
--------
- if ($op == 'save') {
+ if ($block_info->multi_settings == 1 || $op == 'save') {
$block = module_invoke($block_info->module, 'block_'. $op, $block_info->orig_delta, $edit);
}
---------
and it seems to work.

bago’s picture

Am I missing anything? Isn't #6 needed to make this module working with any multiblock-enabled module?
I just saw a new release and I expected this to be fixed...

lolandese’s picture

Also I could only make it work with the modification as indicated in #6.
Thanks Stefano (bago).

intrafusion’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

This has been fixed in other more recent issues