SocialProfileTagSplitWidget is not being rendered if the #options is empty

Created on 16 January 2024, 5 months ago
Updated 5 March 2024, 4 months ago

Problem/Motivation

We want to programetically render a form that contains that uses the SocialProfileTagSplitWidget widget, the #options array is populated later (after rendering the initial form). The problem is that the field is not being rendered correctly as within the widget we are returning an empty array if there are no #options. I think this should not be the case and the widget should return the basic structure of the element.

Steps to reproduce

1. Create a form that uses SocialProfileTagSplitWidget

2. Try to render the form programetically but don't populate the #options of the widget.

3. Check if the widget is rendered.

Proposed resolution

Don't return an empty array if the #options are empty but rather return the already build element array.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

12.0

Component

Code (back-end)

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