From 385a5345b1dcd1fbc20afb854cfeff1c36f52210 Mon Sep 17 00:00:00 2001 From: Terence Burridge Date: Wed, 20 Mar 2024 17:58:48 +0000 Subject: [PATCH] Update valid reasons not to have a template on a content node to include having a redirect field --- src/Umbraco.Web.Website/Routing/UmbracoRouteValuesFactory.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.Website/Routing/UmbracoRouteValuesFactory.cs b/src/Umbraco.Web.Website/Routing/UmbracoRouteValuesFactory.cs index d8fbca45d48e..c46bb890b147 100644 --- a/src/Umbraco.Web.Website/Routing/UmbracoRouteValuesFactory.cs +++ b/src/Umbraco.Web.Website/Routing/UmbracoRouteValuesFactory.cs @@ -128,11 +128,12 @@ private async Task CheckNoTemplateAsync( IPublishedRequest request = def.PublishedRequest; // Here we need to check if there is no hijacked route and no template assigned but there is a content item. - // If this is the case we want to return a blank page. + // If this is the case we want to return a blank page, the only exception being if the content item has a redirect field present. // We also check if templates have been disabled since if they are then we're allowed to render even though there's no template, // for example for json rendering in headless. if (request.HasPublishedContent() && !request.HasTemplate() + && !request.IsRedirect() && !_umbracoFeatures.Disabled.DisableTemplates && !hasHijackedRoute) {