Flexible groups are not properly updated after field_group_posts_enabled was introduced

Created on 15 March 2023, over 1 year ago
Updated 25 April 2023, about 1 year ago

Problem/Motivation

Before field_group_posts_enabled was introduced, all users were able to post by default, as this was a hardcoded functionality. If the flexible group was created before field_group_posts_enabled existed, this value is not defined in the database. If field_group_posts_enabled is not defined (not in the database) and the group is edited without any changes, the default value is not set and this results in the group being updated with field_group_posts_enabled disabled (value 0).

An issue: field_group_posts_enabled in old flexible groups does not reflect the fields default value.
Expected result: after update, field_group_posts_enabled in old flexible groups should be updated to reflect the fields default value.

Steps to reproduce

- Install Open Social 11.2.0-alpha2 or lower
- Create flexible groups
- You can see that members are by default allowed to post on activity stream
- Update Open Social to 11.2.0-alpha3
- Edit previously created flexible group
- Do not change anything and you will see that field "Enable posts for members" is disabled (but it should be enabled).
- Save the group and now you will see that members are by not allowed to post on activity stream anymore

Proposed resolution

We need to define the field_group_posts_enabled value for each flexible group where it is not defined. The field_group_posts_enabled value is defined based on the field_group_posts_enabled default value.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Fixed

Version

11.7

Component

Code (back-end)

Created by

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

Comments & Activities

Production build 0.69.0 2024