Hidden groups & interests not populated when allowed

Created on 27 March 2020, over 5 years ago
Updated 10 July 2025, 16 days ago

When calling mailchimp_get_interest_categories(), and setting the 2nd argument exclude_hidden = TRUE, it is not populating hidden groups and interest.

Looking deeper into the code, I noticed that it is only checking the interests for hidden fields, but not the parent group. In other words, if the parent group is hidden, it skips the group and will never process the interests.

The fix is to check for the hidden field in the group as follows:

 foreach ($interests_groups->categories as $interest_category) {
    // check if we should exclude hidden categories
    if ( isset ($interest_category->type) && $interest_category->type == 'hidden' &&
         isset($exclude_hidden) && $exclude_hidden == TRUE ) {
        continue;
    }

My guess is that this may be related with several other reported bugs concerning groups and interests not appearing.

🐛 Bug report
Status

Closed: won't fix

Version

5.6

Component

General

Created by

🇺🇸United States dczaretsky

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