As a failsafe, we should make sure $element['#parents'] exists before we access it. I was getting undefined index errors due to a field that snuck in without #parents being defined.

Patch incoming.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcrittenden’s picture

Attached patch is against 2.0-alpha2. Will probably have to be re-rolled for latest dev.

ram4nd’s picture

Status: Active » Needs review
qzmenko’s picture

delete.

qzmenko’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev
qzmenko’s picture

This problem is repeated in the dev. The patch which was posted by mcrittenden does not work with the dev version of the module. I'm attaching a patch for the dev version.

  • ram4nd committed d5ee80c on 7.x-2.x authored by qzmenko
    Issue #2341875 by qzmenko, mcrittenden: Undefined index error due to...
ram4nd’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

sime’s picture

mcrittenden's patch was applied to dev, and to quote mcrittenden: "Attached patch is against 2.0-alpha2. Will probably have to be re-rolled for latest dev."

Patch in #5 is probably what is needed.

sime’s picture

Priority: Normal » Critical

Setting to critical, since I can't reopen the ticket. This broke ife.

ram4nd’s picture

Status: Closed (fixed) » Active
omarlopesino’s picture

FileSize
467 bytes

Attach a reroll, please review!

omarlopesino’s picture

FileSize
466 bytes

Sorry! That reroll was wrong, uploading correct.

  • ram4nd committed 38b891d on 7.x-2.x authored by mistermoper
    Issue #2341875 by mistermoper, qzmenko, mcrittenden: Undefined index...
ram4nd’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

omarlopesino’s picture

FileSize
467 bytes

That patch breaks some use cases in inline form errors. The function must exit only when #parents is not set (it can be empty, and that is correct).

I can't change issue status, this issue needs review.

ram4nd’s picture

Status: Closed (fixed) » Needs work

Your patch doesn't run against latest dev branch.

andrefy’s picture

This patch is breaking is also braking for me some uses cases in inline form errors, I am working on the 7.x-2.x-dev

ShaneOnABike’s picture

I can confirm that changing the code to isset returns this module back to functionality. The empty flagged introduced completely broke things.

andrefy’s picture

This is an update of path #17 for the latest version of 7.x-2.x-dev

andrefy’s picture

Status: Needs work » Needs review
mtem27’s picture

Patch from #21 works for me in 7.x-2.x-dev version.

TVoesenek’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm te patch from #21 solves this problem on the latest 7.x-2.x dev and 7.x-2.0-alpha3 release (which now has broken functionality).

  • ram4nd committed 8db6704 on 7.x-2.x authored by andrefy
    Issue #2341875 by mistermoper, qzmenko, andrefy, mcrittenden, ram4nd:...
ram4nd’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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