Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Both of these are related but happen on an anonymous user:
Notice: Undefined index: GROUPINGS in _mailchimp_lists_subscription_has_changed() (line 343 of ./modules/mailchimp_lists/mailchimp_lists.module).
Warning: Invalid argument supplied for foreach() in _mailchimp_lists_subscription_has_changed() (line 343 of ./modules/mailchimp_lists/mailchimp_lists.module).
May be related to #2477191: _mailchimp_lists_subscription_has_changed triggers exception from EntityMetadataWrapper when a value is added to an empty field
Proposed resolution
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#3 | warning-2482197-1.patch | 2.16 KB | cubeinspire |
#2 | warning_invalid-2478997-2.patch | 904 bytes | joelpittet |
Comments
Comment #1
joelpittetComment #2
joelpittetThis patch isn't a fix(but it kinda does fix it). It's a helper to find out what is in member_info that is what groupings should be.
Comment #3
cubeinspire CreditAttribution: cubeinspire commentedThe error happen when a webhook comes from Mailchimp without a GROUPINGS value on the array. The code doesn't take that case in consideration so I solved the issue by adding a condition if isset before the foreach.
Here is the patch.
Comment #4
joelpittetThis is the whitespace ignored version of #3
Comment #5
joelpittetI think this may have been committed already in another patch because it didn't apply to 3.4
Comment #6
jami CreditAttribution: jami at ThinkShout for Mailchimp commentedPatch was applied in commit:
http://cgit.drupalcode.org/mailchimp/commit/?id=937e193
Thank you for the fix!