Unable to remove pre-existing merge values and replace with empty values

Created on 28 September 2018, almost 7 years ago
Updated 10 July 2025, 16 days ago

Problem/Motivation

In mailchimp.module > mailchimp_mergevars_populate, there is the following code ...

      if (!empty($mergevar_value)) {
        $mergevars[$bundle . ':' . $id][$key] = $mergevar_value;
      }

I get why that was envisioned as advantageous, but if one needs to clear a value that was previously set, it prevents the ability to do that.

I think we could get rid of that empty check altogether, but if that is really required for a reason that isn't clear to me yet, then perhaps it would be better to do something similar in _mailchimp_lists_subscription_has_changed?

Proposed resolution

Remove the check so that existing values can be removed.

Remaining tasks

Polish up the patch, test, review, etc.

User interface changes

NONE

API changes

NONE

Data model changes

NONE

🐛 Bug report
Status

Closed: won't fix

Version

5.0

Component

General

Created by

🇺🇸United States matt_paz

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸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