Category Archives: Issues & Resolution

Sitecore Commerce Server Connect.10.0.70.update package installation hangs

I had a strange issue where I previously able to successfully setup a couple of Sitecore Commerce 8.2.1 initial release instances then suddenly creating a new instance keeps failing.

To be exact, it was failing when trying to install Sitecore Commerce Server Connect.10.0.70.update package through the Sitecore update installation wizard page, it just keeps loading indefinitely. Changing the Sitecore log files to DEBUG mode and checking the Windows event log file doesn’t reveal anything. I do notice that memory consumption for the W3WP process is absurdly high in my local machine and it seems like something went wrong.

True enough, after debugging the W3WP process it reveals that the process throws a StackOverflow exception which stems from NewRelic Agent process that I’ve installed yesterday. Uninstalling the NewRelic Agent seems to fix this issue and I’m able to continue with the packages installation per normal.

Sitecore Server Role Checker Tool

When configuring Sitecore in a distributed environment, you typically have more than 1 server in the production environment configured as a different roles (CM, CD, Processing, Reporting Service, etc).

More often than not I’ve noticed that issues are raised due to misconfiguration rather than implementation itself. You then go to Sitecore documentation site and check the configuration for each of the server that you’ve setup to see if there’s anything that you miss.

In the 8.0 documentation you would need to read a long list of tables containing information which config files that you need to enable/disable.

Since the 8.1 release, these steps are simplified with Sitecore providing us an excel spreadsheet file as a guide to enable/disable the config files depending on the role(s) that you want to setup. These steps are manual though and highly likely that we will miss one or two config files and could cause some issues down the line.

With the number of projects that you need to review, this task will start eating up your time and should really be automated. Some might have already done so and create a little tool tucked away somewhere.

I’ve decided to create my own version of the tool called Sitecore Server Role Checker, can’t be more obvious than that 🙂

How does it work?

This tool would basically uses a converted csv format from the Sitecore official spreadsheet guide and read the configuration based on your selected roles. It currently supports the following Sitecore version

  • 8.1 update 3
  • 8.2 initial release
  • 8.2 update 1
  • 8.2 update 2

Only those version is supported as those are only the spreadsheet available for now.

How do I use it?

Follow this simple steps

  1. Choose your Sitecore version
  2. Choose your search engine provider
  3. Browse to your website folder
  4. Tick your intended role(s) for this particular Sitecore instance
  5. Click the Analyze button

It would then go through each of your configuration files and report if there’s any config files that should be enabled/disabled.

Through the tool you can also quickly disable/enable those config files.

What it doesn’t do

  • Check if your config files is updated accordingly, e.q:
    • Changing robot detection handler in CM
    • Configuring remote reporting service url
    • etc
  • Check the configuration files for WFFM, EXM.. yet
  • Make you coffee

Where can I get it?

The code is available in Github

Note that this tool is not deeply tested, if you have any issues or suggestions with the tool then raise a ticket in Github or do a PR

update: 22 February 2017

The tool is now available at Sitecore Marketplace

Issues encountered with Sitecore Azure Module

I was playing around with Sitecore Azure Module last week and would like to share my experience to get the site up and running.

I am using Sitecore 8.0 version, WFFM and EXM modules. Obviously you would need the Sitecore Azure module to help you setup the content editing and content deliry farm.

  • Sitecore 8.0 rev. 160115 (8.0 Update-7)
  • Sitecore WFFM rev. 151127 (Update-6)
  • Sitecore EXM  3.1 rev. 151213 (3.1 Update-2)
  • Sitecore Azure 8.0 rev. 150522

The target Azure setup would be

  • 1CM and 1CD server in the same data center, in my case I create the farms in the Singapore data center as it’s the closest one for me
  • Sharing the same databases for CM and CD; core, master, web, reporting. In the case of CD it will not have a reference to master and reporting
  • xDB cloud will not be used, instead MongoDB databases will be created using the free 500MB databases from http://mongolab.com

Before proceeding you would need an Azure Subscription in order to be able to create the necessary VM/Cloud Service, if you’re like me and just want to try out the Sitecore Azure Module you can sign up for a free trial for one month.

Installation

In the installing Sitecore Azure Module article above, it also explain about how to deploy to Azure to setup a Editing Farm and Delivery Farm which seems to be easy and straightforward. However I encountered some issues while trying to deploy to Azure.

Issues when deploying

Error saying that the storage account already exist in Azure

Solution:

 

The storage account service name must be unique in Azure across subscriptions, meaning that it has to be unique not only for you and for other subscriptions in the Azure as well. To fix this you can go to /sitecore/system/Modules/Azure/[project_name]/[region_name]/Editing01/Storages/Default and update the Service Name field.

 

Error saying that the database server already exist

Solution:

In the /sitecore/system/Modules/Azure/CampaignManagement-Evaluation/Southeast Asia/Editing01/Sql01 “Server Name” field empty the value. And then clean the unused Azure SQL database server.

 

Error saying that the vmsize does not exist

Solution:

This is because the vm tier name has been changed by Microsoft, which originally was D3 is now has been updated to Standard_D3. To fix this you would need to update the /App_Config/AzureVendors/Microsoft.xml

 

With the free trial subscription you might encounter an issue when the Sitecore Azure Module tries to create the database in SQL Database S2 tier

Solution:

To fix this you can temporarily change the /sitecore/system/Modules/Azure/[project-Name]/[region_name]/Editing01/Sql01/Set01/[database_name] Tier field and change it to “Basic – Basic”. This could also be caused by the database size Sitecore Azure Module requested to be created is not supported by the free trial subscription, I haven’t tested this however if you would like to try it yourself then update the /App_Config/AzureVendors/Microsoft.xml change the

to something smaller, say 100GB or 10GB

 

Another issue when trying to create the Cloud Service

Solution:

This issue seems to be related to the siteStorageSize configuration in /App_Config/AzureVendors/Microsoft.xml. I was trying to create a D3 instance which has the default size of 180GB, reducing the value to 10GB or more seems to do the trick

 

Some reference links that might helps:

exm-error

Issue when installing Sitecore EXM with different index name

Had an issue earlier today when trying to install EXM 3.2.0 rev. 151020 to Sitecore 8.1 rev 151003

Server Error in ‘/’ Application.

Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)

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: Sitecore.Exceptions.RequiredObjectIsNullException: Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)

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:

[RequiredObjectIsNullException: Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)]
Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties) +1920
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +643
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +275
Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +579
Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration() +266
Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.get_Cores() +92
Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorSolrStartUp.Initialize() +44

[HttpException (0x80004005): Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +544
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +186
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712

The error message is a bit misleading as it turns out after looking into the Sitecore.EmailExperience.ContentManagement.config file, one of the index was referring to sitecore_suggested_test_index index which doesn’t exist (I’ve renamed it to something else as I was running multiple sitecore instances in my local machine).

There’s also a reference to sitecore_master_index in Sitecore.EmailExperience.Core.config file.

Rename those indexes to an existing indexes then you’ll be fine.

Hope this helps.

Sitecore 8 WFFM MVC – Form Report display no data

We’re using Sitecore 8 update 2 and WFFM 8.0 rev. 150224, the issue that we have is that no matter how often we input the form data and submits it, the form report in Sitecore backend keeps saying that there’s no data to display. Checking in to the analytics database in MongoDB also shows empty FormData collection.

Long story short after contacting Sitecore support, it seems that we need to add the following code

It’s mandatory to put that bit of code in your layout so that Sitecore analytics can work properly. It also reminds me of an issue that I had with a similar fix http://reyrahadian.com/2014/10/28/sitecore-analytics-stops-tracking/

While investigating this issue I also found a couple of things that can help you test your WFFM forms

  • Any submitted form data will be flushed after the session has expired which by default the session timeout is 20 minutes, for quick testing purposes we can change the value which is specified in the web.config to for example 2 minutes

  • In the Sitecore.Forms.Config file which you can find under the App_Config/Include folder, there’s a setting to limit how often can a user submits the form which by default it limit each user to submit 2 form submissions under 1 minute or 100 form submissions under 60 minute. For testing purposes you can for example change the setting to 20 form submissions under 1 minute.

  • If you want to test WFFM in production environment where setting the session to timeout in 2 minutes is not possible, you can clear the browser cookies to force browser session to end SC_ANALYTICS_GLOBAL_COOKIE , SC_ANALYTICS_SESSION_COOKIE and ASP.NET_SessionId. Or you can implement a custom functionality to force browser session end through URL query string such as what has been done here http://www.delphicdigital.com/home/blog.aspx/d=2517/title=web-forms-for-marketers-25-upgrade

$scw(…).eventTracking javascript error in Sitecore 8 MVC WFFM

If you had an issue where you’re using WFFM in Sitecore 8 where it keeps throwing javascript error about $scw(…).eventTracking you’re missing some file references

For Sitecore 7.5 this files would be the following (Taken from the Sitecore Web Forms for Marketers V2.5 Reference section 3.15.2):

 

For Sitecore 8 the reference path is a different, see the following:

 

Sitecore ECM the remote name could not be resolved: ‘example.host’

Got an error when a user submits a form built using the WFFM. After narrowing it down I found that it has something to do with having to set the save action to send an email.

Here’s the following error:

Exception: System.Net.WebException
Message: The remote name could not be resolved: ‘example.host’
Source: System
at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
at System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
at System.Net.Mail.SmtpClient.Send(MailMessage message)

If you got an error like that, go to /sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Send Email Message and change the parameters field to the correct SMTP details.

For me I need to changed it to the following to make it works

Also I found a useful tool to check email in your local machine, if you don’t need to setup an actual SMTP server and just need to test simple email functionality try using papercut.codeplex.com