In this section will share a personal experience on the same subject I talked about in the first two parts, in which when we applied the code that explained before the anonymous records still appear under experience profile report, so what we did wrong?!
In one of our sites where we have a CM/CD setup and after deploying and configuring the identify and merge contacts code we still have an issue with experience profile not displaying a useful information, so, we reviewed the code add as much as logging code as possible one each single step and then we checked the log files, the code is executed as expected without any single error?!!! :)
After a second look to log files we found the following error happening when the session end:
This error is happening on CD servers, After doing some investigation and online search and wit existing with a great sharing community I found that it seems (but not sure) that there is a missing step when configuring WFFM on CD server to tell the WFFM to use web database instead of master database as this will not exist on configurations of CD servers,
So, we added the following configuration patch file:
After this the code to start to work as expected, experience profile started to display an identified contacts.
Hope this will help.
In one of our sites where we have a CM/CD setup and after deploying and configuring the identify and merge contacts code we still have an issue with experience profile not displaying a useful information, so, we reviewed the code add as much as logging code as possible one each single step and then we checked the log files, the code is executed as expected without any single error?!!! :)
After a second look to log files we found the following error happening when the session end:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2256 04:47:20 ERROR SessionEndPipeline failed. | |
Exception: System.Reflection.TargetInvocationException | |
Message: Exception has been thrown by the target of an invocation. | |
Source: mscorlib | |
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) | |
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) | |
at Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters) | |
at Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) | |
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.GetConstructorParameters(XmlNode configNode, String[] parameters, Boolean assert) | |
at Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) | |
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.WFFM.Abstractions.Dependencies.DependenciesManager.CorrectCreateObject[T](String configPath, Boolean assert) | |
at Sitecore.WFFM.Abstractions.Dependencies.DependenciesManager.get_AnalyticsTracker() | |
at Sitecore.Form.Core.Pipeline.SessionEnd.RegisterFormDropouts.Process(SessionEndArgs endArgs) | |
at (Object , Object[] ) | |
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) | |
at Sitecore.Pipelines.EndSession.SessionEndPipeline.Run(SessionEndArgs sessionEndArgs) | |
at Sitecore.Web.Application.RaiseSessionEndEvent(HttpApplication context) | |
Nested Exception | |
Exception: System.InvalidOperationException | |
Message: contextDatabase | |
Source: Sitecore.Forms.Core | |
at Sitecore.Forms.Core.Dependencies.DefaultImplItemRepository..ctor(Database contextDatabase, Database masterDatabase) |
This error is happening on CD servers, After doing some investigation and online search and wit existing with a great sharing community I found that it seems (but not sure) that there is a missing step when configuring WFFM on CD server to tell the WFFM to use web database instead of master database as this will not exist on configurations of CD servers,
So, we added the following configuration patch file:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<setting name="WFM.MasterDatabase"> | |
<patch:attribute name="value">web</patch:attribute> | |
</setting> | |
</sitecore> | |
</configuration> |
After this the code to start to work as expected, experience profile started to display an identified contacts.
Hope this will help.
2 comments:
Thank you for excellent article, Please refer below if you are looking for best training institute in hyderabad.
Sitecore Online Training
Sitecore Training in Hyderabad
Thanks for sharing this.,
Leanpitch provides online training in Scrum Master during this lockdown period everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
Best Scrum master certification
Post a Comment