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.
When adding state handlers with more complex return structures (nested arrays), you'll get the error "Array to string conversion in conditional_fields_form_after_build() line 535.".
This is not (really) the fault of Conditional fields: array_intersect_assoc()
simply can't handle multi-dimensional arrays correctly. See http://stackoverflow.com/q/4627076 for further reference.
Comment | File | Size | Author |
---|---|---|---|
#2 | intersect_multidimensional_arrays-2682015-2.patch | 1.55 KB | stBorchert |
|
Comments
Comment #2
stBorchertAdding custom function to intersect multi-dimensional arrays.
Comment #3
Arlina CreditAttribution: Arlina as a volunteer and at Chapter Three commentedTested #2, and it works with 7.x-3.0-alpha2.
Comment #4
madelyncruz CreditAttribution: madelyncruz commentedPatch #2 works with 7.x-3.x-dev
Comment #5
biarr CreditAttribution: biarr as a volunteer commentedPatch #2 fixed the problem.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous at Sprintive commentedPatch #2 works for me
thanks.
Comment #7
Steve@ASU CreditAttribution: Steve@ASU commentedHas this patch been put into a release?
Comment #8
sano CreditAttribution: sano commented@Steve@ASU the answer is no. But the patch solves the issue.
Comment #9
Chris Charlton+1 patch.
Comment #10
delacosta456 CreditAttribution: delacosta456 commentedhi
Many thanks patch worked for me too on D7(current day)+Panopply Distro+php7.1
Comment #11
dqdWill review and test ...
Comment #12
dqdWorks with latest 7.x dev
Comment #14
dqdThanks for all the reports, efforts, and hard work in here. +1 Committed to latest dev. Hope it still helps someone out there but please consider EOL for Drupal 7 soon.