Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#21 | ife-parents-missing-2341875-21-D7.patch | 365 bytes | andrefy |
#17 | ife-parents-missing-2341875-17-D7.patch | 467 bytes | omarlopesino |
Comments
Comment #1
mcrittenden CreditAttribution: mcrittenden commentedAttached patch is against 2.0-alpha2. Will probably have to be re-rolled for latest dev.
Comment #2
ram4nd CreditAttribution: ram4nd as a volunteer commentedComment #3
qzmenkodelete.
Comment #4
qzmenkoComment #5
qzmenkoThis 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.
Comment #7
ram4nd CreditAttribution: ram4nd as a volunteer commentedComment #9
simemcrittenden'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.
Comment #10
simeSetting to critical, since I can't reopen the ticket. This broke ife.
Comment #11
ram4nd CreditAttribution: ram4nd as a volunteer commentedComment #12
omarlopesinoAttach a reroll, please review!
Comment #13
omarlopesinoSorry! That reroll was wrong, uploading correct.
Comment #15
ram4nd CreditAttribution: ram4nd as a volunteer commentedComment #17
omarlopesinoThat 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.
Comment #18
ram4nd CreditAttribution: ram4nd as a volunteer commentedYour patch doesn't run against latest dev branch.
Comment #19
andrefy CreditAttribution: andrefy as a volunteer and commentedThis 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
Comment #20
ShaneOnABike CreditAttribution: ShaneOnABike commentedI can confirm that changing the code to isset returns this module back to functionality. The empty flagged introduced completely broke things.
Comment #21
andrefy CreditAttribution: andrefy as a volunteer and commentedThis is an update of path #17 for the latest version of 7.x-2.x-dev
Comment #22
andrefy CreditAttribution: andrefy as a volunteer and commentedComment #23
mtem27 CreditAttribution: mtem27 commentedPatch from #21 works for me in 7.x-2.x-dev version.
Comment #24
TVoesenek CreditAttribution: TVoesenek commentedI 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).
Comment #26
ram4nd CreditAttribution: ram4nd as a volunteer commented