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
Comments
Comment #2
zanvidmar commentedPR ready for review: https://github.com/goalgorilla/open_social/pull/3345
Comment #4
zanvidmar commentedReviewed and fixed.
Fix will land on 11.7.5 and higher.
Comment #7
tbsiqueira