Skip to content
March 2, 2017 / kiranpatils

TDS error while generating update package

Challenge:

It was Friday evening and it was time to sign off for the day and go on long weekend trip. Just before that we had a task to send a deployment package. And suddenly my friend Vikram shouted — While generating TDS Update package, We are getting this error

TDS: The package builder failed. Please see build output log for more details

When I went to his desk and said – Oh that’s easy. Just look at output log and we should be done! But It’s real world life, which is not as easy as it seems. You are also facing same error? Searching for solution? Then this post is for you:

Solution:

After trying few things we thought to do quick search and we found following great articles:

  1. https://theagilecoder.wordpress.com/2015/06/09/tds-the-package-builder-failed-after-project-rename/
  2. https://aldrichdev.wordpress.com/2016/06/09/tds-the-package-builder-failed-please-see-build-output-log-for-more-details/

Both have listed good suggestions. But neither of it worked for us. But might work for you. So, please do it before you move on. What, you already tried and then landed on this post. Then please keep reading. We thought to look at Build log level. By default they are minimal after changing it to Diagnostic. And when we tried again, we were able to find root cause from build output window that one of the .item was corrupted. As such it was not mandatory to have it. So, we deleted it AND It worked!

build-output

Happy Weekend! 🙂

Advertisements
February 17, 2017 / kiranpatils

Sitecore Helix Basics

Challenge:

Hey Friends, I’m excited to share many of first post of 2017! So, far it has been great year and I know a lot of you are MVP now or MVP Again — Congratulations Very well deserved! – Please make sure you help someone else become one — Because sharing is caring — Nice story

Since last year we have been hearing a lot about Habitat and then Helix and lot of people appreciating what Habitat or Helix is. You also heard/read about it? But:

  • You are afraid of It? Because Habitat solution is huge and you get confused how to set it up. Because it involves a lot of tools to set up e.g. gulp etc. [This is good point to upgrade your web/technology knowledge. It is evolving a lot. All of us accept that FED Technology is seeing lot of huge changes, and .NET Core team is doing super awesome stuff. If you don’t upgrade your self, there are chances of you being dinosaur in this industry]
  • Confused between Habitat and Helix
  • You setup your Habitat solution. But when you opened it. You got overwhelmed?
  • In this process, you don’t know how to get started and what’s the starting path for you to embrace Sitecore Helix?

Then this post is for you — This post will do 95% job to help you getting started on Helix — What about other 5%? — Will share about it before end of this post. So, let’s Helix

Solution:

Before we get further in technical details. Let’s try to understand what is the dictionary meaning of “Helix” – Wiki says “an object having a three-dimensional shape like that of a wire wound uniformly in a single layer around a cylinder or cone, as in a corkscrew or spiral staircase.”

Source : Wiki

It will be great to hear about naming directly from horse’s mouth some day.

Let’s get on point, How I got started on Helix? Exactly in same order:

Okay, Thank you for those resources. But can you please share your basics with me? So, I can get quickly started. Sure, here we go. I will share my learnings and understandings:

  • What is difference between Habitat vs Helix?
    • Helix :
      • Sitecore® Helix is a set of official guidelines and recommended practices for Sitecore Development.
      • Set of architecture conventions and guidelines that describe how to apply recommended technical design principles to a Sitecore project.
      • Secure implementations in a future proof way by architecting them as maintainable and extensible business centric modules
      • Development process recommendations to make it as easy as possible to build, test, extend, and maintain Sitecore implementations
    • Habitat :
      • Habitat is an example project that follows the Helix principles and recommended practices.
      • PLEASE DON’T USE HABITAT AS FOUNDATION/STARTER KIT FOR YOUR NEW PROJECT – HABITAT IS NOT BUILT FOR THAT
  • Why we need Helix?
    • Dependencies : If you look at dependencies, left side-show non helix project — Where any module is talking to any module — And as project becomes huge. No one makes small change with confidence — To make a one line change — Developer/QA/Stakeholders — Have to keep their fingers crossed. And still they have issues and because of it, they either have to miss dinner/lunch/outing with friends/baseball match/cricket match. But when things are done Helix way — right side. There are some standard ways – How each module talks to each other — And that gives everyone full confidence before making any change! — It is simple maths — Invest on strong foundation and take returns in a longer run! dependencies
    • Following diagram, clarifies that — As the project dependencies grow — lot of time spent on coupling rather than feature — and that increase time taken as well!why-helix
  • There are some logical layers defined, and you try to follow it – This image is very self explanatory. You just need to know three things – Foundation, Feature, Project – And each one of them should hold things which suits to their name:layers-basic
  • Benefit of using proposed layers — See this example – When you have multiple sites — They can have all foundational and featured things available! – Standard Sitecore Multisite way of doing things:layer-example
  • Helix also guides you how you need to structure your templates – Which are heart of any Sitecore projects : helix-template-inheritance
  • There are few Helix dependency rules you need to follow — You can break it. But then there is no point in using Helix:helix-rules
    • There is a strict reference hierarchy of module categories. Projects -> Features -> Foundations.
    • Project modules cannot reference other projects, but can reference any Features and Foundations.
    • Feature modules cannot reference any Project modules or other Feature modules. They can reference Foundations
    • Foundations can only reference other Foundations.
  • How to add advance things like GlassMapper, Sitecore 8.2 DI, Code Gen, TDS : Good question, We spend sometime and made it possible. This thread might help you get quick started [If not, give me a shout] : http://sitecore.stackexchange.com/questions/4370/few-questions-related-to-helix
  • If you think — There are a lot of Manual steps involved in adding a feature and foundation – Look at the great work done by Marc : http://blog.marcduiker.nl/2016/12/28/hands-on-with-sitecore-helix-using-powershell-add-module.html
  • Akshay also did good stuff taking this forward for initial setup : https://www.akshaysura.com/2017/01/21/habi-what-a-tat-create-a-sitecore-helix-solution-from-scratch-using-powershell/

It seems a lot? I know, I realized after writing. But I wanted to share all our basics with you. Because when we had to start, we were literally struggling to get started. But now, we did it. Thought to share with you. So, it saves some of your time, which you can spend with your loved ones or for other important things!

In Summary,

  • Helix is not a rocket science, It is same Sitecore code. But how and where you write it — That is standardized by Sitecore — As Sitecore support team is also using same methodology. So, it is easy for them to help you troubleshoot
  • Just imagine, your company adopts Helix and all projects which your company does, does in Helix [Including your project :-)]. After sometime, any developer can jump from one project to another project – Project on boarding will be super easy — (S)he just need to know business domain. I have seen lot of project leads, don’t allow new developers on board even though they can support more developers in project — Because of project on boarding — Helix helps us all speak same language!
  • “Helix is like Maths, Once you get it. You enjoy it and would like to do it again and again”

I am sure you must be curious t o know what else 5% I need to do to get 100% knowledge on Sitecore Helix? It’s simple — Get your hands on it. Coding is like swimming. You have to dive in to swim/code!

It was fun to work along with Muktesh and Varun on Helix basics! Thanks to all folks who already wrote about it, which helped us to get it started sooner!

Good read:

  1. http://helix.sitecore.net/
  2. http://www.sugcon.eu/wp-content/uploads/2016/05/Introducing-Sitecore-Habitat.pdf
  3. http://www.sugnl.net/~/media/SUGNL/Meetings/Developer%20track%2019%20oktober%202016%20Achmea/Downloads/SUGNL%20Meeting%20Achmea%2020161019%20%20Robbert%20Hock%20%20Symposium%20recap.pdf
  4. https://www.dynatrace.com/blog/adding-the-how-to-what-for-sitecore-helix-test-automation/
  5. http://www.hhog.com/blog/sitecore-helix-fxcop-rules/

Happy Sitecoring! 🙂

December 20, 2016 / kiranpatils

Sitecore Azure Basics

Challenge:

In a small city, there is a company. Where two people work – Mr. Basics and Ms. Curious. As name suggests Ms. Curious was always curious about anything. Whenever she used to see something new, she used to go to his friend. Mr. Basic. Again as name suggests Mr. Basic was always clear with his basics. And when anyone used to come to him with questions. He was helping them understand with all the basic information he had!

Disclaimer — All characters in this publication are entirely fictitious and any resemblance to real persons, living or dead, is purely coincidental.

Also, If you noticed in following posts I used male characters. But knowingly in this story I am adding female character. I would like to encourage more girls to code : https://girlswhocode.com/

  1. https://sitecorebasics.wordpress.com/2015/04/04/sitecore-multisite-basics/
  2. https://sitecorebasics.wordpress.com/2013/02/06/transfer-tool-media-transfer-bug/

So, Ms. Curious came to know about Sitecore Azure which is buzzing since 8.2 update-1 launch and she has already been through few articles on web. But still she prefers to talk to her friend Mr. Basics. So, Mr. basics as always explains all basic details about Sitecore Azure to Ms. Curious. This post shares chat between them. Which you might find helpful. If you are in same boat as Ms. Curious!

Solution:

Read from left to right :

1 23 45 67 8

Hope you found this chat helpful! Also, Would like to Thanks to all SC Community members for sharing their learnings as well SC documentation team for nice documentation. Which allowed Mr. basics to simplify Azure learnings. Thank you all of them!

Before you go to last section, Would like to say Thank you (Yes, you!) my dear reader for reading, sharing, visiting, and commenting on my blog. This blog is my open diary. Which I share with you. 2016 had been great year, on our blog — We got 85K views and 15 blog posts. Which makes 167 blog posts overall and 327802 Page views! Thank you – Humble, Grateful!

azure-happy-holidays

Happy Holidays, Have a great time with your loved ones!

Resources:

  1. http://www.sitecore.net/en/company/blog/489/five-reasons-why-microsoft-azure-web-apps-and-sitecore-are-a-match-made-in-heaven-4415
  2. http://blog.baslijten.com/category/azure/
  3. https://jermdavis.wordpress.com/2016/12/12/the-brave-new-world-of-azure-paas/
  4. https://doc.sitecore.net/cloud/
  5. https://mhwelander.net/2014/09/23/sitecore-azure-for-beginners-part-1-what-is-microsoft-azure/
  6. https://www.cmsbestpractices.com/choosing-the-right-hosting-option-for-sitecore/
  7. https://docs.microsoft.com/en-us/azure/app-service-web/app-service-web-overview
  8. https://tryappservice.azure.com/
November 3, 2016 / kiranpatils

Sitecore Instance Manager error

Challenge:

It is near to midnight in India and my phone is saying me that I should go to sleep. But before I go for sleep. Would like to make sure I blog my learning which took most part of my day and was scrathing my head.

So, I got a new laptop which has Windows 10 on it. Was trying to configure your and mine favorite Sitecore Tool – SIM (If you haven’t heard of Sitecore Instance Manager (SIM) and you are newbie then it’s fine. It is Army knife of Sitecore Developer, and a must need to have tool in your toolset)

After installing was trying to pass through initial configuration and it was tough to pass through following dialog.

“You probably don’t have necessary permissions set. Please try to click ‘Grant’ button before you proceed.”

 

If you are also facing this then this post might help you. So, let’s see what I found while troubleshooting this.

Solution:

  1. I went to c:\inetpub\wwwroot – And made sure that NETWORK SERVICE user has full access on main folder and sub folders – It was there!
  2. Did a quick search and found few good articles:
    1. http://sitecoreblog.patrickperrone.com/2015/04/a-simple-error.html
    2. https://github.com/Sitecore/Sitecore-Instance-Manager/wiki/Troubleshooting
    3. In Summary, This seems file system related error. But behind the scenes it also tries to check SQL rights. So, go back and make sure your connection string is right. What I would suggest you to do is. Take that username and password and try to login using SQL Server Management studio and try to create dummy database and delete it using same credentials. This should work. Also, make sure you are running your SQL Service using NETWORK SERVICE account
    4. Also, please make sure you are  running SIM as Administrator user
  3. One more thing, Make sure your SIM.EXE is not blocked, as it was downloaded from Web. If so, please unblock it
  4. After doing SQL Server related changes make sure you restart SQL Server – Then only changes will take effect

Then I got busy with other things and thought to find Plan B. Which was installing Plain Sitecore using Sitecore installer. I did that using Sitecore Installer (exe) was able to install Sitecore successfully!

But still that problem was still going on in back of my mind [We are same! ;)]. So, thought to ask few awesome Sitecore developers internally they gave few ideas. But everything was tried. Was about to go to bed and thought to troubleshoot a bit and then go for sleep. And I tried to reproduce the issue. But couldn’t, it was fixed! How?

As per my understanding:

  1. All above mentioned changes
  2. And Installing Sitecore using Sitecore installer

Fixed this issue! I can’t say it confidently. Till I get fresh laptop where I try exact same steps or one of you also try the same and confirm it for us!

Or Alen might have some idea and he improves that error message which indicates exact error message.

After writing above line, I realized that SIM is now open source and Alen and Sitecore’s vision will be fulfilled. If I am able to find this BUG and Fix it or narrow it down. So, I went ahead and cloned repository in my local and have been able to locate code which is causing this behavior. message variable is same for both scenarios – File system and local

https://i.imgur.com/3ugOPlS.png

And this is what TestSqlServer method does:

After looking at code, I noticed that there has been lot of logging going on. So, thought to find out log file and found it here : C:\Users\<USERNAME>\AppData\Roaming\Sitecore\Sitecore Instance Manager\Logs and found following errors:

1 13:25:09,168 DEBUG                           SQL Server Account name: LocalSystem
1 13:25:19,185 ERROR Cannot create a test database
System.Data.SqlClient.SqlException (0x80131904): Cannot open database “DBNAMEWHICHDOESNTEXIST” requested by the login. The login failed.
Login failed for user ‘lsa’.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at SIM.Adapters.SqlServer.SqlServerManager.TestSqlServer(String rootPath, String connectionString)
ClientConnectionId:093bd696-1e58-4662-9e5b-2a172e5619ae
Error Number:4060,State:1,Class:11
1 13:25:42,751 DEBUG                           return False (System.Boolean)

After verifying connection string setting in SIM, I noticed some change:

Not working : user id=sa;password=*****;Data Source=MACHINENAME\SQLEXPRESS;Database=DBNAMEWHICHDOESNTEXIST

Working : Data Source=(local)\SQLEXPRESS;Initial Catalog=master;User ID=sa;Password=******;Connect Timeout=1

Working one must have been modified by Sitecore installer. Because I haven’t changed it.

This would have been easy fix. If error message was in sync with backend error — Now, we understand end user’s challenges better! 😉

In Summary,

  1. If you are getting such error, along with file system verify SQL related configurations
  2. Look at SIM Logs
  3. Don’t forget SIM is open source, clone repository and troubleshoot!
  4. Found and fixed it? Don’t forget to contribute your fix to make SIM better — Yes, Yes, I am also going to do that. Once I test my solution in local

Have a seamless SIM installation! 🙂

September 25, 2016 / kiranpatils

MongoSessionStateProvider might slow down your application

Challenge:

Since couple of weeks, Have noticed some performance issues with couple of projects, I was involved. Basically their page load was taking 20 seconds to load and when you look at other things like:

  1. Sitecore log
  2. PublishQueue
  3. History
  4. EventQueue
  5. and so on

Everything seems normal. Then we figured out that we are using MongoSessionStateProvider for these clients and after doing some steps we have been able to load pages in normal load time! So, what we did to tackle the situation? What we learnt during this challenge? Curious to know? We are also curious to share. Here you go:

Solution:

First of all, If Session, SharedSession etc. Confuses you or scares you. Then don’t worry. You are not the only one in this Sitecore world. There are a lot of folks like you. And the best thing is someone already wrote simplified version of it for you – Thanks to Martina! Please read these awesome articles:

Let’s Talk About Session State

What’s in a session: What exactly happens during a session, and how does the xDB know who you are?

https://doc.sitecore.net/sitecore_experience_platform/81/setting_up__maintaining/xdb/session_state/session_state

Enough Basics. Let’s get back to main point. Live site pages were loading in 20 seconds and as it was slow LB was saying you guys [CD servers] are not healthy. I am not giving you any requests to serve. After doing basic check we thought we should take memory dump and analyze it. Dump revealed that Sitecore is waiting for Mongo to respond. So, we though to look in to Mongo DB and after clearing session collection from session and sharedSession Mongo DB. Things came back to normal.

You can do it using RoboMongo you can do it using UI.

2016-09-25-12_44_49-db-dev-test-sandboxes-db-sc-dev-test-cloudapp-net-remote-desktop-connec

But If you don’t have RoboMongo connection. Then you can do it using Mongo Shell Commands : https://docs.mongodb.com/manual/reference/mongo-shell/

  • show dbs
  • use <db>
  • show collections
  • db.sessions.drop()

Do it for both session and sharedSession database. That’s it!

Then thought to get views on this issue with Sitecore support ticket and during discussion found one BUG and some learnings which says it is good to use SQL Session State Provider instead of Mongo

Support discussion:

Support Team : If you use two different database, the Shared Session State provider might not create a required index on the session collection. As a results, a MongoDB instance can be high overloaded and start producing symptoms like in your case.

Using Robomongo tool, can you please check if there is the e_1__id.s_1__id.a_1 index in the session collection?

The index definition must look like below:

Name: e_1__id.s_1__id.a_1
Keys:
{
    “e” : 1,
    “_id.s” : 1,
    “_id.a” : 1
}
We : We found this index only on session database. It is there in Session and Not Shared Session DB. Do you want us to create it manually?
Support Team :

Yes, you must create the  e_1__id.s_1__id.a_1 index to avoid overloads of your MongoDB server. Otherwise, the Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider might put down the server when retrieving contact’s sessions for your web site visitors.

Using Robomongo tool, please add manually the index:

  • Name: e_1__id.s_1__id.a_1
  • Keys:
{
    “e” : 1,
    “_id.s” : 1,
    “_id.a” : 1
}
I have registered this issue as a bug in the current version of Sitecore. To track the future status of this bug report, please use the reference number 114604.
Support Team :  Sitecore Azure modules has been designed to work with xDB Cloud only. Technically, you can bring your own MongoDB server, Processing/Aggregation, Reporting Services and Search server and plug them in, but you have to do it manually, and then reconfigure Editing Farm as Content Management (CM) role and Delivery Farm as Content Delivery (CD) role. Otherwise, the module deploy configuration from a deployment center as is and a farm will behave as CM/CD/Processing/Aggregation, Reporting Services, which cause many collisions and unpredictable behavior.

If you bring your own Sitecore xDB, you must:

    Disable Sitecore xDB Cloud for both Delivery and Editing Farms. Select the /sitecore/system/Modules/Azure/{Environment}/{Location}/{Farm}/Role01/{Staging | Production}/Options/xDB Cloud Edition item and release/uncheck the Enabled check box in the Data section.
    Update the Deployment Type Exclude Files [Applied to specific Deployment types only (CD/CE)] field in the /sitecore/system/Modules/Azure/{Environment}/{Location}/{Farm}/Role01/{Staging | Production} item with a list of disabled *.config files, which you can find in the following article:
        For Delivery Farm – Configure a content delivery server.
        For Editing Farm – Configure a content management server.
    Bring your own:
        Sitecore installation that is configured as the Processing/Aggregation role according to the Configure a processing server article.
        Sitecore installation that is configured as the Reporting Services role according to the Configure a Reporting Service server article.
        Solr server for hosting a distributed sitecore_analytics_index.
        Collection MongoDB Server that is configured according to  Configure a collection database server to the article.
        Reporting SQL Server that is configured according to the Configure a reporting database server article.
        Session database servers that is configured according to the Configuring session database servers article.

For more information what servers Sitecore XP requires please see the Configuring Servers article.

Please note Sitecore xDB Cloud it not only MongoDB server. There are many other components with dedicated servers and services. For more information about xDB Cloud please see the xDB Cloud overview article.

We :  We’ve already done these steps
Support Team : Sitecore XP product is shipped with Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider and Sitecore.SessionProvider.Sql.SqlSessionStateProvider session state providers. Where first uses MongoDB as session storage and the second one uses SQL Server. You can use either one and there isn’t not specific recommendation, but SqlSessionStateProvider provider might be a bit faster, and most of the customers typically prefer using SQL one in combination of Sitecore Azure + Sitecore xDB Cloud.
We : The article presented here . https://doc.sitecore.net/sitecore_experience_platform/81/setting_up__maintaining/xdb/session_state/walkthrough_configuring_a_private_session_state_database_using_the_sql_server_provider/ 
says: “These performance enhancements move the session state store to SQL Server tempDB which is the standard practice recommended by Microsoft. However, this is not supported on Windows Azure.
For more information see Session-State Modes on MSDN.”

Support Team : There is one think you have to do before deploying Sitecore Sessions SQL database to Azure SQL Databases service.

Run the following scrip to drop the CreateTables stored procedure that is not used.
USE [Sitecore_sessions]
GO
/****** Object:  StoredProcedure [dbo].[CreateTables] ******/
IF OBJECT_ID(‘CreateTables’) IS NOT NULL
DROP PROCEDURE [dbo].[CreateTables]
GO

For more information on how to deploy Sitecore databases to Azure SQL Database see the following article:

https://github.com/olegburov/Sitecore-Azure-Content/blob/master/articles/how-to-deploy-sitecore-databases-to-azure-sql-database.md

> Why does the Sitecore document states that performance enhancements are not supported in Windows Azure, can you elaborate and help us understand why?
The performance optimization that the Performance Boost.sql scrip brings is based on the tempdb, which is not supported by Azure SQL Databases. Therefore, you can’t apply the script and have to remove the CreateTables stored procedure, which relates to the script.

Web Analysis:

  1. During MVP Summit, lot of people said. Good to use SQL Provider instead of Mongo
  2. Good thread : https://community.sitecore.net/developers/f/9/t/118#pi214filter=all&pi214scroll=false “Currently (in SC8), the Session state provider on Mongo is a bit slower than SQL Server (~20%). Apparently this is a thing on the side of the implementation of the session provider itself and it shall be fixed in the upcoming version of Sitecore. The reason for chosing Mongo over SQL is mainly because of simplicity and the characteristic of the session data. You could still use SQL Server with Mongo though.”

    ” At the moment, I would recommend the sql session provider. I have laerned about some performance issues on certain circumstances with the mongo session provider – so right now, I will recommend sql in any situation.”

  3. Wait for Sitecore to come up with Redis Provider — Which is happening soon. Redis is a winner for Out Proc session storage — Refer Martina‘s article.

Quick summary:

  1. If you can switch to SQL Session State provider do it!
  2. If not, then make sure you add Index manually to sharedSession DB
September 25, 2016 / kiranpatils

Sitecore Content Testing not working?

Challenge:

We use Content Testing, A/B Testing a lot for all our clients. And you need to do that. Correct? Because that’s why they invested heavily in Sitecore license.

We were trying to enable it for one of our client as per this article : https://doc.sitecore.net/sitecore_experience_platform/analyzing__reporting/experience_optimization__content_testing/setting_up_tests/adding_content_testing_to_a_workflow

But it was not working. I got involved in this project later on. So, had no idea what’s going on. Spent sometime figuring out to make it work. And I think it will be good for you as well to know this. In case, you also face similar issues.

Solution:

We started looking at Solution and found one thing.  In past due to Performance issues in experience editor Sitecore folks asked us to disable Sitecore.ContentTesting.Requests.ExperienceEditor.SuggestedTestsCountRequest class to prevent excessive calls to database  [Sitecore.ContentTesting.Requests.ExperienceEditor.SuggestedTestsCountRequest class to return 0]. As we were on Sitecore 8.0 Update-2 we had to write our custom code. But it has been fixed in Sitecore 8.0 Update-3 (“The Experience Editor slowed down when there was a large number of Suggested Tests. This has been fixed. (434105)”) after analyzing a bit and having a Sitecore support discussion we thought this seems not be main reason for A/B Testing. But that was theory. Wanted to prove it.

So, Installed plain Sitecore on my local machine and configured Automated Test which was working! Then gradually started adding all configurations and custom code related to A/B testing in plain Sitecore and finally, Have been able to find out root cause. Eager to know? What it is? Let me share

Basically, When we did upgrade we were not using ContentTesting. So, we disabled it using our custom patch file:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <settings>
      <setting name="ContentTesting.AutomaticContentTesting.Enabled">
        <patch:attribute name="value">false</patch:attribute>
      </setting>
      <setting name="ContentTesting.GenerateScreenshots">
        <patch:attribute name="value">none</patch:attribute>
      </setting>
      <setting name="ContentTesting.PhantomJS.EnableJavaScript">
        <patch:attribute name="value">false</patch:attribute>
      </setting>
    </settings>
  </sitecore>
</configuration>

After reverting those attributes to Original it started working. Then we did some reading on those attributes and here’s what we learnt:

  1. ContentTesting.AutomaticContentTesting.Enabled : Determines whether automatic content testing features should be enabled.Default value: true
  2. ContentTesting.GenerateScreenshots : Determines when screenshots should be generated.Must be one of ( all | limited | none ) Default value: all. Basically, It takes screenshot of all possible variations
  3. ContentTesting.PhantomJS.EnableJavaScript : Determines whether the PhantomJS tool should allow JavaScript on pages. Default value: true

Here is the working config:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <settings>
      <setting name="ContentTesting.AutomaticContentTesting.Enabled">
        <patch:attribute name="value">true</patch:attribute>
      </setting>
      <setting name="ContentTesting.GenerateScreenshots">
        <patch:attribute name="value">all</patch:attribute>
      </setting>
      <setting name="ContentTesting.PhantomJS.EnableJavaScript">
        <patch:attribute name="value">true</patch:attribute>
      </setting>
    </settings>
  </sitecore>
</configuration>

P.S. Thanks to Eric. Who worked on this issue along with me and Thanks to Sitecore support team as well!

Happy Content Testing! 🙂

September 19, 2016 / kiranpatils

Sitecore MVP Summit and Symposium basics from the field

Hey Sitecorian, I’m sure you must have been seeing lot of Buzz about Sitecore MVP Summit and Sitecore Symposium which was happening at NOLA.

This was my second Sitecore event. First one was at Dreamcore Europe in 2011. This one was lot different than last one. Especially, Because of two things:

  1. Sitecore community has grown a lot!
  2. Sitecore is taking this event at a bigger scale – Thanks to their event committee!

So, luckily I was part of this event. Thanks to Horizontal Integration for sponsoring us. 30 people from HI were there. As THIS IS OUR DOMAIN:

https://i1.wp.com/www.horizontalintegration.com/-/media/hi-landing-pages/sitecore-symposium-landing-page/symposium_landing_hero.jpg

It was a great event. Full of information, which will take sometime for me to digest. I took a lot of notes. And I thought to blog and share with you as well. So, If you might have missed this event. Because of any reason – No Visa, Lack of finance, Other plans, Family reasons, or anything else. Then this post is for you.

Again, event was full of experience. And I won’t be able to share same experience with you e.g. We did Go-Karting, Been on boat etc. — That thing I can’t share. But i can surely share knowledge and I am sure you will feel that experience via  this article:

Media images

  • Sitecore MVP Summit : MVP Summit happens every year to appreciate all MVP efforts. Sitecore demonstrates new things first hand to MVPs/VIPs 🙂 Lot of MVPs and Sitecore employees reached here on Sunday night and they were chatting till early morning Monday — That’s what happens when passionate people gets connected. Monday — It started with registration and Keynote. Followed by lot of sessions. And in evening we went on boat — Awesome experience! Second day we went to NOLA Motorsports — We had sessions there, Round table discussions and finally we did Go-Karting. Few pictures:

This slideshow requires JavaScript.

Inspired? Want to become MVP? Start learning and start sharing. This article might help you

  • Sitecore Symposium : MVP Summit is only for MVPs. But Symposium is for everyone. For Partners – To show their potential and connect with future clients, Developers and Marketing folks to connect with each other, And everyone presents their learnings. This event also started by Welcome reception and registration first day then second day a Keynote from Michael Seifert with a new experience and demand more theme. Followed by back to back sessions and big party at House of Blues. Second day was also full of learnings. Few pictures:

This slideshow requires JavaScript.

Topic Basic How it affects you? Remark
Developer Marketing/

Business

Future of Form  Something new coming up in Forms You should be aware of this  This will way you work with Forms

 

 Unfortunately, can’t share lot on this as it is under MVP NDA
Commerce Future It will be known as Sitecore

 

Commerce

Engine is built on .NET Core

If you are looking for E-Commerce with Sitecore then you must need to check this

Same as last column

Very configurable – Commerce engine on .NET Core
Idea Management If you have any idea to improve Sitecore. Post it here: https://sitecore.uservoice.com/ Sitecore Product team will funnel it using Prod Pad If your wish list/idea gets voted – It has higher chance to get it done You can also post One more example of Sitecore listens!
Nuget Sitecore assemblies are available on Sitecore Nuget : Better to use nuget.config and commit in repository along with .sln file

Avoid using references

NA NA
Sitecore on Azure Lot of great things coming up. Removing Azure module. Support for ArmViz Templates, Support for Redis,

 

Just a note: MS is sun setting Cache extensions soon. So, if you have Cache worker role and using session. You need to upgrade or find alternative

You will not need Azure Module. You can directly publish on Cloud Services from Visual Studio

 

You will be able to CM/CD/AG/Processing server on cloud with few clicks and few minutes

If you are setting up new servers. You should check this Coming in Sitecore 8.2 Update1
Sitecore DI Microsoft DI is support is available out of the Box with Sitecore 8.2 Look for some configurations and attributes like resolve=”true”

 

There is also an Admin page to look at DI : ShowServicesConfig.aspx

For bigger projects – Ask for DI for highly loosely coupled and easy to maintain projects NA
.NET Core Sitecore is adopting .NET Core a lot. And so as community. It is time for you to learn .NET Core

 

They did it using Publishing Service in Sitecore 8.2

 

They have plans for lot of other things

   
Habitat/Helix One thing you need to carve in your mind “Habitat is a demo site, and Helix is Sitecore standards way to do things”

 

Another way :

Helix is a specification and Habitat is an implementation

Finally, Sitecore came up with documentation which talks about Standards. Because Sitecore is like Weapon. You can use it for your safety or you can harm other using it. It’s how you use it. Ask your developers to read Helix Standards You can also contribute – It’s on Github!
Path Analyzer Alex and Adam did a great job! Now, you don’t need Silverlight to view Path Analyzer – They ditched Silverlight – Sitecore 8.2

 

Awesome way to analyzer user’s path

 

New UI

It’s 100% on JS – Using React, Redux, Modular JS,  D3.JS,  Web Pack Must use Path Analyzer to understand your customers NA
Sitecore Experience Accelerator (SXA) New way to Create Sitecore websites

 

Built on Helix principles

 

80% Faster Sites

 

Understands Tenants, Sites

You should surely know about this. Mainly it is for FED and Content authors Good to check If your Site design is simple and you would like to get things done faster. Just make sure you do maths on Licensing Not sure about licensing model. Does it make sense to get it done from Partner of from this module. Is not clear to me yet
Developer Keynote Sitecore is going in Cloud First, SOA and Stateless direction

 

 

Data Exchange Framework is coming up

 

OData will be standard Protocol for Sitecore – REST API and OData

 

Micro Services using ASP.NET Core

 

Express Migration Tool – Launched in 8.2 – It only does content – It is possible from 7.2 to 8.2

Keep watching these tools NA
xConnect Collect data Cross Channel

 

xDB will be central

Client API will be used You can use this data with Power BI as well Will come in 8.3 – Initial release

 

8.4 – Full version

Sitecore Publishing Service After 10 years – These are some of the biggest improvements happened in Publishing logic

 

Improves Publishing performance heavily. It uses Smart logic

 

New UX

Built on .NET Core

 

Needs to install module and configure few things

No new license required Launched in Sitecore 8.2

That’s it. These were my learnings from my views. If I missed any points. Feel free to let me know. Will be more than happy to add it. Read more:

So, now I’m back to my work with lot of things to learn, implement and share! This was my experience! – If you are customer DEMAND MORE and If you are a partner DELIVER MORE!

See you next year at Las Vegas!

%d bloggers like this: