Remove hook_field_widget_form_alter() logic

Created on 16 May 2023, about 1 year ago
Updated 24 May 2023, about 1 year ago

Problem/Motivation

There is an implementation of hook_field_widget_form_alter(), which sets the #access of status field to FALSE for all group types that are not courses.

Social course introduces its own `status` field , and this hook is used to hide the field from other types, but this is not needed at least not in the context of Open Social, because it already handles this in social_group module.

I think this is just more of a temporary solution, social_course should be refactored and not have its own 'status' field, since one is already provided by the group module, but this is a bigger change that needs further discussing.

Steps to reproduce

1. Install Open Social
2. Try to create a new flexible group, and check the Settings tab, there should be a Publish status field (checkbox)
3. Now enable social_course module and repeat step 2
4. The Publish status checkbox is gone.

Proposed resolution

Remove the entire hook.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.1

Component

Code

Created by

🇸🇮Slovenia nkoporec Slovenia

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

Comments & Activities

Production build 0.69.0 2024