-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Which Umbraco version are you using?
17 RC2
Bug summary
When a form is placed inside a Block (single block, not Block Grid) that is rendered inside an RTE, submitting the form in RC2 causes the block to render stale output.
The Razor view inside the block does not re-execute.
This results in:
@DateTime.Now not updating
ViewData values from the POST not appearing
The block output being reused from cache
This behavior worked correctly in RC1.
Specifics
No response
Steps to reproduce
Steps to Reproduce
- Add a single block to an RTE.
- In that block, render a form using a SurfaceController:
View inside block:
@model TestSearchViewModel
@using (Html.BeginUmbracoForm<ProductFinderFromController>(nameof(ProductFinderFromController.Submit)))
{
<text>first load at: @DateTime.Now</text>
<button type="submit">Hit me!</button>
}
@if (ViewData["CurrentTime"] is string t)
{
<div>Submitted at: @t</div>
}
Controller:
[HttpPost]
public IActionResult Submit(TestSearchViewModel model)
{
ViewData["CurrentTime"] = DateTime.Now.ToString("HH:mm:ss");
return CurrentUmbracoPage();
}
-
Load the page → time renders correctly.
-
Click the button → POST executes.
-
Page re-renders, but the block output is frozen.
Expected result / actual result
Expected Behavior
-
The Razor block should re-render after the POST.
-
@DateTime.Now should show a new timestamp.
-
ViewData["CurrentTime"] should show the submitted time.
-
Block output should not be cached across form submissions.
Actual Behavior (RC2)
-
The block inside the RTE does not re-render.
-
@DateTime.Now remains the original value.
-
ViewData["CurrentTime"] never appears or updates.
The block appears frozen or cached.