diff --git a/src/Umbraco.Web.Common/Controllers/PublishedRequestFilterAttribute.cs b/src/Umbraco.Web.Common/Controllers/PublishedRequestFilterAttribute.cs index 10986d3882..9cd0a975a1 100644 --- a/src/Umbraco.Web.Common/Controllers/PublishedRequestFilterAttribute.cs +++ b/src/Umbraco.Web.Common/Controllers/PublishedRequestFilterAttribute.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Filters; using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Web.Common.ActionsResults; using Umbraco.Cms.Web.Common.Routing; namespace Umbraco.Cms.Web.Common.Controllers; @@ -15,9 +16,11 @@ internal class PublishedRequestFilterAttribute : ResultFilterAttribute /// public override void OnResultExecuting(ResultExecutingContext context) { - if (context.Result is not null) + if (context.Result is MaintenanceResult) { - // If the result is already set, we just skip the execution + // If the result is already set to a maintenance result we can't do anything + // Since the umbraco pipeline has not run. + // Fortunately we don't need to either. return; }