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 requir

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