Posts

Showing posts with the label SXA CLI

Getting 403 Forbidden Error When Using SXA CLI Commands

Image
Hello everyone, In this blog we will see a common error(403 forbidden) that usually comes up whenever we try to push something(Themes related changes) using SXA CLI to Sitecore Instance and how we can solve it. So let's begin. Whenever we use any SXA command like sxa watch or sxa upload which pushes the recent changes to your configure Sitecore Instance and you are getting 403 forbidden access eventhough your minification is showing success as shown below Solution: Just check your z.SPE.Sync.Enabler.Gulp.config file is disabled.If yes, then make it enable as it has configuration for media file upload to instance. Path : wwwroot/App_Config/Include/z.Feature.Overrides/z.SPE.Sync.Enabler.Gulp.config Hope this will help. Thanks for reading. Happy Sitecore learning!!! You can check my other blogs too if interested. Blog Website

Upgrade SXA Themes Using SXA CLI from Sitecore 101 to Sitecore 103

Image
Hello everyone, In this blog we will learn how we can migrate Sitecore npm packages from myget to nuget and also how we can upgrade the SXA CLI Themes from 10.1 to 10.3 version. Recently, I was working on Sitecore 10.3 SXA upgrade project.This was container based application both for local and higher environments. In this project we were using Sitecore SXA CLI 10.1 to push our themese related changes to our Sitecore Instances and we have to upgrade it to 10.3 for the same. We came across two hurdles in that. First of all we have to migrate Sitecore npm package dependecies from https://sitecore.myget.org/f/sc-npm-packages/npm/ to https://www.npmjs.com/package/ . The second hurdle was to update the Themes itself. I will try to provide the approach that we have followed and it has worked for us. Step 1 : We will removed the old sitecore npm package url. In 10.1 we use to set the old url in internal npm configuration. If you want you can manually remove it by navigating to C:/users/{{yo...

Creating New Themes Using SXA CLI

Image
Hello everyone, In this blog we will discuss, how we can create a new theme in SXA using SXA CLI. This will be a short blog so let's quickly start with it. Step 1: Install SXA CLI globally using below command. Navigate to PowerShell and open it using Administrator mode npm install -g "@sitecore/sxa-cli@10.3.0" Step 2: Create a folder in any drive.For us we have created Theme under C drive. Open that folder in PowerShell.Execute the below command one by one. C:\>cd Theme # First we need to register our CM url C:\Theme>sxa register https://sc103.localhost # Command for creating new theme C:\Theme>sxa new customtheme # Some option will be asked. Provide the input as per your need ? The theme will be created for instance based on url https://sc103.localhost. Do you want to specify a different url? no # Will ask you to login to Sitecore instance ? Enter your login {username} ? Enter your password [hidden] {password} # Will ask y...