episerver / EPiServer.Labs.BlockEnhancements

Block enhancements for CMS UI.
26 stars 9 forks source link

ArgumentNullException in local content analyzer on CMS 11 #87

Closed dewnyc closed 1 year ago

dewnyc commented 2 years ago

I've downloaded and installed EPiServer.Labs.BlockEnhancements 0.12.1.

We are using EPiServer.CMS.Core 11.20.11 and EPiServer.CMS.UI 11.36.4.

When I try using the Local content analyzer admin plug-in, the title gets updated with the Item count I enter in (for example "List of shared blocks that can be converted (top 2)") but the "Loading..." message remains in the sections where the statistics and list of blocks should be.

In Application Insights, the following exception properties appear for both "GET LocalContentAnalyzer/GetSharedBlocksToConvert" and "GET LocalContentAnalyzer/GetStatistics":

Property Name | Property Value -- | -- Message | Value cannot be null. Parameter name: key Exception type | System.ArgumentNullException Failed method | EPiServer.Commerce.Catalog.Provider.MetaClassToContentTypeMap.GetMetaClassName Problem Id | System.ArgumentNullException at EPiServer.Commerce.Catalog.Provider.MetaClassToContentTypeMap.GetMetaClassName Assembly | EPiServer.Business.Commerce, Version=12.13.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7

Here is an example call stack for GetSharedBlocksToConvert:

System.ArgumentNullException:
   at System.ThrowHelper.ThrowArgumentNullException (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at System.Collections.Generic.Dictionary`2.FindEntry (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at System.Collections.Generic.Dictionary`2.TryGetValue (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at EPiServer.Commerce.Catalog.Provider.MetaClassToContentTypeMap.GetMetaClassName (EPiServer.Business.Commerce, Version=12.13.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Commerce.Catalog.DataAccess.CatalogContentDB.ListContentOfContentType (EPiServer.Business.Commerce, Version=12.13.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Core.Internal.DefaultContentModelUsageService+<>c__DisplayClass5_0.<ListContentOfContentType>b__0 (EPiServer, Version=11.20.11.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Core.ContentProviderMap.Iterate (EPiServer, Version=11.20.11.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Core.Internal.DefaultContentModelUsageService.ListContentOfContentType (EPiServer, Version=11.20.11.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Labs.BlockEnhancements.LocalContentAnalyzerController.GetSharedBlocksToConvert (EPiServer.Labs.BlockEnhancements, Version=0.12.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at lambda_method (Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12 (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)

The call stack is similar for GetStatistics

barteksekula commented 1 year ago

Block enahancements are going to be obsoleted. Most of its functionality is being moved to CMS UI package. A new compatibility release will be released soon, compatible with 12.18.0