When the $form[$field_name] isn't set for this field_attach_form() function, you receive an undefined index error. Needs to add in the sanity checking around that element in the function.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

laughnan’s picture

Patch for this issue.

laughnan’s picture

Status: Active » Needs review
DamienMcKenna’s picture

Version: 7.x-1.0-beta8 » 7.x-1.x-dev

Needs to be reviewed against the latest -dev release.

laughnan’s picture

Thanks for testing this @DamienMcKenna :)

Boobaa’s picture

I ran into this issue while tried to add field_collection support to Comment Alter, and can confirm that: 1. the patch applies cleanly to field_collection-7.x-1.0-beta8, 2. it solves the problem properly. However, I haven't tested it with the latest field_collection-7.x-1.x-dev, and that's the only thing I'm not marking this issue as RTBC – although @DamienMcKenna's testbot run was a success two months ago, so I'm pretty sure it should be still okay.

laughnan’s picture

Thanks for the note @Boobaa!

jordan8037310’s picture

Thanks for the patch, can also confirm this works on field_collection-7.x-1.0-beta8.

I downloaded the most recent field_collection-7.x-1.x-dev and also successfully applied this patch:

Hunk #1 succeeded at 1009 (offset -510 lines).

laughnan’s picture

Woohoo! Thanks for the update @jordan8037310

jordan8037310’s picture

Here is the patch for -dev release... Doesn't look like the re-queued for testing worked on previous patch.

captainack’s picture

Thanks for the patch guys.

FYI on the current dev, the patch attached only partially solves the problem. One more edit is required for the next if block. Patch coming...

captainack’s picture

Alex Bukach’s picture

Status: Needs review » Needs work

We can add a single check in the beginning of the loop.

Alex Bukach’s picture

Status: Needs work » Needs review
FileSize
648 bytes
renatog’s picture

Status: Needs review » Reviewed & tested by the community

I applied the #14 really makes sense. We are verifying if the $form[$field_name] exists (isset) in the beginning of loop. If not we can skip to the next loop

It worked well +1 to this

  • RenatoG committed 0705438 on 7.x-1.x authored by Alex Bukach
    Issue #2378587 by laughnan, captainack, jordan8037310, Alex Bukach,...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Moved to the dev branch

Thank you so much everyone for your contribution

Status: Fixed » Closed (fixed)

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