Tuesday, March 31, 2015

Evaluation of condition failed for rule item error on Log files in Sitecore 8.0

Sitecore Version :

Sitecore 8.0 rev. 150223

Error :

Following error repeated in the error logs

ManagedPoolThread #1 07:41:22 ERROR Evaluation of condition failed. Rule item ID: {871B4104-9CFA-4DE3-AF38-DF1E144B3DF0}, condition item ID: {4640D86A-9B01-4B04-9BEB-03E06E5AC722}
Exception: System.InvalidOperationException
Message: Tracker.Current.Session.Interaction is not initialized
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.IsNotNull(Object value, String message)
   at Sitecore.Analytics.Rules.Conditions.EngagementValuePointsCondition`1.Execute(T ruleContext)
   at Sitecore.Rules.Conditions.WhenCondition`1.Evaluate(T ruleContext, RuleStack stack)
   at Sitecore.Rules.RuleList`1.Run(T ruleContext, Boolean stopOnFirstMatching, Int32& executedRulesCount)

Reason :

When an Engagement plan condition has a timeout value set, this error occrs
Quote : Sitecore SupportWhen the state processing is performed by timeout, the interaction does not exist. That's why the excepion occurs in you log files, additionaly the contact does not move to the next state even if the condition was satisfied.

Solution :

Remove the timeout value from the Engagement plan Condition

Note : This has been registered as a bug (ref. 430511)

Quick Search Index Rebuild Error due to Large Item Names

Environment Summary: Sitecore 8.0 rev. 150223 (Update-2)

Issue : Quick Search Index Rebuilding error

When we try to run the "Quick Search Index" rebuild, we get the following error

Job started: RebuildSearchIndex|System.ArgumentException: it doesn't make sense to have a field that is neither indexed nor stored
   at Lucene.Net.Documents.Field..ctor(String name, Boolean internName, String value_Renamed, Store store, Index index, TermVector termVector)
   at Sitecore.Search.Crawlers.BaseCrawler.CreateDataField(String name, String value)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddSpecialFields(Document document, Item item)
   at Sitecore.Search.Crawlers.DatabaseCrawler.IndexVersion(Item item, Item latestVersion, IndexUpdateContext context)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddItem(Item item, IndexUpdateContext context)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
   at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
   at Sitecore.Search.Index.Rebuild()
   at Sitecore.Shell.Applications.Search.RebuildSearchIndex.RebuildSearchIndexForm.Builder.Build()|Job ended: RebuildSearchIndex (units processed: 5802)



Reason :

Quote : Sitecore Support 
When an item name length exceeds 128 characters this issue occurs. You can use the following SQL script in order to perform the check of your Core, Master databases:
SELECT [ID]
      ,[Name]
      ,[TemplateID]
      ,[MasterID]
      ,[ParentID]
      ,[Created]
      ,[Updated]
  FROM [dbo].[Items]
  WHERE LEN([NAME]) > 120 
 

Temporarily Fix :

Rename the items with name length greater than 120 characters to within 120 characters

Wednesday, March 18, 2015

WebEdit.UsePopupContentEditor - Setting of the Day

In the /App_Config/Includes/Sitecore.ExperienceEditor.config file, you will see following setting

<!--  WEB EDIT USE POPUP EDITOR
            Indicates whether WebEdit uses the popup content editor.
            Default value: false
-->
<setting name="WebEdit.UsePopupContentEditor" value="false" />


In the Experience Editor (Page Editor) mode, when you click "Edit related item" option for any component



when "WebEdit.UsePopupContentEditor" setting set to "false" (i.e. Default value), Content Editor will open at the top of the same page (see the image below)



When "WebEdit.UsePopupContentEditor" setting set to "true", Content Editor will open as a popup window (see the image below)









Subscription notification email checkbox not present in Sitecore 8 WFFM Save Action

With Web Forms for Marketers 8.0 (WFFM) module, "Subscribe to recipient list" save action was replaced with new save action, "Add Contact To Contact List"

In "Subscribe to recipient list" save action in older WFFM module, there was a "send confirmation email" checkbox. When this checkbox was clicked, sitecore will send a subscription confirmation email to the user.

But, in the latest WFFM 8.0, "Add Contact To Contact List" save action does not have that checkbox option.

WFFM Older Versions - Subscribe to Recipient List save action
WFFM 8.0 - Add Contact to Contact List save action


So, the way to achieve this in Sitecore 8.0 is to use Send Email Campaign Message action with the "Add the Contact to Contact List" save action. (Sitecore Support has helped/confirm this after reporting the issue)



Hope this helps to someone!

Monday, March 16, 2015

Look into Sitecore Development Basics – March Meetup – Event Report - SUGSL

After looking into functional side of Sitecore CMS in our first few meetups, it was time to look into the Sitecore development.
Since most of the members/participants in Sri Lanka are fairly new to Sitecore, our SUGSL March meetup was a timely one.
This time, we extend our meetup to two session. sitecoreug.org
6:30 PM – 7:15 PM  – Sitecore Development Basics by Chaturanga Ranatunga (Senior Sitecore Developer, Codehouse)
7:30 PM – 9:00 PM  – Sitecore Development: Getting Started by Matthew Kenny (Sitecore Architect | Sitecore Technology MVP, Codehouse)
Following are the recordings of the event

The participants were thankful to SUGSL since the presentation done by Matthew Kenny covered most of the required things to be considered in the initial development stages.

Event was powered by Codehouse Ltd, a Sitecore Certified Partner.
Hope to see you all in our April Meetup!

Sunday, March 8, 2015

Why NOT to Upgrade to Sitecore 8.0 Update-1

Recently we tried to upgrade from sitecore 7.0 to Sitecore 8.0 Update-1. With this upgrade we started to face lot of issues (most of them are showstoppers) that we could not go live with.

Note : Sitecore 8.0 Update-2 has fixed most of those issues and look more stable

So, here are my reasons to NOT to go for Sitecore 8.0 Update-1

1. Item Layout Details not editable

When try to edit the layout details (Presentation -> Details), the content editor get stuck. Also, following error was thrown at the logs.



More frustrating was Hedgehog TDS synchronization failed to sync layout details, which caused lot of trouble for our developers.
The only was we were able to do layout changes was using Sitecore Rocks VS plugin.

Solution: Not reproducible in Update-2

2. Cannot add additional fields to WFFM Create User save action User Profile

C
annot add additional fields to "User Profile" to "Create User" save action in WFFM
When click "Add Field" button, it won't add new fields (or not responding)

Solution: Fixed in Update-2 WFFM module

3. Path Analyzer Loading Error

When we try to run Path Analyzer tool, it returns following error in a pop-up.

Error: "There was an error loading data, please try again. PathExplorer.PathMapDataLoaded() - PathMap is null."

Solution:
Important! Please note that sometimes this table is cleared by Sitecore during the rebuild of the reporting database through the sitecore/admin/RebuildReportingDB.aspx page (this behavior was registered as a bug and has been fixed in Sitecore CMS 8.0 Update-2), so you should fill this table with the data from the clean reporting database after performing the rebuild of reporting database mentioned in step 1. Quote : Sitecore Support 

As for sitecore support, one of the reason for this error is Segments table and TreeDefinition tables are empty. The reason for this table get empty is when running the RebuildReportingDb.aspx tool, it clears this table also.
Thanks for Sitecore support to finding the issue and this has been fixed in update-2

4. EXM error while changing common domain field value


Solution: Workaround provided by Sitecore (Ref:431963)

5. Cannot open EXM from Applications menu in Sitecore Desktop

When try to open EXM (Email Campaign Manager) from Sitecore Desktop Applications link, it returns an error.

Sitecore Desktop -> Start -> All Applications -> E-mail Campaign -> E-mail Campaign Manager

Solution: Workaround provided by Sitecore (Ref:432783)


So, if you are planing to go for Sitecore 8, then my recommendation is to go for Sitecore 8.0 Update-2

Wednesday, March 4, 2015

WFFM 8.0 rev. 150224 update package installation Issue

Recently, I tried to upgrade sitecore 8.0 update-1 to Sitecore 8.0 update-2 with WFFM module update from WFFM 8.0 rev 141217 to WFFM 8.0 rev 150224

while in the wffm upgrade progress, at the final step, upgrade process breaks with following error.


Server Error in '/' Application.
--------------------------------------------------------------------------------
 Could not resolve type name: Sitecore.WFFM.Services.Pipelines.Initialize.RegisterHttpControllerActivator, Sitecore.WFFM.Services (method: Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert)).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Could not resolve type name: Sitecore.WFFM.Services.Pipelines.Initialize.RegisterHttpControllerActivator, Sitecore.WFFM.Services (method: Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert)).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Exception: Could not resolve type name: Sitecore.WFFM.Services.Pipelines.Initialize.RegisterHttpControllerActivator, Sitecore.WFFM.Services (method: Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert)).]
   Sitecore.Diagnostics.Error.Raise(String error, String method) +129
   Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert) +432
   Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +67
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +141
   Sitecore.Pipelines.CorePipelineFactory.GetObjectFromType(String type, XmlNode processorNode) +144
   Sitecore.Pipelines.CoreProcessor.GetMethod(Object[] parameters) +124
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +351
   Sitecore.Nexus.Web.HttpModule.Application_Start() +175
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +516
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +530
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Could not resolve type name: Sitecore.WFFM.Services.Pipelines.Initialize.RegisterHttpControllerActivator, Sitecore.WFFM.Services (method: Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert)).]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12979668
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest  ...

So, I take a look into Sitecore.WFFM.Service.dll by decoding it and found that a config entry in the /App_Config/includes/sitecore.WFFM.services.config file was pointing to non-existing namespace.

Then, I checked the standalone installation of WFFM 8.0 rev. 150224 package /App_Config/Includes config files and copy those files into my instance.
Then, ran the WFFM module upgrade again.
Everthing worked fine.

After informing the finding, sitecore has reported this as a bug and they will provide a fix for this in future.

Hope this helps to someong !