Posts

Sitecore XM Cloud - Language Fallback on Item Buckets

Today, I ran into an intriguing issue while troubleshooting GraphQL queries in a Sitecore XM Cloud implementation. I observed that certain queries were unexpectedly failing to return fallback values in the preview API, despite working seamlessly with the delivery API. After investigating, I realized this behavior occurs specifically with search-based GraphQL queries. Unlike regular content queries, search queries depend on data present directly in the search index. As it turns out, fallback values aren't included in the search index by default. To resolve this, you'll need to explicitly enable item fallback in your search index configuration. Fortunately, Sitecore provides detailed guidance on how to adjust your settings correctly :  This is the patch file you will need to deploy to your XM Cloud environment to enable item level fallback (the same can be done for field level fallback).  <?xml version="1.0" encoding="utf-8"?> <configuration xmlns:pat...

Sitecore Content Hub - Reset Password for Mixed Users (SSO + CH Credentials)

Image
I recently encountered a situation where users who had their accounts created directly in Content Hub and also logged in through Sitecore SSO faced difficulties when attempting to reset their Content Hub credentials. The issue stemmed from the fact that the reset password button disappeared after a user signed in using SSO. In this blog post, we will delve into this problem and provide a detailed guide on how to address it. When a regular user tries to reset their password, they typically see the following interface: However, after the same user logs in via Sitecore SSO, the interface undergoes a transformation and ends up looking like this: Sitecore Content Hub offers users the option to sign in using their Content Hub credentials or their Sitecore Authentication. In theory, users should still be able to reset their regular Content Hub credentials even when logged in through SSO. However, due to the disappearance of the Reset Password button, the only way to achieve this is through t...

Sitecore Powershell Extensions - Upload data to Sitecore from a csv file

Image
As Sitecore developers or content managers working with large amounts of data we often need a way to update items in bulk using CSV files. In this blog post, I'll walk you through how to use a script to update fields in Sitecore items based on a corresponding CSV file entry. In this specific example, we will use Price Codes already existing in Sitecore items and update the corresponding Price field. However, this script can be extended to support different scenarios. The final version of the script is the following: $fieldRequiredValidator = { if([string]::IsNullOrEmpty($variable.Value)){ $variable.Error = "Please provide a value." } } $dialogProps = @{ Parameters = @( @{ Name = "itemPath"; Title="Root"; Tooltip="The root of the items to be updated"; Source="Datasource=/sitecore/content/"; editor="droptree";}, @{ Name = "csvPath"; Value="...

Sitecore Content Hub DAM - Custom Crop Tutorial

In this short video I will show you how you can create custom public links with any dimensions from the Sitecore Connect for Content Hub connector:   

Sitecore Content Hub - Using Transformations on our Sitecore site

Transformations are a very important (and often ignored) feature, it basically lets you crop images on the fly and set the quality of images, without the need of creating custom public links. This is Sitecore's documentation related to Content Hub Transformations , however, how do we actually use these from a Sitecore site?  The short answer is you can't use Transformations using the Sitecore Connect for Content Hub connector. I have talked to Sitecore Support and they added a feature request so that public links inserted from the connector support transformations (reference number 518659).  In the meantime, what we can do, is add the transformations programmatically (I know, it's not the best) but if we want to leverage Content Hub Transformations on our Sitecore sites that's the only thing we can do for now. Sitecore support recommended using something like this in code:  Sitecore.Data.Fields.XmlField imageField = Sitecore.Context.Item.Fields["image"]; str...

Sitecore Tip: Content Author minimum roles

 At a bare minimum, you want your content authors to have these OOTB roles:  sitecore\Sitecore Client Advanced Publishing sitecore\Sitecore Client Designing sitecore\Sitecore Client Authoring You should also have custom roles to further classify your content authors, e.g.:  Site Owner (Content Author "admin" for a specific site)  Workflow Approver/Reader (to push/approve items through workflows) etc

Sitecore | Coveo - Using a Sitemap source that hits a sitemap.xml not publicly accessible

Image
I'm using a Sitemap source on one of my Sitecore implementations because of specific needs of the project where using the Coveo for Sitecore Connector is not an option. This short post outlines the steps to allow Coveo hit a sitemap.xml that is not publicly accessible and that uses an internal certification authority to issue the cert used by the site (which are normal things on lower environments like DEV, QA and UAT).  You will see that the first time you create the Sitemap source it will fail because the sitemap.xml is not publicly accessible, you will get something like this:  In order to fix this issue, whitelist the appropriate IPs:  https://docs.coveo.com/en/1831/index-content/ip-addresses-to-allow-list Once you've whitelisted this IPs you might also get a different error, similar to this one:    This error can happen because the certificate is not valid or because the certificate authority is not trusted by Coveo, luckily there's an easy fix for that. Yo...