diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs
index ddf6d9b618..0587d13dcd 100644
--- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs
+++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs
@@ -101,6 +101,12 @@ namespace Umbraco.Web.Mvc
requestContext.RouteData.DataTokens.Add("umbraco-context", UmbracoContext); //required for UmbracoTemplatePage
}
+ private void UpdateRouteDataForRequest(RenderModel renderModel, RequestContext requestContext)
+ {
+ requestContext.RouteData.DataTokens["umbraco"] = renderModel;
+ // the rest should not change -- it's only the published content that has changed
+ }
+
///
/// Checks the request and query strings to see if it matches the definition of having a Surface controller
/// posted value, if so, then we return a PostedDataProxyInfo object with the correct information.
@@ -358,7 +364,11 @@ namespace Umbraco.Web.Mvc
return handler;
// else we are running Mvc
- // update the route definition
+ // update the route data - because the PublishedContent has changed
+ UpdateRouteDataForRequest(
+ new RenderModel(publishedContentRequest.PublishedContent, publishedContentRequest.Culture),
+ requestContext);
+ // update the route definition
routeDef = GetUmbracoRouteDefinition(requestContext, publishedContentRequest);
}
diff --git a/src/Umbraco.Web/Routing/PublishedContentRequest.cs b/src/Umbraco.Web/Routing/PublishedContentRequest.cs
index 73e004faae..4eae420fed 100644
--- a/src/Umbraco.Web/Routing/PublishedContentRequest.cs
+++ b/src/Umbraco.Web/Routing/PublishedContentRequest.cs
@@ -66,7 +66,10 @@ namespace Umbraco.Web.Routing
///
internal void UpdateOnMissingTemplate()
{
+ var __readonly = _readonly;
+ _readonly = false;
_engine.UpdateRequestOnMissingTemplate();
+ _readonly = __readonly;
}
///