Gravatar for rdhuyvetters@reference.be

Question by Rik, Mar 27, 2017 12:56 PM

Upgrade to Coveo For Sitecore 4.0 Error in config

Hi all,

We've upgraded from Coveo for Sitecore 3 to 4 and we're getting an error:

Could not find configuration node: coveo/cloudPlatformConfiguration

I checked the configs in the 4.0 package and those in config, but I don't seem to be missing any.
The node I see is present in App_Config\Include\Coveo\Coveo.SearchProvider.config
I've used the Coveo for Sitecore 80 4.0 (1088).zip

Any help is appreciated.

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Mar 27, 2017 1:07 PM

Do you have the stack trace? This could help to pinpoint the problem.

Gravatar for rdhuyvetters@reference.be

Comment by Rik, Mar 27, 2017 1:10 PM

This is the stacktrace:

6164 14:46:40 ERROR Application error.
Exception: System.InvalidOperationException
Message: Could not find configuration node: coveo/cloudPlatformConfiguration
Source: Sitecore.Kernel
at Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert)
at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration()
at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name)
at Bekaert.Business.Resolvers.ExtranetSecurityResolver.GetItemByDisplayName(String displayName) in E:\Projects\Bekaert\Coveo\Bekaert.Business\Resolvers\ExtranetSecurityResolver.cs:line 105
at Bekaert.Business.Resolvers.ExtranetSecurityResolver.Process(HttpRequestArgs args) in E:\Projects\Bekaert\Coveo\Bekaert.Business\Resolvers\ExtranetSecurityResolver.cs:line 55
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Nexus.Web.HttpModule.(Object , EventArgs )
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Gravatar for rdhuyvetters@reference.be

Comment by Rik, Mar 28, 2017 8:02 AM

Sebastien, This is in the Coveo.SearchProvider.config:

<cloudPlatformConfiguration ref="coveo/cloudPlatformConfiguration"/>

I only have the clean config files from the install package, I assume those are based on a working environment?
Or do they need tweaking (aside from the obvious settings like url's and passwords)?

Gravatar for rdhuyvetters@reference.be

Comment by Rik, Mar 28, 2017 8:46 AM

I got Sitecore running again (kinda) by disabling the piece of code that triggered the error.

Now when I go to the coveo diagnostic page I get the error

Precondition failed: The parameter 'p_Configuration' must not be null

Parameter name: p_Configuration"

Looking on the net I found that this might be because of templates that haven't been published, so i opened the content tree and got the error

Precondition failed: The parameter 'm_CloudPlatformConfiguration' must not be null

Parameter name: m_CloudPlatformConfiguration

So I guess it's still a config issue.


1 Reply
Gravatar for sbelzile@coveo.com

Answer by Sébastien Belzile, Mar 28, 2017 12:05 PM

The cloud platform configuration is like passwords. Everybody targets a different Coveo organization and there has to be a place where to store an API Key to communicate with Coveo Cloud.

The node `<cloudPlatformConfiguration ref="coveo/cloudPlatformConfiguration"/>` is a reference node. In the Sitecore configuration, everytime you see the word `ref`, it means "insert here the node at [path]". In this case, Sitecore is trying to locate the node at `coveo/cloudPlatformConfiguration` and does not find it.

This node is generated when you first install the Coveo For Sitecore package. After you installed the package, you should have been prompted by a "post installation wizard". This wizard asks you to connect to Coveo Cloud. The node `coveo/cloudPlatformConfiguration` is generated at that time in the file `Coveo.CloudPlatformClient.Custom.config`.

Normally, if you followed the upgrade steps, you should have that node.

Gravatar for rdhuyvetters@reference.be

Comment by Rik, Mar 28, 2017 12:15 PM

Thx @Sébastien Belzile that really helps.

I followed the upgrade steps, but the upgrade crashed after the (what I thought was) the last step.
All binaries, configs and sitecore content were installed, so I figured it was ok.

So all I have to do now is start the wizard in another way, since there is no way to finish the setup (conflict in log4net dlls between Sitecore 8 and Coveo for sitecore 8 (known bug))

Any ideas how I can add the config manually?

Gravatar for rdhuyvetters@reference.be

Comment by Rik, Mar 28, 2017 12:23 PM

Yes, that's what I did the first time.

But the C4S package installs a version of log4net that is incompatible with Sitecore, so the setup fails every time.

Come to think of it, I could remove the dll from the package and try again.

hm ... stand by

Gravatar for rdhuyvetters@reference.be

Comment by Rik, Mar 28, 2017 12:30 PM

Off course you're free to doubt it ^_^, but it has been confirmed by coveo support, they provided me with a work-around (2 log4net assemblies in different folders).

Ask a question