Showing posts with label Sitecore. Show all posts
Showing posts with label Sitecore. Show all posts

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!

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.

Thursday, September 15, 2016

Another Look at Sitecore and Unit Testing

At Sitecore Symposium 2016, I will be giving a talk on unit testing in Sitecore. The focus of this talk is on the notion of testability.

Tuesday, June 14, 2016

Debugging and Creating PDBs with ReSharper

Being able to debug Sitecore code is an important skill for supporting Sitecore solutions.  There have been a number of excellent articles on how to do this, but they typically describe using JetBrains DotPeek product as a "symbol server". (See http://bilyukov.com/debugging-sitecore-dotpeek/, and https://jammykam.wordpress.com/2015/01/11/how-to-debug-sitecore-kernel-in-visual/). An alternative, which I find somewhat simpler, is to use ReSharper to generate PDB files, and place those in your solution bin directory. I will walk you through that approach in this article.

Wednesday, November 18, 2015

Custom Sitecore Log files

Starting with Sitecore 6.2, and especially since Sitecore 7 we've seen an increase in specific log files: WebDAV, Crawling, Search, Publishing, FXM. This is completely configurable, and can be leveraged to keep your application logic separate from the Sitecore log file while still using Sitecore's logging capabilities.

Wednesday, November 4, 2015

A RoboMongo Trick

RoboMongo is a nice tool for digging around xDB databases. It provides the full feature set of the JavaScript shell (you can save variables, run help commands, etc.) and allows you to do things like edit documents directly through the JSON display.

Wednesday, October 21, 2015

Unit Testing an Event Handler with Sitecore.FakeDB

In my last post, we looked at how to make an event handler unit testable by wrapping an interface around the Sitecore log, so that we could use NSubstitute to verify the calls made to it.

This only part of the story, of course. For our tests to be meaningful, we need to be able to "arrange" the input that goes into our code, before we make it "act" and before we "assert" how it should behave. Since we are building an ItemSaved handler, we need a way to create Sitecore items in our unit tests.  There is a tool, Sitecore.FakeDB, that makes this straigtforward.

Wednesday, October 14, 2015

Testable Event Handlers using Sitecore's Configuration Factory

It's a not widely know feature of Sitecore configuration that it allows you to specify parameters for event handlers and pipeline processors. This can be used in combination with wrapper interfaces to write unit testable Sitecore code.

Sunday, February 8, 2015

MongoDB for Sitecore

Starting with Sitecore 7.5, MongoDB has become an integral part of the Sitecore ecosystem. This post will walk developers through the process of installing MongoDB, and cover some of the basics of MongoDB CRUD operations, and then look at how to access Sitecore data with MongoDB.

Monday, February 10, 2014

Solr Cores and Custom Indexes

My adventures with Solr continue!  I was working recently on a feature that required sorting results by the value of a field of a linked item.

Tuesday, October 8, 2013

Social Connected's SynchronizeData Task

This came up while I was putting together demos for my talk. I wanted to click a Like button, and see if I could get it to trigger a change in personalized content, without having to log back in. This might be helpful for keeping profile information current on browsers such as Chrome that keep you logged on forever.

Thursday, May 23, 2013

Setting up Solr with Sitecore 7

This is a brief walk through for people who have heard the buzz (can you say "scales to billions of documents"?) about Solr and Sitecore 7 and want to get it working on their desktop.  This is based on the instructions in Sitecore's Search Scaling Guide, with a few details about the initial Solr install filled in.

Tuesday, March 19, 2013

A Peek at Sitecore 7

The part that got me most excited about becoming an MVP this year was the chance to see “technical previews of Sitecore software,” and I started feeling like a kid on December 24th when John West’s blog posts on Sitecore 7 started appearing.

Monday, January 28, 2013

ReSharper Shortcuts Every Sitecore Developer Must Know

If you support a Sitecore installation, you need to be on very comfortable terms with a decompiler. There are several reasons why:

Saturday, January 26, 2013

Sitecore NUnit Testing Simplified

There's been a lot of interest paid in the last couple of years on how to run NUnit tests against Sitecore.

Sunday, January 13, 2013

Sitecore Unit Testing and Auto Include Config Files

I'm working on a open source project that involves running NUnit tests against Sitecore. I had originally set these up using the CodeFlood Test Runner, which creates a simple ASPX page for running NUnit tests so they have access to HttpContext. My partner on the project, Mike Edwards, pointed out this was unnecessary for unit testing Sitecore.

Monday, December 10, 2012

Extending DMS: Symposium Learnings, Part 2

In my last post, I discussed Sitecore's conception of DMS as a nexus for measuring, managing, and optimizing engagement value.  Today I'd like to share some concrete takeaways on how this can be done.  I attended three developer-track talks on DMS, and each reinforced my understanding of how this module can be extended by the developer to tie the customer experience to business value.

Wednesday, October 31, 2012

Sitecore Symposium DMS Learnings, Part 1

With ten sessions and seven concurrent tracks, you have to have a strategy to tackle the Sitecore Symposium.  Mine was to take in as much DMS wisdom as I could, and although Profiles, Personas and Patterns are still gurgling through my head, I came away with a clearer idea of how DMS works, how it can be leveraged, and how it fits in within Sitecore's roadmap.

Monday, September 10, 2012

A Look at Sitecore Social Connected

Social Connected is a free module from Sitecore that allows websites to:
  • Enable visitors to log in with Facebook, Twitter, LinkedIn, or Google+
  • Personalize content based on a visitor's social network profile
  • Post messages to Facebook and Twitter timelines
  • Capture DMS campaign and goal data on social network actions
The module was introduced in October 2011, and has gone through two upgrades, each of which significantly extended its functionality and usability.  The initial release allowed  log in and content related messages, version 1.1 added the ability to send messages directly to users based on DMS goals, and version 1.2, released in July 2012, presents impressive feedback on what happens to those messages, showing share, comment, and retweet activity, and evaluating the engagement value of users who come to site based on Like This and Tweet This links. The rate of introduction of new features shows Sitecore's commitment to the Customer Engagement vision announced at Dreamcore 2011, since it brings this notion of personalization and triggered action into the social networking space.  This post takes a look at how to set up the module, what it can do, and how it can be customized.