Skip to content

Remove hook_field_widget_form_alter()

Nejc Koporec requested to merge issue/social_course-3360766:bug/3360766 into 4.1.x

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.

Merge request reports

Loading