Continuation of patch#2903853 to write subscribed to DB.

When using the unsubscribed or cleaned addresses webhook, the subscribed status isnt updated in the DB.

For example, an email bounces from Mailchimp, its added to the cleaned Addresses list on Mailchimp. The webhook sends the info back to Drupal which 'unticks' the subscribed box on the user profile. When viewing their profile you can see its unticked, however the DB is not updated to reflect it is not subscribed (value from 1 to 0).

If the user account is re-saved it is updated, but with thousands of users and subscribers the site managers cannot be resaving all accounts to have accurate data from the database.

Comments

Jtotheeannie created an issue. See original summary.

samuel.mortenson’s picture

Assigned: Unassigned » samuel.mortenson
arnaudvz’s picture

Status: Active » Needs review
StatusFileSize
new4.51 KB

I've made a patch for handling the subscription, unsubscription and cleaned webhooks.
However the profile webhook still is a TODO.

arnaudvz’s picture

StatusFileSize
new4.5 KB

Patch for the latest stable release including the patch from #2981877: Do mailchimp list subscription processing in postSave. Please ignore.

gcb’s picture

Component: Lists » API
Assigned: samuel.mortenson » wxactly
casey’s picture

StatusFileSize
new4.53 KB

Reroll of #4

gcb’s picture

Assigned: wxactly » gcb
dmitriy.trt’s picture

Version: 8.x-1.x-dev » 2.x-dev
StatusFileSize
new4.52 KB

Just a reroll of #6 on 2.x. It's applicable to 2.2.0 as well.

en-cc-org’s picture

Hello, thanks for the patch (using #8), it had been working fine with mailchimp 2.2.2 (core 10.2.2)
But, patch failed to re-apply when upgrading to 2.2.3 (and core to 10.2.7 if that makes any difference).
Other, unrelated patches re-applied OK. Wondering if it needs a re-roll?
Thanks

sagar ramgade’s picture

StatusFileSize
new4.67 KB

Here's a patch that is re-roll of #8 on 2.24.

en-cc-org’s picture

Thank you! Patch#10 is working well with v2.2.4

Will this patch be included in an upcoming v3 (Drupal 11 compatible) version?

siemen_hermans’s picture

StatusFileSize
new4.67 KB

Patch for version 3.1.3