Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recurrent issue on ZoneTagHelper #3860

Closed
Skrypt opened this issue Jun 26, 2019 · 9 comments
Closed

Recurrent issue on ZoneTagHelper #3860

Skrypt opened this issue Jun 26, 2019 · 9 comments
Milestone

Comments

@Skrypt
Copy link
Contributor

Skrypt commented Jun 26, 2019

Now that I disabled the Layer module my recurrent issue has moved there. Seems like the same kind of issue where the Layout is null.

2019-06-26 15:30:27.6327|Default|8000573c-0000-f900-b63f-84710c7967bb||Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|ERROR|An unhandled exception has occurred while executing the request. Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference
   at CallSite.Target(Closure , CallSite , Object , String )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at CallSite.Target(Closure , CallSite , Object , String )
   at OrchardCore.DisplayManagement.TagHelpers.ZoneTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\TagHelpers\ZoneTagHelper.cs:line 36
   at OrchardCore.DisplayManagement.Liquid.Tags.HelperStatement.WriteToAsync(TextWriter writer, TextEncoder encoder, TemplateContext context) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement.Liquid\Tags\HelperTag.cs:line 109
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Fluid.BaseFluidTemplate`1.RenderAsync(TextWriter writer, TextEncoder encoder, TemplateContext context)
   at OrchardCore.DisplayManagement.Liquid.LiquidViewTemplate.RenderAsync(RazorPage`1 page) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement.Liquid\LiquidViewTemplate.cs:line 112
   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.ProcessAsync(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 265
   at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 119
   at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 173
   at CallSite.Target(Closure , CallSite , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at AspNetCore.Views_Item_Display.ExecuteAsync() in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore.Modules\OrchardCore.Contents\Views\Item\Display.cshtml:line 7
   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(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.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.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)    at CallSite.Target(Closure , CallSite , Object , String )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at CallSite.Target(Closure , CallSite , Object , String )
   at OrchardCore.DisplayManagement.TagHelpers.ZoneTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\TagHelpers\ZoneTagHelper.cs:line 36
   at OrchardCore.DisplayManagement.Liquid.Tags.HelperStatement.WriteToAsync(TextWriter writer, TextEncoder encoder, TemplateContext context) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement.Liquid\Tags\HelperTag.cs:line 109
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Fluid.BaseFluidTemplate`1.RenderAsync(TextWriter writer, TextEncoder encoder, TemplateContext context)
   at OrchardCore.DisplayManagement.Liquid.LiquidViewTemplate.RenderAsync(RazorPage`1 page) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement.Liquid\LiquidViewTemplate.cs:line 112
   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.ProcessAsync(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 265
   at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 119
   at OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultHtmlDisplay.cs:line 173
   at CallSite.Target(Closure , CallSite , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at AspNetCore.Views_Item_Display.ExecuteAsync() in E:\Repositories\AffairesExtra - OrchardCore\src\OrchardCore.Modules\OrchardCore.Contents\Views\Item\Display.cshtml:line 7
   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(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.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.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
@jtkech
Copy link
Member

jtkech commented Jun 26, 2019

Now that I disabled the Layer module

So maybe in some liquid views / db templates you are still using the {% zone "ZoneName" %} liquid tag that is therefore applied to an non existing zone.

@Skrypt
Copy link
Contributor Author

Skrypt commented Jun 26, 2019

The only ones remaining are :

{% zone "Header" %}
{% zone "HeadMeta" %}

Which are zones defined in the Layout.liquid template. So first guest is not the issue.

@Skrypt
Copy link
Contributor Author

Skrypt commented Jun 27, 2019

@jtkech
Copy link
Member

jtkech commented Jun 27, 2019

Not sure at all but if you have time (not urgent for me) can you try it with #3864. Hmm, and / or with #3851.

@Skrypt
Copy link
Contributor Author

Skrypt commented Jun 27, 2019

For some reason I did not get this issue logged today after removing that line from MediaApplication.cshtml that is used on frontend website. I will try to merge but this is happening only on Azure prod server and never locally.

@jtkech
Copy link
Member

jtkech commented Jun 27, 2019

Ah okay, hmm but this is the mvc layout, putting it to null or empty is just to prevent a view from being themed, i'll try to understand.

@sebastienros sebastienros added this to the rc milestone Jul 4, 2019
@Skrypt
Copy link
Contributor Author

Skrypt commented Jul 5, 2019

I need to make more tests to make sure the issue is fixed at the right place. I disabled the Layer module since last week after moving my zones to Liquid templates. I need to enable back the Layer module and see if the issue gets logged back. So far, disabling the Layer module fixed this issue.
Need after that to test #3864

@Skrypt
Copy link
Contributor Author

Skrypt commented Jul 10, 2019

@jtkech I enabled back the Layer module without using any zones or content in those zones and I can see in my logs that it started back logging the error reported here. Next step is to merge your PR and test it on Azure.

@jtkech
Copy link
Member

jtkech commented Jul 10, 2019

Okay cool, let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants