Needs review
Project:
Mailchimp
Version:
8.x-1.x-dev
Component:
API
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 Feb 2018 at 16:36 UTC
Updated:
7 May 2026 at 09:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
zerolab commentedRelated #2790041: mailchimp_get_memberinfo logs 404 errors when not really an error -- which only hides the warning.
But this needs proper handling
Comment #3
jafacakes2011 commentedI have been looking into how it now acts given #2790041 is merged
Steps:
1. Subscribe to a list in Drupal
2. See that the checkbox is now checked
3. In MailChimp, unsubscribe my email from the same list
4. Look at the checkbox in Drupal and see it is still checked
5. Clear cache
6. The checkbox is now unchecked
It appears that the issue is with the caching of `mailchimp.module::mailchimp_get_memberinfo()`
I have attached a patch that will resolve this issue but opens further discussion into if we should be caching this or not.
Comment #4
jafacakes2011 commentedAfter thinking about this I have decided to add the ability to decide how long you want memberinfo cached. This way existing users won't see a change in functionality, but those having issues can select the expiry time from a dropdown in the MailChimp settings form.
Comment #5
jafacakes2011 commentedComment #6
jafacakes2011 commentedUploaded the wrong patch, apologies.
Comment #7
jafacakes2011 commentedFixed an issue when $memberinfo_expire is NULL (see next patch)
Comment #8
jafacakes2011 commentedPatch in #7 can be ignored.
Comment #9
glynnr commentedI noticed that 'memberinfo_expire' is never saved to config in the Form submit.
So I've added that and re-rolled the patch against the latest dev as it was not applying cleanly due to 'Update branding; change MailChimp to Mailchimp.'
Comment #10
zerolab commentedThe 2 previous patches were missing a
usestatement. Re-rolledComment #12
gcbComment #13
rob230 commentedRe-rolling patch #10 for mailchimp 2.0.2.
Comment #14
gcbComment #15
a.dmitriiev commentedI have the same problem and I found out that the cache for member info is invalidated by the module itself when it is needed, but this is done mostly at the time when webhook is triggered. Do you have the webhooks configured? Is it still happening even with webhooks enabled?
I am not sure that the expiration time will fix the problem, because if you select 4 weeks, for example, the wrong information will be displayed until this 4 weeks will pass.
Comment #16
rob230 commentedNo we are not using webhooks. They are configured per audience in Mailchimp yet the module only allows a single webhook hash, so I'm not sure it would help. It also wouldn't help for non-production environments which wouldn't receive the webhooks.
For now I will re-roll the patch again for 2.2.0. If you still want the member info to be cached forever then that would still be the default behaviour with this patch, it just allows changing the expiry time for those that want to periodically refresh the data.
Is there is a way to resolve this without changing the expiry?
Comment #17
r-mo commentedReroll for 3.1.3