Posts

Solution upgrade from Sitecore 9.01 to Sitecore 9.3

Recently I was involved in upgrading a Sitecore 9.01 solution to Sitecore 9.3. This was a Sitecore JSS based solution and it was quiet an interesting journey, so I decided to share with you some of the steps I needed to take to make this happen. Maybe you will run into the same thing. Sitecore databases For development environments in upgrade scenario's, my preference is always to start with a clean vanilla instance of the target Sitecore version. So I started by installing Sitecore 9.3. For an XP Single setup I could use the new Sitecore Installation Assistant with the graphical wizard to set it up. This went very smoothly after I made sure of the right prerequisites like SQL version etc. I would then proceed in upgrading my solution, and deploy it to this instance and serialize the custom Sitecore items with Unicorn after the initial deployment. Visual Studio project updates One of the changes that took most of my time was switching from 'traditional' nuget pack...

Sitecore JSS Layout service extensions

Afbeelding
In my Sitecore symposium presentation in November 2019, I talked about our journey of converting from a MVC based solution to JSS based solution. I shared the key take aways earlier in a previous blogpost . In my presentation I touched upon a few extensions we made in our company that were really helpful for us and might also be interesting for the community to take a look at. So I decided to create a few gists to share them with you. How to create custom content resolver To create a custom content resolver. Next to writing the code to create the resolver, you have to add it to Sitecore. It would end up somewhere in the following location in the Sitecore tree: /sitecore/system/Modules/Layout Service/Rendering Contents Resolvers It should inherit from the following template: sitecore/templates/System/Layout/Layout Service/Rendering Contents Resolver   Then in that item point to the Class and assembly the sources are living in. Then for specific renderings, where you re...

Sitecore databases - an overview

Recently a colleague of mine wanted to know what all the databases around a Sitecore installation are for. While there is some scattered info here and there, and you can find for each database appropriate documentation in the Sitecore docs, there was nowhere a complete (or near complete) overview. This post aims on providing some overview, which might still not be complete with regards to in depth information, but at least helps in getting a better picture. It represent an overview of Sitecore at version 9.2, so is subject to change in the future. Notice any discrepancy or missing database? Do give me a nudge and I'll add it. Core Contains all Sitecore's own item definitions that build up the content editor, and base templates, system items etc. If you want to extend Sitecore core functionality, this is where you go. Access through Sitecore admin desktop / content tree if switched to this database in desktop. Master All your implementation specific content items for ...

Get off my lawn - A journey from Sitecore MVC to the JSS world

A journey from MVC to JSS During Sitecore Symposium 2019 I gave a presentation about our journey as a company and developer community on moving from a Sitecore MVC mindset and specialization towards the Sitecore JSS world. This blog summarizes the most important take aways from this presentation. Working together One of the challenges we faced as a company was finding a good way of working together between front-end and Sitecore back-end developers. Coming from a distant past where we had front-end developers delivered static HTML, CSS and JS files and having a Sitecore developer transforming and migrating this into a Sitecore .NET solution, we evolved into an eco-system where front-end developers started working inside the .NET solution and worked with Razor files and more modern frameworks then JQuery such as AngularJS or React. This was fine for a while, but with Angular coming with newer versions and a need from UX perspective to deliver single page application experiences...

I Robot - Sitecore JSS visitor identification

While working on a Sitecore JSS solution that interacts with our Sitecore solution that hosts some api endpoints for us and add .net session state to cache some user bound data we noticed some unexpected behavior with respect to the session state on our test environments. Our session was configured to expire after 20 minutes of idleness, but no matter what our behavior was: idle or active our session seem to be reset much faster. After much debugging we couldn't find anything wrong with our own code, so we started considering options where maybe Sitecore could influence this. One of the suspects was Sitecore's robot detection mechanism that had given us trouble around session expiry in the past. We started by disabling robot detection. And this indeed seemed to resolve our session disappearing issue. So it was confirmed, we were identified as a robot. Further information proved that indeed, when classified as a robot visitor, Sitecore analytics settings set the session e...

Sitecore JSS - Sitecore first

JSS - Sitecore First! Recently I started a project where we are upgrading an existing Sitecore 9 MVC portal with AngularJS to Sitecore JSS with Angular 7. With this portal being already implemented, and content preexisting in the solution we wanted to start this with a Sitecore first approach. In this approach we create the JSS layout service endpoint that return Json containing the same content a component now renders in the MVC controller rendering, reusing existing content, templates etc. First things first To start, obviously as a Sitecore developer you have to install the Sitecore JSS server components into your environment. After that you create a Sitedefinition like entry for your JavaScriptServices where you register your JSS app and set the start item for your app root. You setup your API key as defined in the JSS doc site . To make sure your Sitecore instance is aware of this app and where in the Sitecore tree it 'lives'. You extend your Sitecore SiteDefin...

Duplicate HTML for responsive views - Placeholders

Duplicate HTML, really? Last week I got a frontend implementation (HTML/CSS/JS) that wasn't quiet to my liking. It contained duplicate HTML for a component that should be displayed on different locations in the HTML to facilitate correct views on desktop and mobile breakpoints. Time limitations on the project didn't allow for the frontender to find an alternative way of removing this duplication and achieving the same result. I didn't feel like introducing device views in Sitecore just for this one component. Luckily the component was in a part of the site that is behind login, so SEO was not a concern. Not only was the HTML the same for the different views of this component, but also its content needed to be the same, and it needed to have the same personalization. For a while I wondered on how to support this in the experience editor, without making the 'content editor' change it's browser window to a different responsive view, nor breaking the look of...

Bringing goal triggering and engagement plans together

Afbeelding
Engagement plans This blog focuses on Sitecore 8.2.x but may still apply to Automation plans in Sitecore 9, although code samples will not work, the general idea remains the same. With this implementation I aimed to enable marketers to trigger engagement plans upon goal triggering in their website. It is already possible out of the box to enroll a visitor in an engagement plan on WFFM form submission, manually or through EXM campaigns. However I wanted to enable our marketers to have more flexibility. For this I designed a mechanism that allows a marketer to hook up Sitecore goals to engagement plans. In this way a marketer can select an engagement plan and state that a user should be enrolled in upon triggering a Sitecore goal.  Item definitions  I started by making templates to enable the marketer in selecting his Sitecore goals and engagement plans to enroll the visitor in. With this setup there is now a connection between goals and plans. A marketer c...

WFFM and Processing server role

Server roles and WFFM A while a go I ran into an issue with WFFM in a setup where we had a separate processing server in our Sitecore server topology. We experienced issues with submitted WFFM data not always appearing in xDB, reports and contact lists. After lots of investigation and debugging, it turned out the Sitecore installation document for WFFM on Sitecore 8.2 update 7 is not correct. It tells you to install the following assemblies in your processing server: \Website\bin\Sitecore.WFFM.dll  \Website\bin\Sitecore.WFFM.Analytics.dll \Website\bin\Sitecore.WFFM.Abstractions.dll The missing piece here, is that you also need to deploy the  Sitecore.Forms.Core .dll to this instance, otherwise the WFFM events in your eventqueue will never be picked up by your processing server. Also your contact lists you want your WFFM contact indexed on will not work. Hope this will help someone that runs into the exact same issue.

Sitecore campaigns and UTM tracking unified

Afbeelding
Sitecore and UTM  A lot of blogs have been written about Sitecore vs Google Analytics and how they can be complimentary. In many of the implementations I have seen, marketers use these tools side by side.  As marketers seem so fond of Google Analytics and have a hard time parting with it to only use Sitecore, I figured, why not make them work at the same time. Marketers seem to be more familiar with setting up campaigns using UTM than setting them up with custom parameters for Sitecore campaigns, so why not make Sitecore work with these UTM parameters as well.  So what I did is make it configurable in Sitecore to hookup UTM parameters to Sitecore campaigns. This blog shows how I did that. Setting up your templates I started by defining a template where you can tie these together. Field1: UTM Source key Single-line text to copy your UTM source key into Field2: Linked Campaign A droptree field with a query, something like this: query:/sitecore/syst...

How to support the GDPR requirements in your Sitecore solution

In the past months GDPR has been a hot topic at my clients and we have had to implement the different GDPR requirements at multiple clients. This involved not only educating everyone involved about what GDPR involves, what it means and how it should be interpreted but also how to support this in Sitecore implementations. A good starting point, that we also used is this nice stackexchange post . It gives an overview of the different touch points in Sitecore and an approach of fulfilling the requirements. This blog post tries to go one step further with some implementation examples, mainly targeted at Sitecore 8 prior to 8.2 update 7. This post does not cover all GDPR topics as some of them are more business and less implementation related, nor does it give full working code examples, but it gives a good indication on the major topics that need to be considered. This post may be updated in the coming period if I receive feedback, to make this a good and even more complete source of in...