OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.23k stars 2.34k forks source link

Invalid route error - can't remove/edit #7490

Open MikeKry opened 3 years ago

MikeKry commented 3 years ago

When: Invalid route is filled in AutoRoutePart

Then: OrchardCore CMS fails to render Content items list with error

image

Also: It is not possible to remove invalid item, only if user remembers edit link of that content item

full exception:

Click to expand! RoutePatternException: The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value. Microsoft.AspNetCore.Routing.Patterns.RoutePatternParser.Parse(string pattern) Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Parse(string pattern, object defaults, object parameterPolicies) OrchardCore.Autoroute.Routing.AutoRouteValuesAddressScheme.FindEndpoints(RouteValuesAddress address) in AutorouteValuesAddressScheme.cs OrchardCore.Routing.ShellRouteValuesAddressScheme.FindEndpoints(RouteValuesAddress address) in ShellRouteValuesAddressScheme.cs Microsoft.AspNetCore.Routing.DefaultLinkGenerator.GetEndpoints(TAddress address) Microsoft.AspNetCore.Routing.DefaultLinkGenerator.GetPathByAddress(HttpContext httpContext, TAddress address, RouteValueDictionary values, RouteValueDictionary ambientValues, Nullable pathBase, FragmentString fragment, LinkOptions options) Microsoft.AspNetCore.Routing.LinkGeneratorRouteValuesAddressExtensions.GetPathByRouteValues(LinkGenerator generator, HttpContext httpContext, string routeName, object values, Nullable pathBase, FragmentString fragment, LinkOptions options) Microsoft.AspNetCore.Mvc.Routing.EndpointRoutingUrlHelper.Action(UrlActionContext urlActionContext) Microsoft.AspNetCore.Mvc.UrlHelperExtensions.Action(IUrlHelper helper, string action, object values) OrchardCore.Contents.TagHelpers.ContentLinkTagHelper.ProcessAsync(TagHelperContext tagHelperContext, TagHelperOutput output) in ContentLinkTagHelper.cs Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count) AspNetCore._Areas_OrchardCore_Contents_Views_ContentsButtonEdit_SummaryAdmin.ExecuteAsync() in ContentsButtonEdit_SummaryAdmin.cshtml + @T["View"] Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(string partialViewName, object model, ViewDataDictionary viewData, TextWriter writer) Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(string partialViewName, object model, ViewDataDictionary viewData) OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task task) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs CallSite.Target(Closure , CallSite , object ) OrchardCore.DisplayManagement.Zones.ZoneShapes.ColumnGrouping(object DisplayAsync, object Shape, IShapeFactory ShapeFactory) in ZoneShapes.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task task) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs CallSite.Target(Closure , CallSite , object ) OrchardCore.DisplayManagement.Zones.ZoneShapes.CardGrouping(object DisplayAsync, object Shape, IShapeFactory ShapeFactory) in ZoneShapes.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task task) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs CallSite.Target(Closure , CallSite , object ) OrchardCore.DisplayManagement.Zones.ZoneShapes.ContentZone(object DisplayAsync, object Shape, IShapeFactory ShapeFactory) in ZoneShapes.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task task) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs CallSite.Target(Closure , CallSite , object ) AspNetCore._Areas_OrchardCore_Contents_Views_Content_SummaryAdmin.ExecuteAsync() in Content.SummaryAdmin.cshtml + @await DisplayAsync(Model.Actions) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(string partialViewName, object model, ViewDataDictionary viewData, TextWriter writer) Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(string partialViewName, object model, ViewDataDictionary viewData) OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task task) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs CallSite.Target(Closure , CallSite , object ) AspNetCore._Areas_OrchardCore_Contents_Views_ContentsAdminList.ExecuteAsync() in ContentsAdminList.cshtml + @await DisplayAsync(contentItemSummary) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(string partialViewName, object model, ViewDataDictionary viewData, TextWriter writer) Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(string partialViewName, object model, ViewDataDictionary viewData) OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task task) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs AspNetCore._Areas_OrchardCore_Contents_Views_Admin_List.b__13_1() in List.cshtml + @await DisplayAsync(Model) Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(bool useCachedResult, HtmlEncoder encoder) Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output) Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count) AspNetCore._Areas_OrchardCore_Contents_Views_Admin_List.ExecuteAsync() in List.cshtml +

@RenderTitleSegments(pageTitle)

Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable statusCode) Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable statusCode) Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, string contentType, Nullable statusCode) Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result) Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|29_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|27_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context) OrchardCore.Apis.GraphQL.GraphQLMiddleware.Invoke(HttpContext context, IAuthorizationService authorizationService, IAuthenticationService authenticationService, ISchemaFactory schemaService) in GraphQLMiddleware.cs Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) OrchardCore.Diagnostics.DiagnosticsStartupFilter+<>c__DisplayClass3_0+<b__1>d.MoveNext() in DiagnosticsStartupFilter.cs Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context) OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) in ModularTenantRouterMiddleware.cs OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func execute) in ShellScope.cs OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in ModularTenantContainerMiddleware.cs Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context) Show raw exception details Microsoft.AspNetCore.Routing.Patterns.RoutePatternException: The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value. at Microsoft.AspNetCore.Routing.Patterns.RoutePatternParser.Parse(String pattern) at Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Parse(String pattern, Object defaults, Object parameterPolicies) at OrchardCore.Autoroute.Routing.AutoRouteValuesAddressScheme.FindEndpoints(RouteValuesAddress address) in C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.Autoroute\Routing\AutorouteValuesAddressScheme.cs:line 74 at OrchardCore.Routing.ShellRouteValuesAddressScheme.FindEndpoints(RouteValuesAddress address) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.Abstractions\Routing\ShellRouteValuesAddressScheme.cs:line 35 at Microsoft.AspNetCore.Routing.DefaultLinkGenerator.GetEndpoints[TAddress](TAddress address) at Microsoft.AspNetCore.Routing.DefaultLinkGenerator.GetPathByAddress[TAddress](HttpContext httpContext, TAddress address, RouteValueDictionary values, RouteValueDictionary ambientValues, Nullable`1 pathBase, FragmentString fragment, LinkOptions options) at Microsoft.AspNetCore.Routing.LinkGeneratorRouteValuesAddressExtensions.GetPathByRouteValues(LinkGenerator generator, HttpContext httpContext, String routeName, Object values, Nullable`1 pathBase, FragmentString fragment, LinkOptions options) at Microsoft.AspNetCore.Mvc.Routing.EndpointRoutingUrlHelper.Action(UrlActionContext urlActionContext) at Microsoft.AspNetCore.Mvc.UrlHelperExtensions.Action(IUrlHelper helper, String action, Object values) at OrchardCore.Contents.TagHelpers.ContentLinkTagHelper.ProcessAsync(TagHelperContext tagHelperContext, TagHelperOutput output) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.Contents.TagHelpers\ContentLinkTagHelper.cs:line 169 at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at AspNetCore._Areas_OrchardCore_Contents_Views_ContentsButtonEdit_SummaryAdmin.ExecuteAsync() in /Areas/OrchardCore.Contents/Views/ContentsButtonEdit_SummaryAdmin.cshtml:line 20 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(String partialViewName, Object model, ViewDataDictionary viewData) at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task`1 task) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 297 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 116 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 174 at CallSite.Target(Closure , CallSite , Object ) at OrchardCore.DisplayManagement.Zones.ZoneShapes.ColumnGrouping(Object DisplayAsync, Object Shape, IShapeFactory ShapeFactory) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Zones\ZoneShapes.cs:line 305 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task`1 task) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 297 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 116 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 174 at CallSite.Target(Closure , CallSite , Object ) at OrchardCore.DisplayManagement.Zones.ZoneShapes.CardGrouping(Object DisplayAsync, Object Shape, IShapeFactory ShapeFactory) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Zones\ZoneShapes.cs:line 204 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task`1 task) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 297 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 116 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 174 at CallSite.Target(Closure , CallSite , Object ) at OrchardCore.DisplayManagement.Zones.ZoneShapes.ContentZone(Object DisplayAsync, Object Shape, IShapeFactory ShapeFactory) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Zones\ZoneShapes.cs:line 116 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task`1 task) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 297 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 116 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 174 at CallSite.Target(Closure , CallSite , Object ) at AspNetCore._Areas_OrchardCore_Contents_Views_Content_SummaryAdmin.ExecuteAsync() in /Areas/OrchardCore.Contents/Views/Content.SummaryAdmin.cshtml:line 53 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(String partialViewName, Object model, ViewDataDictionary viewData) at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task`1 task) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 297 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 116 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 174 at CallSite.Target(Closure , CallSite , Object ) at AspNetCore._Areas_OrchardCore_Contents_Views_ContentsAdminList.ExecuteAsync() in /Areas/OrchardCore.Contents/Views/ContentsAdminList.cshtml:line 35 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(String partialViewName, Object model, ViewDataDictionary viewData) at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.g__Awaited|12_0(Task`1 task) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 297 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 116 at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 174 at AspNetCore._Areas_OrchardCore_Contents_Views_Admin_List.b__13_1() in /Areas/OrchardCore.Contents/Views/Admin/List.cshtml:line 16 at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(Boolean useCachedResult, HtmlEncoder encoder) at Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output) at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at AspNetCore._Areas_OrchardCore_Contents_Views_Admin_List.ExecuteAsync() in /Areas/OrchardCore.Contents/Views/Admin/List.cshtml:line 13 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result) at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|27_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context) at OrchardCore.Apis.GraphQL.GraphQLMiddleware.Invoke(HttpContext context, IAuthorizationService authorizationService, IAuthenticationService authenticationService, ISchemaFactory schemaService) in C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.Apis.GraphQL\GraphQLMiddleware.cs:line 69 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<b__1>d.MoveNext() in C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.Diagnostics\DiagnosticsStartupFilter.cs:line 47 --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context) at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 64 at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 239 at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 61 at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
deanmarcussen commented 3 years ago

Which version of Orchard Core @MikeKry ?

I fixed this here https://github.com/OrchardCMS/OrchardCore/pull/6065/files

So would be disappointed if it has returned :(

MikeKry commented 3 years ago

@deanmarcussen 1.0.0-rc2-14859 Not sure how to get nuget version from pull request, but considering date of merge, I guess your fix should be included in it.

Anyway, this happened to me multiple times in past, e.g. with activation of some feature etc.. Maybe there could be some maintenance mode in which last changes could be reverted.

Or maybe it would be possible to implement some check if next request will not cause exception and save only if its ok. (Something like transaction processing and revert if anything fails.. not applicable to this case though)

MikeKry commented 3 years ago

@deanmarcussen

Adding some more examples:

"localhost:8000/" + "/" - ok "localhost:8000/" + "something//other - error so problem is only in path after base path (localhost:8000/"

deanmarcussen commented 3 years ago

@MikeKry I can't repro the issue on the latest dev.

Errors in the path are correctly validated.

Screenshot 2020-11-03 at 20 19 04

If you can update to the latest and still repro please re open

MikeKry commented 3 years ago

It is still broken on new version, but there are two different use cases

MikeKry commented 3 years ago

@deanmarcussen

Also, i can not reopen this issue, because it is closed by You.

deanmarcussen commented 3 years ago

Ok, so we might need to validate the output of the liquid pattern.

No options here for returning an invalid path to the user, as it is calculated in the handler.

We could

deanmarcussen commented 3 years ago

Slight note, when we decide what the preference is here, we also need to add { and } to the list of InvalidCharactersForPath

sebastienros commented 3 years ago

Add validation in the driver once the pattern is evaluated.

@MikeKry to you want to try and create a PR for that?

MikeKry commented 3 years ago

@sebastienros I could give it a try, but it will take some time to study related architecture patterns, maybe some tips would be helpful.