Convert Publish files to Sitecore CLI JSON format

I’m currently working on an Sitecore upgrade for a client and this week I needed to upgrade the Scheduled Publishing Module to be compatible with Sitecore 10.3. And whilst the code had been upgraded recently by Nehemiah Jeyakumar, there was no package for it still. I was really keen to use an Item as Resource File (IAR) version, but to do so I’d need an Sitecore CLI JSON file which I didn’t have. There was however a Package.xml file which was used to create previous Sitecore Packages for the module. I wondered if I’d be able to use this to create an Sitecore CLI JSON file but couldn’t find anything online that anyone had done. So I decided I’d write a PowerShell Script to do this for me. You can find this below: The script essentially loads each x-item entry in an Package.xml file, calculates the item path and name … Continue reading Convert Publish files to Sitecore CLI JSON format

My Sitecore SUGCON 2023 Takeaways – Day 2

> DAY ONE – If you haven’t read about Day One you can read it here. SUGCON DAY 2 The 2nd Day of SUGCON started bright an early so after a quick breakfast and cup of tea at the hotel I headed down to the first session I’d planned to see. Rob’s session is one of the key sessions I really didn’t want to miss this year. A few clients I’ve spoken to recently (and other Sitecore Dev’s I’ve chatted to at SUGCON so far) are facing this challenge: ‘How do we move to XM Cloud from XP and what do we need to consider?’ – so I was keen to learn from Rob’s experiences. Migrating advanced Sitecore implementations to XM Cloud – Rob Habraken Rob started with telling us the differences with XM Cloud and explaining how publishing works differently (given you publish to the Edge): Rob then shared … Continue reading My Sitecore SUGCON 2023 Takeaways – Day 2

My Sitecore SUGCON 2023 Takeaways – Day 1

I’ve just got back from and awesome weekend in Malaga at Sitecore SUGCON 2023. If you are not aware of what it is, it’s the developer conference organised by the Community each year to bring Sitecore Developers together in Europe. I’ve been to quite a few SUGCONs over the years but I think this has been one of the best. The talks were really interesting and it was great to catch-up with everyone in the Sitecore Community. I arrived late on Wednesday at the rather impressive Melia near Malaga – right next to the beach. I’ve certainly been to worse locations for conferences. More venue’s like this for future SUGCONs please Sitecore :-). The roof top bar was particularly special – but there was some learning to do before I would be able to enjoy the pool. > DAY TWO – you can read about Day Two here. Day 1 … Continue reading My Sitecore SUGCON 2023 Takeaways – Day 1

What I’m looking forward to seeing at SUGCON 2023

I’m really looking forward to SUGCON 2023 in Malaga in a couple of days time and have decided I’d take an more in-depth look at the conference sessions. At previous SUGCON’s I’ve generally planned the talks I want to go to on the plane flight over, so this time I thought I’d try and do so up-front and share my thoughts on why. Bear in mind that I’m a Sitecore Developer and Consultant so I naturally lean towards more technical tracks. You can find the full agenda here and you can read more about the sessions here. Thursday After the Opening Keynote by Steve Tzikakis and Dave O’Flanagan and the other initial sessions we need to decide on which of the parallel talks to attend. As usual there are a few clashes here, but these are my selections for the rest of the day: Selected Talk Title Rationale Notable Alternative 3:10 pm – 3:55 … Continue reading What I’m looking forward to seeing at SUGCON 2023

Passing Params to the ServicesConfigurator for DI in Sitecore

We are using the IServicesConfigurator interface to configure our services from code and registering it in the <services> section in the Sitecore config. However I had a situation where I wanted to pass some configuration values (to do with a custom cache) to the ServicesConfigurator in order to do something different. This was my ServicesConfigurator class before I made any changes: public class MvcControllerServicesConfigurator : IServicesConfigurator { public void Configure(IServiceCollection serviceCollection) { serviceCollection.AddMvcControllers(“*.Feature.*”); serviceCollection.AddClassesWithServiceAttribute(“*.Feature.*”); serviceCollection.AddClassesWithServiceAttribute(“*.Foundation.*”); //get my param values here } } This was the config for the pipeline:         Normally in Sitecore pipelines we can just set Params in the config of the Pipeline (e.g <useMyCustomCache>true</useMyCustomCache>) and grab them within the pipeline class like so: public class MvcControllerServicesConfigurator : IServicesConfigurator { public string UseMyCustomCache { get; private set; } public void Configure(IServiceCollection serviceCollection) { … if(bool.Parse(UseMyCustomCache)){ //do something here } …  However the this doesn’t work and causes an error like … Continue reading Passing Params to the ServicesConfigurator for DI in Sitecore

Sitecore Technology MPV Award 2023

This week I was privileged to be presented with the Sitecore Technology MVP award for the 6th year in a Row . There are only 241 MVPs Worldwide and just 8 Technology MVPs in the UK (137 Worldwide), all of which have been awarded for: “demonstrating outstanding engagement and support for the global Sitecore community”. It’s a great Community to be involved in and I’ve enjoyed organising and presenting at the Manchester Sitecore User Group over the past year, meeting other Sitecorian’s and sharing my knowledge on this Blog, YouTube, Twitter, SSE and Slack. You can see all the 2023 MVPs in the Directory here: https://mvp.sitecore.com/Directory Why become an MVP? There are many benefits to being an MVP, here are some of them: Being viewed as a global Sitecore expert & community leader Access to early product release / resources / product teams and kick-off webinars Access to MVP discussion forums Regional … Continue reading Sitecore Technology MPV Award 2023

Using ChatGPT to write SPE

Catchy title huh? it Rhymes and everything. Anyway, my Twitter timeline has been non stop about ChatGPT this, and ChatGPT that for the past few weeks – and I’ve seen it doing some pretty cool stuff. I also keep hearing how it’s going to make Software Developers redundant, so it got me thinking about something I do every few days as a Sitecore Developer: “Can ChatGPT write some decent Sitecore PowerShell Extensions scripts?” TLDR: Yes it can. Not terrible anyway. Read on to find out more. Wait, what is ChatGPT? Chances are that you already know what it is else you probably wouldn’t be reading this, but just in case – ChatGPT is an impressive AI Chatbot created by OpenAI (backed by Microsoft & others) that can take inputs and provide some very comprehensive and usually pretty accurate answers. The Tests – How did ChatGPT do? So I fired up my browser, created … Continue reading Using ChatGPT to write SPE

XM Cloud Demystified

I had heard a lot about XM Cloud over the past year or so at SUGCON and from Symposium as well as from the Sitecore Community, however I realised I didn’t really know that much about it still and wasn’t clear on what was included. Given that XM Cloud was officially released for general availability at Symposium it was about time I learned about if properly and answered some of the questions I had. So I dived into the XM Cloud documentation and watched a lot of Videos and setup the local XM Cloud instance to learn more about it. I then decided I’d try and speak at the next Sitecore user group in Manchester on XM Cloud to share what I learned. Nothing like a deadline to force you to learn about something properly huh? :-). You can see the Slides and Video of my presentation ‘XM Cloud Demystified’ below. Update: … Continue reading XM Cloud Demystified

Adding Items to a Custom Sitecore Seach Index using SiteCron

Over the years working with Sitecore I’ve had to create custom indexes and add items to them for most clients I’ve worked for. I’ve generally written a Search Crawler and Search Indexer to handle this but it’s always seemed like a lot of code to manage just to add a few items to an index and temperamental to control the indexing frequency accurately. I’ve also had many issues with Indexes being out of Sync in the past due to Sitecore Events not firing on CD instances etc. I’ve tried various approaches to simplifying this in the past but unfortunately never got this working. However this came up again on a recent project and I was successful this time – so decided I’d share my approach and code. Note in this example I’m using Solr but in Theory this same code should work with Azure Search also. In simple terms the approach … Continue reading Adding Items to a Custom Sitecore Seach Index using SiteCron