Rebuilding Core’s Link Database on Sitecore 9.0 Update 1 generates lots of errors

When rebuilding the Link Database for the Core database on Sitecore 9.0 Update 1 (XP0 configuration), I received 630 errors!

The Link Database rebuild continues, and appears to complete successfully. I didn’t see any problems arising from this, but 630 errors is quite a lot.

I was also able to replicate this on several different development systems for different customers. I even set up a new, unmodified Sitecore 9.0 Update 1 – XP0 instance locally, and replicated the problem. Each system shows 630 errors per Core’s Link Database rebuild. Rebuilding Master or Web databases does not cause this error.

It appears that the issue is to do with deserialising the layout field’s XML during Links Database rebuild. It seems some items must have a layout that is “:”.

I raised this with Sitecore and got a very quick response. Continue reading “Rebuilding Core’s Link Database on Sitecore 9.0 Update 1 generates lots of errors”

Rebuilding Core’s Link Database on Sitecore 9.0 Update 1 generates lots of errors

Glass, ForceRenderField, and the RenderField pipeline

I was recently doing some token replacement of field values using a processor that I was adding to the RenderField pipeline. The problem was, it wasn’t running in Glass. Debugging in Visual Studio, the pipeline was never hit. Standard Sitecore rendering of the field was fine, but Glass – nope. Continue reading “Glass, ForceRenderField, and the RenderField pipeline”

Glass, ForceRenderField, and the RenderField pipeline

XdbModelException: Field could not be found in the model or the field is not enabled for indexing/searching

I was creating a custom segmentation rule predicate for Sitecore 9, and when I tried to create a segment using the rule, I got an error inside Sitecore’s List Manager:

Field could not be found in the model or the field is not enabled for indexing/searching

That’s kind of annoying. What caused this? Well, it was a long, painful odyssey finding out.

TL;DR – If you’re using an extension method to get a facet for your CreateContactSearchQuery method – like Sitecore do – it’s method name must match the Facet Key name. 

No, I’m not kidding.

Continue reading “XdbModelException: Field could not be found in the model or the field is not enabled for indexing/searching”

XdbModelException: Field could not be found in the model or the field is not enabled for indexing/searching

XConnect – Get a contact by their TrackerId…

So, Sitecore 9 has the replaced xDB in MongoDB with XConnect. Fine. Our contacts will be stored there (ultimately, in SQL server). Fine too.

One question though – how do we get the Sitecore.XConnect.Contact object for the current (possibly unidentified) contact?

It used to be that you could get the Contact record from Tracker.Current.Session.Contact, but that doesn’t work any more – that gets the Sitecore.Analytics.Tracking.Contact, which isn’t the same type at the Sitecore.XConnect.Contact which is replacing it. Confused yet?

Well, to make matters worse, the Sitecore.Analytics.Tracking.Contact.ContactId may or may not match the Sitecore.XConnect.Contact.ContactId. I think.

I couldn’t find any information about how to resolve the Tracker ID to the XConnect contact. What’s a boy to do?

EDIT: Sadly, there is a better way than below. Unfortunately, it’s in a different bit of the documentation. See https://doc.sitecore.net/developers/xp/tracking-and-session/tracker/tracking-contacts/contact-facets/update-facets.html

Continue reading “XConnect – Get a contact by their TrackerId…”

XConnect – Get a contact by their TrackerId…

XdbModelException – “The type of this instance does not correspond to any type in the model”

Working with xConnect to save custom facet data, I started getting this error:

An unhandled exception of type ‘Sitecore.XConnect.Schema.XdbModelException’ occurred … The type of this instance does not correspond to any type in the model

Weirdly, the other 3 (nearly identical) facets worked just fine. Tracking down the issue was “fun”…

Continue reading “XdbModelException – “The type of this instance does not correspond to any type in the model””

XdbModelException – “The type of this instance does not correspond to any type in the model”

A brief analysis of the NCSC’s “Top 1000 Passwords” list

So, the NCSC has been running a study on the prevalence of the ‘Top 1000 Passwords’. It’s useful stuff, but I wondered – just how frequent are these passwords? How can they know? Where did this list come from?

I noticed, for example, that the list included baseball, which I gather is a degenerate form of rounders. It’s certainly not what I’d expect on a UK-centric list of passwords. Similarly, chicago, and redsox were unlikely. (There are, however, cricket and wanker, so it isn’t an entirely Americanised list).

I also noticed some passwords – like rasdzv3 – that I couldn’t see any obvious reason for being particularly popular.

Anyway – I wondered – how frequent are these? What was the most frequent? Continue reading “A brief analysis of the NCSC’s “Top 1000 Passwords” list”

A brief analysis of the NCSC’s “Top 1000 Passwords” list

Chrome – OTS parsing error: invalid version tag

I saw this weird warning in Chrome’s DevTools while looking at a site:

OTS parsing error: invalid version tag

Uh-huh. That’s a bit strange. Unable to download fonts? What caused that?

Well, I tried going to the font’s URL – and got the ‘Page Not Found’ page! Well, that’s annoying – but a 404 page is clearly not a font.

However, this site’s error pages return HTTP 200 – so Chrome expects a font…

Make sure your error pages return a correct HTTP status code. If you don’t, it can cause problems. Normally, I find that it’s false positives on automated penetration tests, but this is a new and exciting variation.

Chrome – OTS parsing error: invalid version tag

Scott Helme on SSL Certificates…

Scott Helme has posted a number of interesting blog posts recently:

I mean, he’s a bit of a LetsEncrypt fan, but equally, their certificates are as good as others, and EV Certs and SSL Warranties do seem to be sources of revenue generation, rather than offering something useful.

What I’d really like is an easy way to use LetsEncrypt with IIS; for a long time it has seemed like a second-class citizen. Or maybe scripting is just more awkward in Windows. Either way, it’d be great to have simple tooling to support automatically renewing IIS site certs.

Then we could reduced certificate lifetimes and overcome the problems of the broken revocation process in certificates.

Scott Helme on SSL Certificates…