Geta / SEO.Sitemaps

Search engine sitemaps.xml for EPiServer CMS
Apache License 2.0
28 stars 42 forks source link

Episerver CMS 11.2.1 Yellowscreen - While loading .NET types from "Geta.SEO.Sitemaps" the following error(s) was reported ... #70

Closed DrewNull closed 6 years ago

DrewNull commented 6 years ago

In case this hadn't been reported before...

Steps to reproduce:

  1. Create a new Alloy site (Episerver 11.2.1)
  2. Install Geta.SEO.Sitemaps from NuGet
  3. Ctrl+F5
  4. Yellowscreen

Stack trace:

[InitializationException: While loading .NET types from "Geta.SEO.Sitemaps" the following error(s) was reported:

     - System.TypeLoadException: Could not load type 'EPiServer.Web.TemplateResolver' from assembly 'EPiServer, Version=11.2.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.
     - System.TypeLoadException: Could not load type 'EPiServer.SimplePage' from assembly 'EPiServer, Version=11.2.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.
     - System.TypeLoadException: Could not load type 'EPiServer.Web.PropertyControls.PropertyStringControl' from assembly 'EPiServer, Version=11.2.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.

]
   EPiServer.Framework.Initialization.Internal.InitializationExceptionHelper.ThrowFriendlyTypeScannerException(IEnumerable`1 reflectionExceptions, IEnumerable`1 addonsWithErrors) +95
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +794
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +170
   EPiServer.Global..ctor() +76
   EpiserverSite1.EPiServerApplication..ctor() +29
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\cb7165fa\e7a29493\App_global.asax.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +119
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +247
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1127
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +124
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +20
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +260
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10042604
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
bbsdddougla commented 6 years ago

@DrewNull I was able to build the most recent code, uninstall the nuget packages, and add the dlls manually. https://github.com/Geta/SEO.Sitemaps/commit/bddff176af2a9503e625f1d44bd78b73ac3f6217

The current nuget package should, perhaps, be changed to limit it to EPiServer.CMS.UI ( < 11.0.0 )? I'm just assuming the types relevant to drawing the control went away in CMS 11.

I got a text editor with xml for the property control in the property editor, but everything appears to still work. If editing xml isn't too onerous, then you could upgrade and use the dll's. https://github.com/Geta/SEO.Sitemaps/blob/master/src/Geta.SEO.Sitemaps/SpecializedProperties/PropertySEOSitemapsControl.cs

Is there a "property set" or some other way to add the content settings as a group? Perhaps a block as a property? Perhaps too heavyweight or too many content implications? https://world.episerver.com/documentation/developer-guides/CMS/Content/Properties/using-a-block-as-a-property/

Is there a way to migrate content properties like in Commerce?

Perhaps @frederikvig already has a plan.

frederikvig commented 6 years ago

Fixed in version 2.0.2. The property is still very much legacy, but it works now in Episerver 11. I agree that local block would be best here, but this was created long before blocks were introduced, and we need to be backwards compatible. There's definitely room for improvement.

ruifrvaz commented 6 years ago

Hi @DrewNull , Do you still need support for this issue? Regards, Rui Vaz

ruifrvaz commented 6 years ago

Hi @bbsdddougla , Not sure how many Drew's are there :) Was asking the OP of this issue. In any case, I will close this issue. If the problem arises please open an new one. Best Regards, Rui Vaz