Closed asyasky closed 5 years ago
I reproed this while getting all submissions by a team, as an author.
I'm still seeing this error, e.g., when I visit https://puzzlehunt.azurewebsites.net/ph20beta/author/Submissions/AuthorIndex?teamId=91
No surprise there considering the PR (#357) never got merged or deployed. Working on other PH20 things at present.
System.InvalidOperationException: Error generated for warning 'Microsoft.EntityFrameworkCore.Infrastructure.DetachedLazyLoadingWarning: An attempt was made to lazy-load navigation property 'Submitter' on detached entity of type 'SubmissionProxy'. Lazy-loading is not supported for detached entities or entities that are loaded with 'AsNoTracking()'.'. This exception can be suppressed or logged by passing event ID 'CoreEventId.DetachedLazyLoadingWarning' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'. at Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionb__0(Object container)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer.get_Model()
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.TemplateBuilder..ctor(IViewEngine viewEngine, IViewBufferScope bufferScope, ViewContext viewContext, ViewDataDictionary viewData, ModelExplorer modelExplorer, String htmlFieldName, String templateName, Boolean readOnly, Object additionalViewData)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.GenerateDisplay(ModelExplorer modelExplorer, String htmlFieldName, String templateName, Object additionalViewData)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper
2.Log[TLoggerCategory](IDiagnosticsLogger
1 logger, WarningBehavior warningBehavior, TParam1 arg1, TParam2 arg2, Exception exception) at Microsoft.EntityFrameworkCore.Internal.CoreLoggerExtensions.DetachedLazyLoadingWarning(IDiagnosticsLogger1 diagnostics, DbContext context, Object entityType, String navigationName) at Microsoft.EntityFrameworkCore.Internal.LazyLoader.ShouldLoad(Object entity, String navigationName, NavigationEntry& navigationEntry) at Microsoft.EntityFrameworkCore.Internal.LazyLoader.Load(Object entity, String navigationName) at Microsoft.EntityFrameworkCore.Proxies.Internal.LazyLoadingInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.SubmissionProxy.get_Submitter() at lambda_method(Closure , AuthorIndexModel ) at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ExpressionMetadataProvider.<>c__DisplayClass0_0
2.1.DisplayFor[TResult](Expression
1 expression, String templateName, String htmlFieldName, Object additionalViewData) at Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperDisplayExtensions.DisplayFor[TModel,TResult](IHtmlHelper1 htmlHelper, Expression
1 expression) at ServerCore.Pages.Submissions.Pages_Submissions_AuthorIndex.ExecuteAsync() in C:\Users\jenetlan\Documents\Puzzles\Tech\mainpuzzleserver\ServerCore\Pages\Submissions\AuthorIndex.cshtml:line 69 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.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsync[TFilter,TFilterAsync]() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync() at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)