Can't set default value if in profile

Created on 2 March 2023, over 2 years ago
Updated 3 March 2023, over 2 years ago

Problem/Motivation

We'd like to default the "subscribe" checkbox to being 'checked' (an opt-out approach). This works when the checkbox is on the user settings form / registration form, but when used on a "profile" the checkbox is being overridden by the current state of a user on the list. If a new registrant in the site is not already subscribed to the Mailchimp list, the box is unchecked on their initial profile configuration.

Because the email address mergevar is attached to an entity that already exists (the profile "owner", even though the profile doesn't exist yet), the user is referenced and their current subscription status overrides the desired default.

Steps to reproduce

Add a mailchimp subscription checkbox, defaulted to "checked" on a user profile, but use the profile owner's email address as the email mergevar. A new user who is not currently subscribed to the list will not have the box checked by default.

Important Note: I've attached two related issues that provide some context. Initially when trying to set the user's email as the mergevar but keep the checkbox on a profile page, I got the fatal error noted in ๐Ÿ› PHP message: Uncaught PHP Exception InvalidArgumentException: Field uid:entity:mail is unknown Closed: duplicate , so I applied the patch from ๐Ÿ› mailchimp_lists_load_email fails to find email address field when attached to a related entity. Needs work . It could be that that patch is introducing this problem and that may be a better place to deal with it.

๐Ÿ› Bug report
Status

Active

Version

2.0

Component

Lists Module

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States matthensley Portland, OR

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @matthensley
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States matthensley Portland, OR
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States xenophyle

    Thanks for submitting this ticket โ€” and sorry we didnโ€™t get back to you about it sooner. We are cleaning up old issues and issue for old versions and are going to close this one. If this issue is still relevant for you, please re-open it and update the โ€œVersionโ€ field, and include any updates to the behavior you are seeing.With a smaller issue queue, weโ€™ll have an easier time getting back to you.

Production build 0.71.5 2024