Closed arcjawsh closed 2 months ago
Thanks for the report and clear replication steps @arcjawsh. We have found and resolved the issue, which will be in the next patch release.
This is actually a situation we had handled before - rendering forms in the rich text editor - but had some logic behind a check for the rich text editor alias, which has changed in Umbraco 14. Having updated this to the new alias, I no longer see the issue.
In Umbraco 14, rendering an umbraco form in a richtext editor via a block causes an infinite render loop. Occurs with both Component.InvokeAsync and asp core tag helper. Using in Block Grid or Block List works fine.
Reproduction
Create new Umbraco 14 Starter project Add Umbraco.Forms 14.1 Add Document type with richtext property / create test page that renders richtext property Add Richtext component view for block (/Views/Partials/RichText/Components/UmbracoForm.cshtml) with code:
Add a new element with the following configuration (export doctype seems to be missing in u14):
Add block to richtext editor available blocks Make test umbraco form Add form block to richtext editor for test page Put breakpoints in block view and watch it infinitely hit
Specifics
Umbraco.Cms 14.1.1 Umbraco.Forms 14.1.0 Chrome/Brave/Edge
Notes / Quirks
Even when the richtext is not rendered (but contains the umbraco form block) and the umbraco form render component is invoked - it will still hit the breakpoints in the RTE component file. Remove the block from the RTE and everything is fine. eg.
The loop still happens and breakpoint hits in partial file (/Views/Partials/RichText/Components/UmbracoForm.cshtml), even though there is NO reference to the component.
Please let me know if I can provide any more information or code to reproduce.
This item has been added to our backlog AB#42691