Posts

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...

Sitecore Content Hub - Approved Asset Email

Image
 Today I am going to show you how you can have Content Hub send emails to users that belong to a certain user group when an asset is approved.  There are a few steps that need to be followed to accomplish this:  Create an Email Template Create a user group Create the script Create the action Create the trigger So let's get started. There's currently no way to create email templates using the Content Hub graphical interface, therefore, we will use the REST API to do this.  We need to authenticate ourselves to make further calls using the API:  POST: https://{hostname}/api/authenticate Body: { "user_name":"YourContentHubUsername", "password":"YourPassword" } The response will be something like this:  { "token": "b9xxxfeac7fe41234544286e27f5xxxx" } Once you have the token, you can create the email template by using the entities endpoint:  POST: https://{hostname}/api/entities Header:...