Sunday, April 13, 2014

Possible Sitecore Hackathon as part of Sitecore User Group Conference 2014

Back on January 24, 2014 something amazing happened, the First ever Sitecore Hackathon.  9 Teams from various nations took part and had lots of fun.  Thanks to Akshay Sura (@akshaysura13) for arranging the first one.

Its looks like the next one will take place in person at the end of the Sitecore User Group Conference 2014
If you are able to take part please register here.  Also please forward on the registration information to everyone you know.  The more teams taking part the more fun it will be.

Look forward to Twitter commentaries and hearing the results of all the amazing modules that will come out of this.  Also look forward to many more.


Thursday, April 10, 2014

Sitecore 7, The Data Source and the GUID

For those looking at upgrading from Sitecore 6.x to 7.x beware of a subtle advancement that is very beneficial in most situations but a major issue in another.

Scenario #1:  A client is migrating from an existing CMS and pulls the content from the existing cms into Sitecore on a regular basis during migration to reduce the size of the outage windows for Clients.

Scenario #2:  A client injects data into Sitecore from an external system via clearing all the nodes under a certain node in sitecore and then re-imports the content items.

In both these scenarios the Guid would chance for the content item but the path would remain the same.
In Sitecore 6.6, this would work fine as the DataSource property of the sublayout stored the Item Path.

In Sitecore 7.0, a cool advancement was introduced that allowed you to move content around and it would automap the DataSoure much like it does with content links.  Nice feature but in the above scenarios it will break existing SubLayouts.

Workaround: This is not ideal but if you place text in front of the item path eg. "ITEM_PATH:" then sitecore cannot resolve the sitecore path so it will keep the string there.  Then in the sublayout when you grab the DataSource you look for that string and remove it before calling GetItem.  Here is some sample code:

                if (string.IsNullOrEmpty(subLayout.DataSource))
                    return Sitecore.Context.Item;
                string dataSource = subLayout.DataSource;
                Item dataSourceItem = null;

                if (dataSource.StartsWith("ITEM_PATH:"))
                {
                    dataSource = dataSource.Substring(10);
                }

                if (Sitecore.Context.Database.GetItem(dataSource) != null)
                {
                    dataSourceItem = Sitecore.Context.Database.GetItem(dataSource) ??
                                      Sitecore.Context.ContentDatabase.GetItem(dataSource);
                    Log.Info("CurrentContextBased On Data Source (" + dataSource + ")", this);
                }

Alternatively someone could override part of the mechanism to handle "ITEM_PATH:" much like Sitecore itself does currently with "query:"  If someone has created one, and is willing to share it in MarketPlace for others to use, let me know and I will reference it here for others to access.

If you have any tips, tricks or resources you would like to share with the Guild please email them to chris.williams@threepointturn.com or dennis.augustine@threepointturn.com and we will share them with the Guild.


Monday, March 24, 2014

E-Commerce Guild Blog

I would like to take this opportunity to welcome E-Commerce Guild to the Guild family.

This blog shares the same vision as our other Guild sites. It is designed to contain various Tips and Tricks to help you with your development projects, provide guidance, mentoring and assistance in relieving your pain points.

 If you know any Tips, Tricks or resources let us know and we can add them to this blog. If you have a particular pain point that requires assistance let us know as well. Please email us at chris.williams@readwatchcreate.com for assistance.

You can also register at readwatchcreate.com and we will reach out to discuss your needs.

Wednesday, February 26, 2014

Object of type System.Int32 cannot be converted to type System.Web.Security.Cryptography.Purpose

When you open the Sitecore Admin and Try to login you get this error:  


Well John West has the solution. This blog post explains how you can resolve the Object of type 'System.Int32' cannot be converted to type 'System.Web.Security.Cryptography.Purpose' error that you may receive when you try to access a user interface in the Sitecore ASP.NET web Content Management System (CMS) after installing Visual Studio 2012 or .NET 4.5. 

Check out the blog article

Thanks John you saved me some time and hopefully will save others on the Guild some time as well.

If you have any tips, tricks or resources you would like shared with the Guild please email them to me at chrisw_88@hotmail.com and I will post them here.

Saturday, February 22, 2014

Accessing A Sitecore Item From an External Application

In order to access a Sitecore Item outside of Sitecore you need to use the Sitecore Web Services or

Step 1: Register the Sitecore Web Service with your application.  This is done by adding a reference.
You want a web reference not a service reference so be sure to click Advanced and click Web Reference.
The service can be found at

http://{sitecore server url}/sitecore/shell/WebService/service.asmx?wsdl

Step 2: If you require getting item by Sitecore Path then you need to my Sitecore Get Item Id For Item Path Web Service Module in Marketplace. You would place the dll in the right folder and the asmx in the services folder to access it.

Step 3: Connect to the web service and get the item path for the id.  If you already have the path then ignore this step.
                com.scws.itempath.ItemPathService service = new com.scws.itempath.ItemPathService();
                service.Url = serverUrl + "/sitecore/shell/webservice/ItemPathService.asmx";
                string itemId = service.GetItemId(databaseName, itemPath);
                                return "<dataset><item_id>" + itemId + "</item_id></dataset>";

Step 4: Get the item based on the Sitecore Path.  The service returns an xml but you then wrap it in dataset tags and you can stuff it in a dataset to query it.  NOTE: Replace {sitecore_path} with the path you want to retrieve the item for.

            com.scws.Credentials cred = new com.scws.Credentials();
            cred.UserName = userName;
            cred.Password = password;
            com.scws.VisualSitecoreService service = new com.scws.VisualSitecoreService();
            service.Url = serverUrl + "/sitecore/shell/WebService/service.asmx";

            // Verify Credentials
            var xn = service.GetXML({sitecore path}, false, databaseName, cred);
            return "<dataset>" + xn.InnerXml + "</dataset>";

This should work to get your item.  If you have any questions please email Dennis.Augustine@threepointturn.com or Chris.Wiliams@threepointturn.com and we will assist.

Saturday, November 16, 2013

Sitecore MVP Summit Day 2

After breakfast Pieter Brinkmanstarted the conference off with a welcome.



Next was the Keynote featuring Michael and Lars.

An introduction to Who's Who at Sitecore


Out the front of the hotel waiting for the bus for an amazing boat tour on the Venetian Lady

The Venetian Lady was beautiful.


 A Stellar view of the city from the top deck of the Venetian Lady















Roll your own cigars :)

Really good Rum


On the beach preparing for the group photo
 Look at that beach
A conference could not be complete without some John West meme :) 


Everyone I spoke to had an amazing time, thanks Pieter and Marissa for organizing a stellar event.


Thursday, November 14, 2013

Sitecore MVP Summit 2013 - Day 1

Last night was an amazing reception, Pieter and Marissa provided a warm welcome and some amazing shwag.



I immediately put the mobile card holder on my phone and made use of it a lot at the MVP Reception at the James Royal Palm.

We were greeted by strong winds and rains but the friendly staff were on hand with large umbrellas to welcome us in. 



The area has some nice buildings



On Lincoln Road, we found a really good burger place



I got to meet all the Sitecore MVPs from Japan.


The Sitecore Pillow was on hand and brought some of his relatives.  I would love provide a home for one of the to Three Point Turn in Toronto Canada.

Thanks Pieter and Marissa for an amazing first day.  I look forward to breakfast, the presentations today and the evening on the Venetian Lady.  I will post again about this on Day 2.