Skip to content
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!

August 29, 2016 / kiranpatils

New Module : Sitecore Mongo Shell

Challenge:

For few projects, I noticed that me and few of my colleagues/friends had issue validating weather Mongo connection is right or not, and if yes whether data is going through or not. Mongo Client tools (e.g. Mongo Management Studio) are there. But what If you can’t install Mongo Client Tool on server and Firewall is blocked to open Mongo connection out of network?

This tool will help you for that!

Basically, this tool is inspired from. SQL Shell – Sitecore tool to query SQL Data, https://github.com/SitecoreSupport/TestMongoDBConnection

BIG Thanks to them.

Solution:

This is how it looks :

2- 2016-08-28 18_29_23-Mongo Shell Tester - BETA 3 - 2016-08-28 18_29_50-Mongo Shell Tester - BETA 2016-08-28 18_28_27-Mongo Shell Tester - BETA-1

This is how it works :

Mongo-Shell-Beta-Demo

Have submitted to Marketplace for review. So, will share link once it is available. But I was eager to share [and I am sure you are eager to use] this with you. Package/Source code/Documentation everything is here : https://klpatil.github.io/SC-82-Demo/

Happy Mongo Troubleshooting! 🙂

August 22, 2016 / kiranpatils

Inheriting Sitecore Site Properties with Sitecore Patching and Transformation

Challenge:

Sitecore is such a huge platform that every day you find something new and interesting. Happens with you as well? It is happening with me since last 7+ years! 😉 But I am enjoying learning it and then sharing it with you.

So, let’s say you have one site node defined with all basic things e.g. enablePreview, enableWebEdit, hostName, startItem, database etc. It has hostName as “www.scbasics.com”. Now you would like to have one more site where you would like to use base attributes as earlier defined and you would like to modify few attributes only:

<sites>
  <site name="site1" virtualFolder="/sitecore/admin" physicalFolder="/sitecore/admin" enableAnalytics="false" domain="sitecore" loginPage="/sitecore/admin/login.aspx"/>

  <site name="site2" inherits="site1" />
  <site name="site3" inherits="site1" domain="extranet" />
  <site name="site4" inherits="site1" enableAnalytics="true" />
</sites>

Source : http://sitecoreskills.blogspot.com/2014/08/inheriting-sitecore-site-properties.html

I also did the same and it worked in local. But when I deployed it on QA/Dev server. It was not working. After spending sometime learnt something which I would like to share with you as well. You might see it in future or might be already facing it and reading this blog to find a way! 🙂 Let’s go!

Solution:

As you would have done, I also did showconfig.aspx on server and then noticed that my site2 was getting added before site1 and that was causing this issue and it was happening because I was using SlowCheetah Transformation and inserting site2 based on environment. To fix it — I used patch:after=”site[@name=’site1′]” which fixed this issue. Here is how it looks new with transformation

<sites>
  <site name="site2" inherits="site1" patch:after="site[@name='site1']" xdt:Transform="Insert" hostName="site2.com" domain="extranet" enableAnalytics="true"/>
  <site name="site3" inherits="site1" domain="extranet" /> 
</sites>

Good read :

http://sitecore.unic.com/2014/08/08/enable-multi-level-site-property-inheritance

https://sitecoreclimber.wordpress.com/2015/10/31/how-to-set-up-a-multi-site-solution/

Happy Patching! 🙂

August 22, 2016 / kiranpatils

Configuring Web Deploy on your Sitecore server

Challenge:

Last week one of my mates was trying to configure Web deploy with Build server and CM/CD Server and they were facing some challenges to get it done. We have done it so many times in the past. But as we haven’t had it documented we set together and fixed it. But then I promised to blog it and here you go!

Solution:

Microsoft folks have already written nice documentation here : http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later

This document is quite huge I know and in this fast paced world. Who has time to read through all that document. So, you are looking for important steps? Here are those:

  1. To install : Refer section :”Using the Web Platform Installer to install Web Deploy Separately”
  2. To configure : Refer section : “Configuring a Site for Delegated Non-Administrator Deployment”

That’s it!

You are facing challenge with your Web deploy configuration? Feel free to get in touch with me. Because I have spent good amount of time troubleshooting it (and before that understanding it) and this post is proof of it.

Happy Deployment! 🙂

 

June 3, 2016 / kiranpatils

Unable to see components on Stats.aspx page for your Sitecore 8 MVC site?

Challenge:

We are near to launch one of our new site. Built on Sitecore 8.1 U1 and MVC, GlassMapper, TDS etc. As per our practice we applied HTML caching on all possible components. Which we were verifying whether it is working as per expectation or not. One of the way to do is using stats.aspx page. But when we opened it. It was displaying only one component — VisitorIdentification — Which is more of a Sitecore control. Then what happened to all our renderings? Same with you? Or you would like to be proactive? And eager to know what it was. Then this post is for you. Let’s delve in to it.

Solution:

As expected. We did a quick Google search and came across of this blog : https://blog.wesleylomax.co.uk/2015/11/20/sitecore-8-mvc-custom-site-not-showing-stats-aspx-page/

Two things came out from this blog post:

  1. This guy was unable to see his sites, where I was able to see site. But not renderings
  2. Required files were not attached.

Again, as expected. Raised Sitecore support ticket and they accepted it as BUG and provided Hot fix:

To fix the issue, please consider deploying the following patch:
1. Copy the attached Sitecore.Support.398176.dll assembly to the ‘\bin’ folder.
2. Copy the attached Sitecore.Support.Mvc.Statistics.config file to the ‘\App_Config\Include’ folder.

If there are any issues with this patch, please let us know. More information about Sitecore patches can be found here: https://kb.sitecore.net/articles/077333

To track the future status of this bug report, please use the reference number 94421. More information about public reference numbers can be found here:
https://kb.sitecore.net/articles/853187

Files can be downloaded from here :https://goo.gl/18BGgV

It worked? Awesome!

So, what was the issue? I am glad you are still reading. Lot of folks might have closed for the day. But I appreciate yo being curious to ask basic question “Why?”. Let me share what I understood:

  1. It looks recording stats information was not done for MVC pipeline or it might have been done at wrong place which was not working – Sitecore guys know it better. I am just assuming it here
  2. There are two IMP. pipeline in MVC <mvc.renderPlaceholder> and <mvc.renderRendering> where this guys have hooked code for recording that information e.g.    Statistics.AddRenderingData(…)

Special thanks to Pushpraj Ruhal (Sitecore support) guy who worked on this issue

May 27, 2016 / kiranpatils

How I learnt Sitecore MVC?

Challenge:

Before few months back. I started delving in to Sitecore MVC. Before that I knew basics of it. But no hands on. As I was busy with launching other site. Initially when I searched I found the lot of articles and blogs which scared me! You too?! Google can give you results. But which are best and which are not. You can find it out either trying or finding out other folks who already tried and provide good articles. So, while working I took some notes and I promised my self that once I am done I will share with you. So, you may get benefited out of it.

Sounds interesting? You are also searching for something like that? Then go ahead..!

Solution:

As per my practice. I started understanding ASP.NET MVC. Because i always believe in starting from basics. And following links helped me to do so:

  1. http://www.asp.net/mvc/overview/getting-started/recommended-resources-for-mvc
  2. http://www.asp.net/mvc/videos/pluralsight-aspnet-mvc-5-fundamentals
  3. https://mva.microsoft.com/en-US/training-courses/introduction-to-asp-net-mvc-8322?l=nKZwZ8Zy_3504984382
  4. http://www.w3schools.com/aspnet/mvc_intro.asp
  5. http://www.asp.net/mvc/overview/getting-started/mvc-learning-sequence
  6. https://msdn.microsoft.com/en-us/library/dd381612%28v=vs.100%29.aspx
  7. https://msdn.microsoft.com/en-us/library/dd381412%28v=vs.100%29.aspx

Then moved to Sitecore MVC:

  1. http://www.sitecore.net/learn/blogs/business-blogs/technical-trends/posts/2012/06/mvc-and-sitecore-651-overview.aspx
  2. http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2015/02/how-is-sitecore-mvc-different-from-aspnet-mvc.aspx
  3. https://sdn.sitecore.net/upload/sitecore7/72/sitecore_mvc_developer_guide_72-a4.pdf
  4. http://sitecore-community.github.io/docs/sitecore-mvc/
  5. http://sitecore-community.github.io/docs/sitecore-mvc/creating-project/
  6. http://www.joe-stevens.com/2014/08/17/sitecore-mvc-tutorial-creating-your-first-sitecore-mvc-website/
  7. https://github.com/Sitecore-Community/sample-sitecore-mvc

I liked following excerpt from Lars – Especially RCMV and this diagram!

MVC stands for Model, View and Controller, though I have never understood the order of the abbreviation (by my limited intellect, RCMV would have been more appropriate, with a Route being a significant part of the equation).
Essentially, the request lifecycle of MVC is a Route (usually something that parses the http request) points to a Control (some .net code) which generates a Model (object), which is parsed by a View (usually a Razor view).
MVC Request Lifecycle
This approach is distinctly different from Web Forms, because it requires more code plumbing to create the page, and with less automated code reuse. On the other hand, the developer has more rigid control of the code executed on the page, and the data delivered to the output. Also, not to forget, MVC makes unit testing easier as (most of/all) the code usually is executed in the controller part of the lifecycle.

In my opinion, MVC is well suited for web sites with application functionality (e.g. HTML 5 applications).

Okay, enough theory. I know you developers! 🙂 We need some action now. So, thought to look for some quick start application tried lot of things. But few things were out dates or not properly documented. Finally Martina’s video helped me to give a hands on. I strongly recommend you to follow exercise given in tutorial. It will give you good hands on experience. Which will boost your confidence and clarify your concepts a lot!

I faced some challenges in quick start. But life is NULL without challenge. And your best learnings come out of a challenging situation only. Here are few blog posts helped me to come out of it:

  1. http://sitecoreskills.blogspot.in/2014/06/preparing-sitecore-72-and-mvc-in-visual.html
  2. http://www.seanholmesby.com/fixing-visual-studio-intellisense-in-sitecore-mvc-views/ – Especially for Intellisense
    1. If you are using Project and Webroot model then make sure you copy web.config from Sitecore root to project
    2. Make sure Sitecore.MVC is there in reference
    3. Sitecore.MVC and Sitecore.Kernel – Is Copy Local  true
    4. Or final resort copy all webroot/bin assemblies to project/bin
  3. http://stackoverflow.com/questions/24147846/system-web-webpages-html-htmlhelper-does-not-contain-a-definition-for-sitecor/24152053#24152053

MVC is fun! It is like Maths — Once you understand it. You would like to do it again and again!

Further reading:

  1. http://blog.alen.pw/2012/08/learning-sitecore-mvc-part-1.html
  2. http://blog.alen.pw/2012/08/learning-sitecore-mvc-part-2.html
  3. http://www.matthewdresser.com/sitecore/moving-to-sitecore-mvc
  4. http://techitpro.com/sitecore-mvc/http://www.dotnet-tricks.com/Tutorial/mvc/a9P1010113-MVC-Areas-with-example.html
  5. http://www.codeproject.com/Articles/714356/Areas-in-ASP-NET-MVC
  6. https://community.sitecore.net/developers/f/8/t/108s
  7. https://sitecore.unic.com/2015/06/24/the-sitecore-mvc-puzzle
%d bloggers like this: