Sunday, January 25, 2015

Mr. Roboto Or How A Tester Becomes A Robot

Update: If you are using Sitecore 8.x you do not need the hot fix rather use this fix instead. Disable Robot Detection on a Content Management Server

Dennis Augustine and I were working with a client that all the sudden started to experience loss of login status.  We followed all the usual timeout checks, compared code, compared configurations, tried to find a solid way to reproduce.  We had two test users and everyone was sharing them. With all the testing happening, it turns out that Sitecore detected them as a robot. 

Finally Ken Gray discovered this gem: Sitecore Dialog Timeout Issue

Here are the instructions for deploying the Login Timeout Fix:
  1. Modify the Website\web.config by adding following module to the ‘system.webServer’ section (in case site is running on the Integrated Mode on IIS7

    <- default setting  ; and ‘httpModules’ section in case Classic mode is used) :
    <add type="Sitecore.Web.HttpModule,Sitecore.Kernel" name="SitecoreHttpModuleExtensions" />
    <add type="Sitecore.Support.FixHttpSessionTimeout.CausedByRobotDetection,Sitecore.Support.414299" name="RevertingAnalyticsBotSessionDuration" />
  2. Add the Sitecore.Support.414299 into the Website\bin folder.
If you have any tip, tricks or resources to share with the Guild please email them to chris.williams@readwatchcreate.com 

Wednesday, December 10, 2014

Convincing IT to adopt MongoDb

Jason Carter of Nonlinear Creations and I had an interesting conversation at the Toronto Sitecore User Group about a commonly asked question by IT implementing Sitecore 7.5 and xDB.  Through some quick brainstorming we worked through some of the answers. Below is the results of our discussion.

Issues Raised:
  1. Issue: As a .NET shop, our IT staff do not have the know-how to secure, maintain and support this new technology what are our options?

    Reasoning:
    • Sitecore offers xDB in the cloud.  This hides the MongoDb implementation from you.  They handle licensing, its easy to set up with their wizard and you just pay a subscription.
    • Think about your PVR.  It probably runs linux or some other open source OS but you dont have to worry how it works you plug it in and it saves your shows and you can access them through an API or in most cases a cable that connects to your tv.
  2. Issue: As an open source product, is MongoDb secure?  Look what happened with OpenSSL.

    Reasoning:
    •  MongoDb is storing analytics collection information.  It is NOT storing creditcards or raw transations.  You are probably already using Google Analytics or other web based analytics.and MongoDb is just as secure.  Any collaborative metrics from CRM or financial transations are summarized in the SQL Server database NOT MongoDb which is only for collection.
    • jQuery/javascript is an open source technology that you use for front end.
    • Html is open source.

If you have other issues with or without reasoning let us know and we can see if we can help.

Thanks Jason for the awesome discussion, we hope to see more of these from you in the future.

If you have any tips, tricks or resources please email them to chris.williams@readwatchcreate.com

Sunday, December 7, 2014

Open Letter to Microsoft on why Microsoft Store should run on Sitecore

Interesting story, I went to the Microsoft Store in the United States to buy a Windows 8.1 Pack to upgrade my standard edition of Windows to Support installing Coveo.  As a Canadian, it would not let me purchase.  I spoke to a rep on the site and they said the easiest way was to purchase right through Windows and it would update the product key and install and everything.

I followed these instruction and got the product installed.  4 hours later Microsoft detects my abandoned cart on the site and having my email address from login email me offering me free shipping if I buy it.  How many ways did they get it wrong?

1) When I first arrived on the US site it should have detected my location and opted to switch me to the Canadian store.
2) When they sent the email I already bought the product.
3) I could not buy it from the Microsoft Store in the United States so sending me an email with the link to the United States cart would have frustrated me if I had not already bought.
4) It was 4 hours later after I had already attempted other means.

So what if Microsoft had Sitecore:

1) Sitecore supports IP detection that could then be used to redirect them to the proper site or provide them with an option of going to the Canadian store.
2) As the user is in an engagement plan, when I bought the product it could have bumped the engagement plan to show that state.
3) Using the engagement plan it would have detected the state change from buying it and would NOT have sent me the email offering me a better deal it would have thanked me for purchasing.
4) I guess in this case the Microsoft Marketing people set the delay on it so they could still mess it up.

Ironically, even though it had entered the key and installed the features, almost exactly after I got the email from Microsoft, Windows decided I needed to activate the key.  Not during my install but 4 hours later.  It provided no option to ignore and all I had to do was click the activate link as the product key was already automatically entered during install.

So if Microsoft is interested, Sitecore can do wonders for your store.  Simply implement Sitecore 7.5 with ActiveCommerce or Commerce Server and you are good to go.  Email us at chris.williams@readwatchcreate.com if interested in discussing more.


Thursday, October 2, 2014

Why does position of p tag determine if edit frame will let me edit text in page editor

Ok so if I do this page editor will NOT let me edit the field:

<sc:EditFrame ID="contentEditFrame" runat="server"><p><sc:Text ID="content" runat="server" Field="Document_Content"></sc:Text></p></sc:EditFrame>

If I do this it works:
<p><sc:EditFrame ID="contentEditFrame" runat="server"><sc:Text ID="content" runat="server" Field="Document_Content"></sc:Text></sc:EditFrame></p>

curve ball, this works: 

        <sc:EditFrame ID="titleEditFrame" runat="server"><h1><sc:Text ID="title" runat="server" Field="Document_Title"></sc:Text></h1></sc:EditFrame><br />

so page editor why does the position of a p tag within editframe matter but not the h1 tag?

Can anyone explain?  At least now if your page editor does not work you can check this scenario.

If you have anything you would like to share with the guild please email me at chris.williams@readwatchcreate.com​

Tuesday, August 5, 2014

ParseDataSourceString moved between version 7.1 and 7.2 of Sitecore

If you have upgraded from Sitecore 7.1 to 7.2 or sharing code libraries between 7.1 and 7.2 you may start getting an error message like this:

Method not found:  'System.Collections.Generic.IEnumerable`1<Sitecore.ContentSearch.Utilities.SearchStringModel> Sitecore.ContentSearch.Utilities.SearchStringModel.ParseDatasourceString(System.String)'.

The reason is that the ParseDatasourceString method moved between Sitecore versions.

In 7.1 you would find it in: Sitecore.Buckets.Utils.UIFilterHelpers.ParseDatasourceString whereas in 7.2 it can be found in Sitecore.ContentSearch.Utilities.SearchStringModel.ParseDatasourceString

The solution is to have two versions of your dlls or wrap this call in a third dll you can call from your larger library.  If you have the namespace the same in both projects you can swap them out for each version.

If you have any questions, tips, tricks or resources please email me at chris.williams@readwatchcreate.com

Wednesday, July 30, 2014

Sitecore Saving vs Saved Event and when to use which


One of the developers I am mentoring asked me a good question and I thought I would share the answer with the guild in case you are wondering the same.

The question is related to saving items to an external DB when they are saved in Sitecore.  There are really two ways to handle it.

1) Write an Item Provider and store them in a single location.
2) Use the item save events but which one is the right one to use.

In our case it was more beneficial to use option 2.  Using Saved vs Saving depends on whether the external DB will store any data that will be calculated based on saved data rather than simply saving a copy.  Saved happens after the Sitecore item is saved where as Saving will allow you to perform additional operations on the Sitecore item prior to save.

The other thing to be aware of is that when an item is duplicated it will NOT call the saving or saved events unless the user explicitly hits save.  If you require duplicate items to make it to your database too then you will need to implement this event too.

John West wrote a really good article with sample code as well, called Intercepting Item Updates with Sitecore.

If you have any tips, tricks or resources you would like to share with the guild please email them to chris.williams@readwatchcreate.com and we will post them here.

Wednesday, June 4, 2014

Having Trouble Finding a Sitecore Resource? Why Not Train one.

I recently wrote a quick article on LinkedIn regarding the current shortage of Sitecore talent called Having trouble finding s Sitecore resource.? Why not train one and am getting a lot of good feedback.

If you are interested in learning more on the best way to train a Sitecore resource to help build your team. Please contact us at  chris.williams@readwatchcreate.com and we will help.

On a side note, if you are a .NET Developer working with C# and are interested in working with Sitecore or Dynamics CRM, you can apply for our Mentorship Program.  If accepted, then we will mentor you on Sitecore or Dynamics CRM.  We will provide you with a project to work on with us that will build your skills and allow you to make some money at the same time.

To apply for the Mentorship Program please email your resume along with details on why you want to work with Sitecore or Dynamics CRM to chris.williams@readwatchcreate.com

We look forward to working with you to achieve your goals.