Skip to content

[FIX] #47986 UI: update Text and Textarea default value#11714

Open
thibsy wants to merge 1 commit into
ILIAS-eLearning:release_11from
srsolutionsag:fix/11/ui-text-inputs-with-null
Open

[FIX] #47986 UI: update Text and Textarea default value#11714
thibsy wants to merge 1 commit into
ILIAS-eLearning:release_11from
srsolutionsag:fix/11/ui-text-inputs-with-null

Conversation

@thibsy

@thibsy thibsy commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Hi all,

These UI\Component\Input\Field components cannot handle null as default value. Their constraint for requirement and default operations rely on working with a string. Hence the default value is changed to an empty string ("").

This fixes https://mantis.ilias.de/view.php?id=47986.

Kind regards,
@thibsy

@thibsy thibsy added bugfix kitchen sink php Pull requests that update Php code Looking for Shepherd labels Jun 30, 2026
These `UI\Component\Input\Field` components cannot handle `null`
as default value. Their constraint for requirement and default
operations rely on working with a string. Hence the default value
is changed to an empty string (`""`).

* Fix https://mantis.ilias.de/view.php?id=47986
@thibsy thibsy force-pushed the fix/11/ui-text-inputs-with-null branch from cc90f6e to bf3a1cc Compare June 30, 2026 12:26
@thibsy

thibsy commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

It would be nice if someone were to shepherd this (review only, I will integrate myself) and verify this change on some of ILIAS' complex forms that are implemented with the UI framework.

@fwolf-ilias fwolf-ilias self-requested a review June 30, 2026 13:16
@fwolf-ilias

Copy link
Copy Markdown
Contributor

I did not find any errors on forms with this fix.

But there is a behavioral change. First i feared the handling of value=null changed, which could lead to forms expecting null but getting an empty string now. But after digging deeper I discovered that using null as value was not allowed prior to commit f42c5fe, which broke the forms presumably. So I don't think this new behavior converting null to an empty string breaks anything.

I would approve this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants