Sunday, September 19, 2021

Web Deploy Parameters, a first look

WebDeploy is a foundational technology for SIF, as well as Azure deployments and even Docker (where content packages need to be converted into web deploy packages to build images).  I recently did some digging into the basics of WebDeploy, including how to configure parameters in projects. This short walkthrough shows how to create a web deployment package form a project, how to publish it to an IIS site, and how to add and set a custom parameter.  We'll use this to set the "My Application" text in the MVC scaffold project in Visual Studio.  

Saturday, February 27, 2021

Using Docker Playground to Run Solr

Recently, I wanted to run through some Solr documentation, and I wanted a clean Solr instance with demo contents. I was able to do this pretty cleanly on the Play with Docker site (requires a free Docker account).  

Here are the steps:

Go to Play with Docker:

Click Add New Instance.

Saturday, August 29, 2020

Healthchecks and Sitecore containers

I just figured something out, and thought I'd share it.  I just tried spinning up Sitecore 10 on Docker, using the XM1 configuration, and I saw I was getting this error:

ERROR: for traefik  Container "5530f939e540" is unhealthy.

Friday, May 15, 2020

Using Bucket Search to find empty field values

The bucket search interface is an under used feature in Content Editor, at least underutilized by me.  One of the things that's always thrown me off is the OR vs. AND syntax.  I'm currently doing some discovery using the Helix.Examples site, and I need to clear the related product values.  I thought it would be helpful to be able to see the ones I've already cleared, or the ones that I still have left to do.  (There's just 20, or else I would have installed Sitecore PowerShell Extensions to do this.)

So far, I've cleared the Related Products field on 5 of the 20 Product Detail Page items.  Let's see this in the bucket query:

Okay, let's restrict to my bucketed type, to avoid the Shared Content and the Bucket folders (like "2019"). Type "tem" and tab out the autocomplete to "template"

A weird bit of UI glitchiness is you will just see "Template" (at least it's capitalized now), until you type a colon (:), then you get a little selector field with autocomplete. Select your template type:
 And we get 20 results as expected.

Okay, now let's add the filter by field value. Type a "c" and tab out to "custom", then type a colon to get the field selector:

Now type "r" and select "related products" which brings up this:

Type an asterisk after the pipe symbol to select any non-empty value:

Why did we get 20 results if 5 items have been cleared? The field is not empty condition is getting treated as an "OR" condition, so the template condition is causing the undesired fields values to be included.  By clicking on the magnifying glass icon next to "Related Products", we can make that an AND condition, and now we get 15. Nice!

Click it again to make it a NOT condition, and now we have only those items with that field empty, and now we get 5.

And you can see in your Search log what is going to Solr. OR, AND and NOT syntax bits called out below:

That was a lot of screen shots for a pretty simple feature, but I've always found the autocomplete a little perplexing, especially the bit about having to type a colon to make the field selector logic appear, and needed to click the condition into AND mode.

Happy Sitecoring!

Sunday, August 25, 2019

Overview of the Commerce 9.1 SIF Installation Process

The Sitecore Commerce installation really puts SIF through its paces, and a number of things can go wrong along the way. Having a clear sense of what the script is doing, how it is structured, what the bumps are, and how to pick thing up after an error can make a big difference, so I thought I'd share my experiences. These notes are based on the Commerce 9.1 installation, though I touch on what has changed since 9.0. I hope to look at the recently released 9.2 installation process in a future post.

Monday, July 10, 2017

Using Powershell to find duplicate IDs in serialized items

On my current project I was troubleshooting a failing integration test that makes use of the Sitecore FakeDB Serialization module, which can declarative load a branch of content directly from the file system. The setup method for this test was reporting a duplicate key exception, so I used PowerShell to identify the culprit.

Saturday, April 22, 2017

Readable Tests

There's a great little chapter in Growing Object Oriented Software Guided by Tests on how to write helper methods for building complex test data. The specific techniques are somewhat less relevant in a post AutoFixture world, but the chapter also makes a powerful case that test code should read as English prose.

Monday, January 2, 2017

First steps with SpecFlow and Selenium

I've always been a Unit Testing guy, but reading Growing Object Oriented Software Guided by Tests really brought home the role an acceptance test outer structure can play in an iterative development process.

Wednesday, November 9, 2016

Zapping Solr Cores with Powershell

Imagine you've been working on a feature that creates Sitecore Solr indexes with SIM. Three's a lot of testing that goes into that.

Wednesday, November 2, 2016

Disposing of a DLL

So I've been working on a feature for Sitecore Instance Manager to automate installing Sitecore instances with Solr turned on.  This has been pulled in to the Develop branch of SIM and should hopefully hit the downloadable version soon.