After adding new custom block I get this error;
Fatal error: Unsupported operand types in /xx/modules/field/field.attach.inc on line 188

Drupal 7.21

Happened on -dev and 1.1

CommentFileSizeAuthor
#3 bean-n1957260-3.patch497 bytesdamienmckenna

Comments

iztok’s picture

So, I found that the real issue is in the patch made for Edit module (Spark initiative) to work. This patch was committed to core!

Issue in the Core project:
#1821906: Allow more Field API public API functions to act on a single field within an entity

David_Rothstein’s picture

This happens because bean_form_validate() calls this:

  field_attach_form_validate('bean', $bean, $form, $form_state, $langcode);

But there is no $langcode parameter in field_attach_form_validate().

However, the core patch certainly turned that from a harmless bug into a fatal error (since there is now a new $options parameter at the end which expects an array as input), so yes, I'll reopen the core issue to discuss.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new497 bytes

This fixes the bug in Bean.

damienmckenna’s picture

Status: Needs review » Fixed

I've committed the patch from #3.

Status: Fixed » Closed (fixed)

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