While #3079700: saved_segment_id attribute should be optional when a campaign has segment options opens the path to not be forced to use 'saved_segment_id', it is still not possible to save a campaign. This is because mailchimp_campaign_save_campaign() tries to compare $recipients->segment_opts->saved_segment_id before checking if it exist first.
Patch coming up.
The (partial) error.
Notice: Undefined property: stdClass::$saved_segment_id in mailchimp_campaign_save_campaign() (line 95 of modules/contrib/mailchimp/modules/mailchimp_campaign/mailchimp_campaign.module).
mailchimp_campaign_save_campaign(Array, Object, Object, '63457', NULL) (Line: 460)
Drupal\mailchimp_campaign\Form\MailchimpCampaignForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 112)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('mailchimp_campaign_add_form', Array, Object) (Line: 320)404: Resource Not Found - The requested resource could not be found.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | mailchimp-3156283-3.patch | 972 bytes | brendanthinkshout |
Comments
Comment #2
firfin commentedComment #3
brendanthinkshout commentedTook a crack at this. @firfin, am I understanding the problem correctly?
Comment #4
brendanthinkshout commentedComment #5
firfin commentedCode seems to make sense to me. Also applied cleanly. Also similar to whatI had in mind (although this solution is better than what I thought of). No problems so far, but as I am 'edging cases' and developing new features I am still hesitant to put this on RTBC till I have tested more.
Will get back to this later this week.
Comment #6
firfin commentedTook a bit longer than a week, but this is running fine for over a month on development and live installs.
Comment #8
brendanthinkshout commented