Posts

Creating a Simple iOS App Using URLSession GraphQL to Fetch Sitecore Items from a Sitecore 10.3 Docker Container

Image
 Introduction After a lot of research and trying to explore Sitecore Headless feature I was able to create a simple iOS APP in order to get the items from Sitecore using GraphQL. In this blogpost I will demonstrate how you can use the Xcode 14.3.1 and the code needed to get the items from the Quiz app we were developing throughout this research. So I will start with the Xcode experience, and afterwards I will continue to see the modifications I do on Sitecore so you can see changes in real life. I needed to do this with two machines, a PC and a MacBookPro in order to demonstrate Sitecore's Headless capabilities.  Developing the iOS APP.  In the following APP, I used the following libraries: SwiftUI and URLSession. SwiftUI is used for the frontend part of the application and URLSession is an Apple library that controls REST requests. So in order for this to work I added a NetworkManager.swift class as follows: // // NetworkManager.swift // SitecoreQuizApp // // Created b...

Troubleshooting Guide: Resolving the 'Cannot Query Field "id" on "ItemSearchResults"' Issue in a JSS App with Sitecore 10.3"

Image
"Unraveling the Mystery: Addressing the 'Cannot Query Field "id" on "ItemSearchResults"' Problem in a JSS App with Sitecore 10.3"Introduction In my previous post I was able to get the items from Sitecore Experience Edge for a single item. If you haven't read that issue you need to read that first before continuing with this one since I explain how to use the sitecore api Key to get the result from a single item. If you want to read that post click here . Now that you have previous background let's dive in to the problem.  The Problem To give a you a little bit of context this is what I was trying to do. I was trying to get all of the item's children from this sitecore item:  /sitecore/content/HeadlessApp/Content/Quizzes .  Here is a picture of the items in Sitecore that should match the Postman's response: Everything belowe the Quizzes folder should have been returned.  However, getting the items from its children was a little bit c...

Guide to Fixing the 'SSC API Key Required' Error while Testing GraphQL Queries from Sitecore 10.3 Using Postman

Image
Guide to Fixing the 'SSC API Key Required' Error while Testing GraphQL Queries from Sitecore 10.3 Using Postman Introduction The new era of technology is now here and everything is supposed to be headless now. A headless Site is exactly what that means, a site with no head. In other words, the site can exists and doesn't matter on which container it exists. Therefore, you can create the same site in different applications, for example iOS, React, Angular, or Android phones. Now that Sitecore claims that it is headless, I decided to give it a try and test it out. If Sitecore is truly headless then there should be no problem with using Postman with a simple GraphQL query to get the items from the database. Also I am using Sitecore 10.3 with JSS Docker Container in order to perform the tests. If you want a guide on how to install Sitecore 10.3 with JSS on Docker containers  click here  . The Challenge  After you follow the steps from the post I linked above, you should be ab...

Eliminate Sitecore Item Duplication Issues in Data Exchange Framework with this Fun Powershell Script!

Image
PowershellScript to avoid Sitecore Items Duplication Background First of all, I know what you all are going to say. How is it possible to have Sitecore Item Duplication if each sitecore item has it's own unique id? I know, it caught me by surprise as well when I was having issues with a third party API that did it as it pleased using the Sitecore Data Exchange Framework. Sitecore Data Exchange framework is a platform that converts any third party API data into Sitecore Items. If you are interested in learning more about this feature that Sitecore offers  click here .  The Problem Let me explain what is the problem I was having. The issue was that in this platform I had the following fields: Id, Time, Refrence, Exchange, Date, Location, headline and many others. The problem with this was that I had an Id field. The Id field, not to be confused with the ItemID field that comes OOTB with Sitecore was the one that was having problems. Everytime I executed the job from the Data Exc...

Are you facing SQL and SOLR Errors when trying to install Sitecore 10.3 with Docker ?

Image
Weird error when trying to install Sitecore 10.3 with Docker Introduction I was trying to install Sitecore 10.3 with Docker containers in my local machine when I found some peculiar errors. The errors were about starting the mssql and solr services. The reason I am writing this post is so it can help others that are having the same issue. Let's start with the baiscs. I was trying to install Sitecore 10.3 with the following link:  Install Sitecore 10.3 with Docker . The Problem Everthing was running smoothly on the installation. The problem starts a few minutes after I run the command: docker-compose up -d When I run the above command everyhting seemed  to be in order and in place. So I said, yeah let's continue and Sitecore 10.3 will be installed within a few minutes. I went for a break and left my laptop running the compose script for about 20min, and when I returned excited to start using the new Sitecore platform I found a surprise. The surprise was that I found errors ...