November Happy Hour will be moved to Thursday December 5th.

EPiServer Find Upgrade to version 8 breaks Find UI

Vote:
 

Hello

I've upgraded the EPiServer Find from v7 to v8 using Nuget packages . The find search works, however failed to load Find UI within CMS with following error - any pointers?

{"Message":"An error has occurred.","ExceptionMessage":"An error occurred when trying to create a controller of type 'ConfigController'. Make sure that the controller has a parameterless public constructor.","ExceptionType":"System.InvalidOperationException","StackTrace":" at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__0.MoveNext()","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Resolution of the dependency failed, type = \"EPiServer.Find.UI.Controllers.ConfigController\", name = \"(none)\".\r\nException occurred while: while resolving.\r\nException is: InvalidOperationException - The current type, System.Collections.Generic.IEnumerable`1[EPiServer.Shell.Search.ISearchProvider], is an interface and cannot be constructed. Are you missing a type mapping?\r\n-----------------------------------------------\r\nAt the time of the exception, the container was:\r\n\r\n Resolving EPiServer.Find.UI.Controllers.ConfigController,(none)\r\n Resolving parameter \"searchProvidersManager\" of constructor EPiServer.Find.UI.Controllers.ConfigController(EPiServer.Find.IClient searchClient, EPiServer.Find.Framework.Statistics.ISiteIdentityLoader siteIdentityLoader, EPiServer.Find.UI.IFindUIConfiguration configuration, EPiServer.Shell.Search.SearchProvidersManager searchProvidersManager)\r\n Resolving EPiServer.Shell.Search.SearchProvidersManager,(none)\r\n Resolving parameter \"searchProviders\" of constructor EPiServer.Shell.Search.SearchProvidersManager(System.Collections.Generic.IEnumerable`1[[EPiServer.Shell.Search.ISearchProvider, EPiServer.Shell, Version=7.19.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]] searchProviders, EPiServer.Data.Dynamic.DynamicDataStoreFactory storeFactory)\r\n Resolving System.Collections.Generic.IEnumerable`1[EPiServer.Shell.Search.ISearchProvider],(none)\r\n","ExceptionType":"Microsoft.Practices.Unity.ResolutionFailedException","StackTrace":" at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)\r\n at Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)\r\n at Microsoft.Practices.Unity.UnityContainerExtensions.Resolve(IUnityContainer container, Type t, ResolverOverride[] overrides)\r\n at Microsoft.Practices.Unity.WebApi.UnityDependencyResolver.SharedDependencyScope.GetService(Type serviceType)\r\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.GetInstanceOrActivator(HttpRequestMessage request, Type controllerType, Func`1& activator)\r\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"The current type, System.Collections.Generic.IEnumerable`1[EPiServer.Shell.Search.ISearchProvider], is an interface and cannot be constructed. Are you missing a type mapping?","ExceptionType":"System.InvalidOperationException","StackTrace":" at Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context)\r\n at lambda_method(Closure , IBuilderContext )\r\n at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.b__0(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey)\r\n at Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(IBuilderContext context)\r\n at lambda_method(Closure , IBuilderContext )\r\n at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.b__0(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey)\r\n at Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(IBuilderContext context)\r\n at lambda_method(Closure , IBuilderContext )\r\n at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.b__0(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)\r\n at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)\r\n at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)"}}}




#115010
Jan 07, 2015 19:04
Vote:
 

Perhaps you can try running in NuGet package console 'install-package episerver.find.cms' to install/update the Find CMS integration. 

#115014
Jan 07, 2015 23:46
Vote:
 

the latest episerver.find.cms is already installed , the actual error is

the container was:\r\n\r\n Resolving EPiServer.Find.UI.Controllers.ConfigController,(none)\r\n Resolving parameter \"searchProvidersManager\" of constructor EPiServer.Find.UI.Controllers.ConfigController(EPiServer.Find.IClient searchClient, EPiServer.Find.Framework.Statistics.ISiteIdentityLoader siteIdentityLoader, EPiServer.Find.UI.IFindUIConfiguration configuration, EPiServer.Shell.Search.SearchProvidersManager searchProvidersManager)\r\n Resolving EPiServer.Shell.Search.SearchProvidersManager,(none)\r\n Resolving parameter \"searchProviders\" of constructor EPiServer.Shell.Search.SearchProvidersManager(System.Collections.Generic.IEnumerable`1[[EPiServer.Shell.Search.ISearchProvider, EPiServer.Shell, Version=7.19.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]] searchProviders, EPiServer.Data.Dynamic.DynamicDataStoreFactory storeFactory)\r\n Resolving System.Collections.Generic.IEnumerable`1[EPiServer.Shell.Search.ISearchProvider],(none)\r

It is failing to initialize EPiServer.Shell.Search.ISearchProvider

Any thoughts?

#115037
Jan 08, 2015 12:01
Vote:
 

Very strange. Couple things to try:

- Try to reinstall via NuGet: update-package -reinstall episerver.find

- Another issue could be conflict with a particular add-on. For example, I know that Find UI has issues with Live Monitor beta. May want to look into the add-ons you have installed on the site and temporarily disable the ones you suspect could be causing the UI to fail.

#115071
Jan 08, 2015 22:30
Vote:
 

Could you post a list of installed EPiServer nuget packages (including their version numbers)?

#115137
Jan 09, 2015 16:27
Vote:
 

It looks like you are using Unity dependency injection container. UnityDependencyResolver can't find ISearchProvider instances because we are using another dependnecy injection container - StructureMap and all ISearchProvider instances are configured there.

There are several ways to solve it:
EPiServer.Find version that is going to be released next will not have this issue, so you can just wait for the next version
or in initialization phase of your application copy all instances of ISearchProvider from StructureMap to Unity (you might need to copy some other types as well)
or use StructureMap as DI container instead of Unity
or contact EPiServer support in order to get a patch.

#115138
Jan 09, 2015 17:12
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.