Unhandled exception just by enabling "Redirects module"
Closed this issue · 5 comments
I have just downloaded Etch.OrchardCore.SEO and just by enabling the module for handling 301 redirects I receive the following error:
The Raw exception details in text format:
System.MissingMethodException: Method not found: 'YesSql.IQueryIndex`1<!!0> YesSql.QueryExtensions.QueryIndex(YesSql.ISession, System.Linq.Expressions.Expression`1<System.Func`2<!!0,Boolean>>)'.
at Etch.OrchardCore.SEO.Redirects.Startup.Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
at OrchardCore.Modules.ModularTenantRouterMiddleware.<>c__DisplayClass7_0.<ConfigureTenantPipeline>b__1(IEndpointRouteBuilder routes) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 123
at Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action`1 configure)
at OrchardCore.Modules.ModularTenantRouterMiddleware.ConfigureTenantPipeline(IApplicationBuilder appBuilder) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 128
at OrchardCore.Modules.ModularTenantRouterMiddleware.<BuildTenantPipeline>b__6_0(IApplicationBuilder builder) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 99
at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<Configure>b__0(IApplicationBuilder app) in C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.Diagnostics\DiagnosticsStartupFilter.cs:line 50
at OrchardCore.ContentPreview.PreviewStartupFilter.<>c__DisplayClass1_0.<Configure>b__0(IApplicationBuilder app) in C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.ContentPreview\PreviewStartupFilter.cs:line 54
at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
at OrchardCore.Modules.ModularTenantRouterMiddleware.BuildTenantPipeline() in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 108
at OrchardCore.Modules.ModularTenantRouterMiddleware.InitializePipelineAsync(ShellContext shellContext) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 77
at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 63
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 235
at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 59
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Luckily I had a YesSql.db and ContentDefinition.json backups, because there was no way of recovering from this state since the /admin pages did not work at all.
We are using OC 1.0.0-rc2-14477 and Etch.OrchardCore.SEO 0.6.1-rc2 (retrieved from Nuget),
Any ideas/prerequisites/fixes?
We have updated our OC installation to 1.0.0-rc2-14802 (most recent up today) and the problem still persists.
There must have been some breaking changes in OC since the last version they hosted in Nuget, which was 1.0.0-rc2-14802. This is the one you were targeting according your reference but there are more recent ones:
Now they're hosting their daily builds in CloudSmith:
https://cloudsmith.io/~orchardcore/repos/preview/packages/detail/nuget/OrchardCore.Application.Cms.Targets/
You can configure VS to downloads these packages using the url:
https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json
The commit Upgrade to RC2 on 15th June by @peterkeating might need an update.
Any help would be appreciated.
@jagbarcelo All our modules target the latest version released to NuGet (1.0.0-rc2-13450). It's unmanageable and risky to target daily builds.
I completely agree with you. However, there was flaw in 1.0.0-rc2-13450 for our particular scenario that was solved in one of those daily builds, so we were forced to move into them. We are waiting for the next rc3 or final version 1.0 so that we could get out of this risky field (as you say) that we are now.
Anyway, consider this just a heads up for what might be an issue in the future.
Regards.
Appreciate the heads up and we will definitely get it resolved when the next stable version is released. Going to leave this issue open to ensure it doesn't get missed.
@jagbarcelo In preparation for the pending 1.0.0 release, I've pushed up a dev
branch that targets 1.0.0-rc2-16368
that should hopefully resolve the issue you were having. Feel free to re-open the issue if the issue still occurs.