Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The problem manifests itself as the mailchimp signup block being "unclickable" because disabled=TRUE
is set in the HTML.
When this happened, I also saw the error The subscription service is currently unavailable. Please try again later
.
Which you can see his happening here:
if (empty($lists)) {
drupal_set_message($this->t('The subscription service is currently unavailable. Please try again later.'), 'warning');
}
And could be caused some sort of bad caching in the following:
function mailchimp_get_lists($list_ids = array(), $reset = FALSE) {
$lists = array();
$cache = \Drupal::cache('mailchimp');
$cached_data = $reset ? NULL : $cache->get('lists');
// Return cached lists.
if ($cached_data) {
$lists = $cached_data->data;
}
This may have to do with us not doing a cache clear after config import.
But we are currently adding the following to our deploy process to see if it fixes:
drush eval "mailchimp_get_lists(array(), TRUE);"
One problem we have is that the error is inconsistently replicated.
We'll report back here.
Comments
Comment #2
samuel.mortenson@glass.dimly Any update about this? Doing a cache rebuild after config import is normal but I'd like to know if this is still happening because I haven't seen this before.
Comment #3
perkeHappens to me on D7 using mailchimp module 7.x-5.4, after deploying to platform.sh form in block is disabled with `disabled` attribute on input field.
I'm doing `drush cc all` at the end of deploy hook so not sure is it related to caching.
on mailchimp config page, I see "Failed connecting to the MailChimp backend with the provided API key." and am sure that key is ok.
also, there are log entries for mailchimp:
- An error occurred requesting list information from MailChimp...... and it ends with "Request Blocked. We had to block your request because of something that looked suspicious. Please reach out to support:"
this is usually followed by php notice:
Notice: Trying to get property of non-object in mailchimp_signup_subscribe_form() (line 326 of /sites/all/modules/contrib/mailchimp/modules/mailchimp_signup/mailchimp_signup.module).
Takes around 10-15 minutes to get back to normal and establish connection with mailchimp. Can also confirm that the error is inconsistent.
Comment #4
samuel.mortenson@perke Have you reached out to Mailchimp support per the log entry? I'm wondering if Platform.sh is blocked or rate limited in some way.
Comment #5
perkeNot yet, but I posted question on Platform's slack support channel just to see if it's something they've seen before. I'm guessing it has to do with something changed during deployments, like header requests/fingerprints or similar that triggers mailchimp security.
Will follow up here if I get any more info.
Comment #6
perkeJust heard from Mailchimp Support, and forwarding here in case it can help:
"... that error messaging you shared looks to be a blockage we see with our upstream service provider, Akamai. Because of their status, there's no way for us to control how they manage all the connections they do, but it looks like it's seeing some suspicious activity on or around your store domain's IP address. Hang tight while I dig into that..... it looks you are definately seeing an Akamai block for your server/store IPs when you make these connections. As I said, we can't remove these, but they do often resolve themselves given time without that offending traffic. Have we tried changing IP addresses as of yet? ... And what I mean is that your store or integration through Drupal is using a specific IP to make the connection, but that IP is looking to give Akamai some concern at the moment- changing that IP would be the next step if you didn't want to wait this error out."
so they suspect Akamai is blocking requests and thus our connection to mailchimp is broken which renders our signup form unusable for around 30ish minutes after each deployment to production.
I'm currently in contact with Platform.sh support on this and will get back here if more info is available.
Comment #7
samuel.mortensonThank you @perke! Even if there's not much for us to do here this will be great documentation for other users.
Comment #8
yvmarques CreditAttribution: yvmarques as a volunteer commented@perke do you have any information from Platform.sh regarding this, we also encounter this error.
Comment #9
tim-dielsI'm also experiencing this issue but not using Platform.sh. As stated in #6, I got the same reply from Mailchimp.
Still trying to figure out what happens and how to solve this.
Comment #10
gcbThis does not appear to be an issue with the module, but rather something specific to Mailchimp's service. As such, I'm marking this "works as designed".