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.
If no value is supplied for a webform field that is configured to be passed to mailchimp, then the following error is returned from the mailchimp API:
Data did not match any of the schemas described in anyOf
Comment | File | Size | Author |
---|---|---|---|
#3 | 2924936-null-values-for-merge-vars-3.patch | 918 bytes | autopoietic |
#2 | 2924936-null-values-for-merge-vars-2.patch | 777 bytes | autopoietic |
Comments
Comment #2
autopoietic CreditAttribution: autopoietic at Torchbox commentedThis patch converts the mergevars to strings before subscribing, which avoids problems with null values.
I am using 8.x-5.1, but I have rolled the patch against 8.x-5.x (currently 5.3).
Comment #3
autopoietic CreditAttribution: autopoietic at Torchbox commentedMissed a line in patch
Comment #4
miro_dietikerPromoting, can lead to data loss.
Comment #5
maweba CreditAttribution: maweba commented*push*
currently using hook alter
Comment #6
baikhoComment #7
hanoiiI am not sure about fixing this with code, if you add apostrophes, it should just work:
FNAME: '[webform_submission:user:field_firstname]'
The above should provide
FNAME: ''
if null.