Closed (fixed)
Project:
Mailchimp
Version:
7.x-4.x-dev
Component:
Lists
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2016 at 13:58 UTC
Updated:
9 May 2016 at 22:14 UTC
Jump to comment: Most recent
Notice: Undefined index: merge_vars in _mailchimp_lists_field_instance_settings_form_process() (line 226 of /var/www/mysite.com/sites/all/modules/contrib/mailchimp/modules/mailchimp_lists/includes/mailchimp_lists.field.inc).
Warning: Invalid argument supplied for foreach() in _mailchimp_lists_field_instance_settings_form_process() (line 226 of /var/www/mysite.com/sites/all/modules/contrib/mailchimp/modules/mailchimp_lists/includes/mailchimp_lists.field.inc).
Looking at the .field.inc file, and inspecting this section, starting with line 226:
foreach ($mergevars[$mc_list_id]['merge_vars'] as $mergevar) {
$form[$mergevar->tag] += array(
'#element_validate' => array('token_element_validate'),
'#token_types' => array($instance['entity_type']),
);
it seems that this should actually read
foreach ($mergevars[$mc_list_id] as $mergevar) {
$form[$mergevar->tag] += array(
'#element_validate' => array('token_element_validate'),
'#token_types' => array($instance['entity_type']),
);
as the array $mergevars[$mc_list_id] doesn't have a 'merge_vars' key, but is a simple array of settings for each merge field.
Comments
Comment #2
amytswan commentedComment #3
ruscoe commentedComment #5
ruscoe commentedThanks for finding that. Fixed in 7.x-4.2.