- Issue created by @Mav_fly
- 🇲🇦Morocco b.khouy 🇲🇦 Morocco
@Mav_fly
We need more details to reproduce like the readonly HTML field has been added to which entity type form? - Status changed to Postponed: needs info
9 months ago 8:40am 8 March 2024 - 🇧🇪Belgium Mav_fly
I added the field to a profile "customer" and than I added the readonly field to an article. And in both cases I got the WSOD.
- Status changed to Needs work
9 months ago 3:19pm 8 March 2024 - 🇲🇦Morocco b.khouy 🇲🇦 Morocco
@Mav_fly thank you for details, now I can reproduce it.
Possible related issues: Using $form_state->getValue() in BlockBase's blockForm throws "subform and parent form must contain the #parents property" exception →Issue status has been changed to Needs work.
- 🇲🇦Morocco b.khouy 🇲🇦 Morocco
The problem here is that Readonly Html field type settings form build method
ReadonlyHtmlFieldItem::fieldSettingsForm
returns the complete form and this behavior has been changed recently in core parent method that returns the subform instead, so core is expecting a subform fromReadonlyHtmlFieldItem::fieldSettingsForm
method, to fix this, first we retrieve the subform from the parent and then we use the retrieved subform to build Readonly Html field type settings form.
Please try out the attached patch and confirm if it resolves the issue. Thanks! - Status changed to Needs review
9 months ago 7:10pm 8 March 2024 - 🇧🇪Belgium Mav_fly
I applied the patch, and add a Readonly Html field without getting a WSOD.
So I guess to problem is solved!!@b.khouy thanks for the fast reaction!!
- Status changed to RTBC
9 months ago 5:07pm 9 March 2024 - 🇲🇦Morocco b.khouy 🇲🇦 Morocco
@Mav_fly Thank you for testing and confirming that the patch resolved your issue!
The patch has been committed and the related merge request has been successfully merged, a new release, version 1.0.5, has been created including this fix. - Status changed to Fixed
9 months ago 5:20pm 9 March 2024