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.
I have created a view that lists by user id if the user is subscribed to a list or not.
This produces
However, when I go to aggregrate the view, grouping by status, count of user ID and sum of weekly notifications, I get the result of 0 for the sum of weekly notifications. I expect this to be 1?
Comment | File | Size | Author |
---|---|---|---|
result.PNG | 10.67 KB | Matt B | |
View.PNG | 22.04 KB | Matt B |
Comments
Comment #2
spncr CreditAttribution: spncr for Mailchimp commentedThis one took some effort to untangle!
It looks like your field
Weekly Email Notifications
is theMailchimp Subscription
field type, attached to user who have registered to your site.Unfortunately, right now views are not an accurate way to aggregate data, as they rely solely on the database data for the selected fields.
Historically, Mailchimp subscription data didn't exist at all in the database, as we made the only source of truth Mailchimp and queried their API whenever we needed that information.
More recently, we did add the data to the database, but it is pretty unreliable, because we don't store and update it consistently across the range of functions in this module.
I opened an issue for this:
https://www.drupal.org/project/mailchimp/issues/3196682
Once that is fixed, we can revisit this one, if it isn't resolved by those changes (I expect it will be)