Skip to main content

Posts

Unlocking Sitecore Content Hub: A Guide to Utilizing the Web Client SDK - Part 2

Unlocking Sitecore Content Hub: A Guide to Utilizing the Web Client SDK - Part 2 The previous blog discussed how to authenticate using the OAuth client. The Web Client SDK includes an Entities client for executing CRUD operations—such as reading, creating, updating, and deleting entities—in Content Hub. For more details, you can visit Sitecore's Web Client SDK documentation . Here are some examples of CRUD operations on entities. Create Entities To create the entity, use the EntityFactory to instantiate an Entity, set its properties using SetPropertyValue, and then call the SaveAsync method to save the changes. public static async Task<long> CreateAssestEntity() { IEntity asset = await MClientConnector.Client.EntityFactory.CreateAsync("M.Asset").ConfigureAwait(false); asset.SetPropertyValue("Title", "This is a test Asset"); return await MClientConnector.Client.Entities.SaveAsync(asset).ConfigureAwait(false); ...

SUGCON INDIA 2024

SUGCON INDIA 2024 What is a SUGCON? SUGCON India, the Sitecore User Group Conference India, is an annual gathering that unites professionals, developers, marketers, and enthusiasts from the Sitecore community. As a premier event in the field of customer experience management, it offers a valuable platform for sharing knowledge, insights, and experiences related to Sitecore solutions and digital marketing strategies. Each year, SUGCON India features a diverse array of sessions, workshops, and keynote presentations led by experts and thought leaders from the Sitecore community. Attendees have the chance to deepen their understanding of Sitecore's capabilities, learn about the latest updates and innovations, and network with like-minded individuals. SUGCON INDIA Sitecore User Group Conference (SUGCON) is continuing to bring together Sitecore enthusiasts and professionals. Last year's event in Delhi must have been quite an experience, and it's exciting that this year's SUGC...

Unlocking Sitecore Content Hub: A Guide to Utilizing the Web Client SDK - Part 1

Unlocking Sitecore Content Hub: A Guide to Utilizing the Web Client SDK - Part 1 Sitecore Content Hub allows connections either through a third-party API or via the Web Client SDK.   Content Hub offers the Web Client SDK, which includes an Entities client for executing CRUD operations—creating, reading, updating, and deleting entities. In this blog, we are going to discuss about Web Client SDK.   Authentication is handled through the OAuth client, which must be set up in Content Hub and then configured on the client side. To create an OAuth client, navigate to the settings and click on OAuth clients. Next, click on the " + OAuth Client" icon to create a new OAuth client. Now, input the Name, Client ID, Client Secret (a randomly generated GUID), and Redirect URL. Develop a fresh console application and incorporate the Web Client SDK NuGet package (Stylelabs.M.Sdk.WebClient). Create a new class named MClientConnector and add the ClientId and ClientSecret that were created in t...

Content Hub Insights: Checking Your Sitecore Content Hub Version

Content Hub Insights: Checking Your Sitecore Content Hub Version In previous versions, you could check the Content Hub version by accessing this URL: https://sitecorecontenthubURL/api/status. Visiting this URL would display the product_version. In Sitecore Content Hub, the version was previously displayed, but starting from version 4.2 and above, it will now show the release date. You can find more details here : To check the release date, log in to Content Hub and click the Manage icon on the right-hand side. Now, scroll down to the bottom right corner to see the release date. Also, you can check from this URL https://content-hub-url/api/status/, once you hit this URL then you can check "build_date".

Design Custom Page with Components in Sitecore Content Hub

Design Custom Page with Components in Sitecore Content Hub Login into the Content hub, go to Manage and then click the Pages icon. Next, click the right arrow button on Content Pages to display all the child pages under Content. To add new pages, click on the + Page icon. Add the Name, select the Page type, choose the Master layout, and then click the Add button. By default, Header Zone (Left, Right) and Main Zone will display.  You can copy the Header Zone (Left, Right) and Main Zone using the copy icon. You can update the settings by clicking the row settings button. You can delete a row by clicking the delete icon. To add components, click on the + icon and then select the desired component. I selected the HTML component and enabled the Visible option then click on Add button. Click on Edit of HTML component In the HTML component, add your HTML then click on the save button. Make sure the "Appears in menu" option is enabled in the Info tab to display it in the menu. Now ...

Sitecore Content Hub: Method not found: 'Void Microsoft.Extensions.Caching.Memory..." Error

Sitecore Content Hub: Method not found: 'Void Microsoft.Extensions.Caching.Memory..." Error While attempting to install Sitecore Connect for Content Hub on-premises, following the instructions outlined in the document located at https://doc.sitecore.com/xp/en/developers/connect-for-ch/51/connect-for-content-hub/install-sitecore-connect-for-content-hub-on-prem.html, on Sitecore 10.3.1, I encountered the following error: In order to address this problem, I investigated the troubleshooting steps for Sitecore Connect for Content Hub. Regrettably, the specific issue was not identified during this process.  Consequently, I raised a Sitecore ticket detailing the problem and provided relevant logs and memory dumps for review.  Upon examination by the Sitecore team, it was discovered that there were two instances of "Microsoft.Extensions.Caching.Memory.dll" within the /bin directory. Both files shared the version number 6.0.0.1, but it was apparent that the instance located i...

Sitecore Custom API Issue with Federation Authentication

Sitecore Custom API Issue with Federation Authentication In earlier segments, detailed in Part 1 and Part 2 of the blogs on Keycloak Integration with Sitecore, I introduced Keycloak functionality for CM login. Concurrently, I addressed a necessity to develop custom APIs for retrieving Sitecore users and roles. Following the development of custom APIs, during authentication failures, the API erroneously returned a status code of 200 instead of 401. The problem arose because API requests were being routed through the "owin.identityProviders" pipeline, which was not intended for API usage. Solution: When OWIN identifies a 401 response and the AuthenticationMode is set to "Active," it fails to capture the URL hash included in the request. Another choice is to activate the "Passive" AuthenticationMode, wherein OWIN refrains from actively intercepting 401 responses. In passive mode, your application needs to explicitly issue a Challenge to trigger the OWIN aut...