Posts

Showing posts from September, 2023

Identity Server Throwing Error while upgrading Sitecore Docker Image from 101 to 103

Image
Hello everyone, in this blog we will see one issue regarding Identity Server throwing 404 eventhough the container is up and running.In my case, this is happening when i am trying to Upgrade the Sitecore image from 10.1 to 10.3.We will see the steps, to troubleshoot the issue. Error Encountered : exec's CreateProcess() failed [error=container d40d350982e92e2df17722f254128af302877e86748d58e79fb6a5f2f303139d encountered an error during hcs::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) [Event Detail: Provider: 00000000-0000-0000-0000-000000000000] [Event Detail: Provider: 00000000-0000-0000-0000-000000000000] [Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF70737A1DB: (caller: 00007FF70732E19A) Exception(32) tid(3dc) 80070002 The system cannot find the file specified. CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess] ...

Reading AppRoute Data In Sitecore NEXT JS

Image
Hello everyone, in this blog we will see, how we can read route data from layout service. So let's start. By Default, we have default field in Sitecore for all default page template.That is PageTitle. We can add our own custom fields also.This fields are exposed using Layout Service.Let's see how we can read it. Sitecore structure Layout Service Front End Code to Read Route Data import {Field,useSitecoreContext,Text } from '@sitecore-jss/sitecore-jss-nextjs'; type CustomRouteTypeContext = { route: { fields: { pageTitle: Field<string>; }; }; }; const ReadApprouteData = () => { const {sitecoreContext: {route: { fields },},} = useSitecoreContext<CustomRouteTypeContext>(); console.log(fields); return( <div> <Text field={fields.pageTitle} /> </div>) }; export default ReadApprouteData If you see, we are using the useSitecoreContext hook to retrieve the route da...

More GraphQL Query Example In Sitecore JSS

Image
Hello everyone. In this blog we will see more example of writing GraphQL queries. This is continue part of my previous blog which you can find here So let's start without wasting any extra time. Below is the Sitecore structure which we will be using in our case. Let me give you an overview. We are having going to read children of Social Links folder. There are links item created from two different template. One is Social Link and another one is Footer Link. This is just for example purpose. Social Link template has one Image field named as logo. Below is the screenshot for your reference. Reading Children of Item passed as query parameter in GraphQL If you see above query, we are passing datasource and language as Paramter. Then we are calling children which is responsible for getting all Sitecore items under result object.We are just showing the template name and item name from the result Reading Children of of Item passed as Query in GraphQL with template id filter If y...

Reading Sitecore GraphQL data in Next JS

Image
Hello everyone, in this blog we will try to learn how we can fetch the data from Sitecore using GraphQL and build the component in Next JS application. We will utilize the Tiles component which was build in my last blog regarding GraphQL. The blog link is available Here This is just an example as same component can be developed using Layout service also. Lets see the code for the front end and try to see learn what each code function do. import React from "react"; import { GetStaticComponentProps, useComponentProps, JSS_MODE_DISCONNECTED, GraphQLRequestClient, } from '@sitecore-jss/sitecore-jss-nextjs'; import { StyleguideComponentProps } from 'lib/component-props'; import config from 'temp/config'; type ListItem = { Image : { src : string; alt : string; } TileLink : { target : string; text : string; url : string; } Title : { value : string; } id : string; } const Tiles = (props:...