- Issue created by @grasmash
- πΊπΈUnited States grasmash
If I had to guess I'd say this broke it:
https://git.drupalcode.org/project/mailchimp/-/compare/2.2.2...2.2.3?fro...The code seems to assume that if "allow_unsubscribe" is not present and true, then there must be no subscription happening. That's not true. Subscription can be mandatory.
- Status changed to Postponed: needs info
5 months ago 9:12pm 4 June 2024 - πΊπΈUnited States mariacha1
Can you tell me a bit more about how you'd set up a subscription field to make it mandatory? What are your field settings?
As due dilligence I tried out a variation of field settings like this:
Required field: True
Enable Interest Groups: True
Hide Subscribe Checkbox for new subscribers: True
Default value: UnsetThis created a field on the registration form that had a bunch of unchecked interests and showed no "Subscribe" checkbox.
As long as I selected an interest, I was subscribed. If I didn't select any interests, I wasn't, which is the behavior I'd expect.
I also tried out using the functionality that hides all the fields and then set a default value, like this:
Required field: True
Enable Interest Groups: True
Hide Subscribe Checkbox for new subscribers: True
Hide Interest Groups: True
Default value:
- Subscribe checkbox: True (and I tested Falseo here too)
- Automatic interests: Red, GreenI thought if the "Subscribe" checkbox was unchecked in the backend, perhaps the widget would not notice that some interests were set, but that seemed to subscribe people as well.
- π¦πΉAustria drupalfan2
I have the same problem in v2.2.3 and dev version.
Mailchimp subscription does not work anymore on user registration.I wrote the following patch to solve the problem.
Feel free to optimize the patch or provide another solution.
- πΊπΈUnited States mariacha1
The patch supplied will try to subscribe (or unsubscribe) users to mailchimp not only when they make a change to their user account, but also any time the user entity (or whatever entity the field is on) is saved, including programmatically. This can lead to accidental unsubscribes.
See https://www.drupal.org/project/mailchimp/issues/2775335 β .I'm still looking for someone to provide more information about exactly what the field settings are, because although I do fully believe it's a problem, I haven't been able to reproduce it.