- Issue created by @No Sssweat
- @no-sssweat opened merge request.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 9:40am 24 January 2023 - 🇨🇦Canada No Sssweat
Added my proposed solution to MR 10. Please review, thanks!
When you try to re-arrange the Form fields of the learning path in /admin/group/types/manage/learning_path/form-display causes
TypeError: key(): Argument #1 ($array) must be of type array, null given in key() (line 462 of modules/contrib/entity_browser/src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php).
This due to the field not having the correct widget
Step 1. Go to /admin/group/types/manage/learning_path/form-display
and re-arrange the fields.
Step 2. Now try to add or edit a training, you will see the website encountered an unexpected error. Please try again later.
1. Thus, the config/install/core.entity_form_display.group.learning_path.default.yml config needs to be updated so the widget is autocomplete.
2. As #1 will only deal with new installations, we need a solution for current installations. Add a hook_update_N
code that will update the Form Display to the correct widget.
Needs review
3.0
Code
Added my proposed solution to MR 10. Please review, thanks!