I am using sitecore 10.3 jss with sxa site. I got error while updating the general link field and save in wesite in arabic version
The last thing I did on the instance is deploying the below redirect processor and when I disable it, the error not come but I did not get what is the wrong with the code
using System;
using System.Linq;
using System.Web;
using Sitecore.Data.Managers;
using Sitecore.Diagnostics;
using Sitecore.Pipelines.HttpRequest;
namespace Murabba.Foundation.LanguageRedirect
{
public class LanguageRedirectProcessor : HttpRequestProcessor
{
public override void Process(HttpRequestArgs args)
{
Assert.ArgumentNotNull(args, "args");
//make sure you are in the right context, and that the pipeline hasn't resolved an item yet
if (args.HttpContext.Request.RawUrl != null
&& Sitecore.Context.Item != null && Sitecore.Context.Database != null
&& Sitecore.Context.Database.Name != "core"
&& !args.HttpContext.Request.RawUrl.StartsWith("/sitecore", StringComparison.OrdinalIgnoreCase)
&& !args.HttpContext.Request.RawUrl.StartsWith("/api", StringComparison.OrdinalIgnoreCase)
&& !args.HttpContext.Request.RawUrl.StartsWith("/jss", StringComparison.OrdinalIgnoreCase)
&& !args.HttpContext.Request.RawUrl.StartsWith("/_next", StringComparison.OrdinalIgnoreCase)
&& !args.HttpContext.Request.RawUrl.StartsWith("/-/jssmedia", StringComparison.OrdinalIgnoreCase))
{
if (!args.HttpContext.Request.RawUrl.StartsWith($"/{Sitecore.Context.Language.Name}"))
{
HttpContext.Current.Response.Redirect($"/{Sitecore.Context.Language.Name}{args.HttpContext.Request.RawUrl}/");
}
else if (!args.HttpContext.Request.RawUrl.EndsWith($"/"))
{
HttpContext.Current.Response.Redirect($"{args.HttpContext.Request.RawUrl}/");
}
else
{
return;
}
}
}
}
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<httpRequestBegin>
<processor type="Murabba.Foundation.LanguageRedirect.LanguageRedirectProcessor, Murabba.Foundation.LanguageRedirect" patch:before="processor[@type='Sitecore.Pipelines.HttpRequest.ItemResolver, Sitecore.Kernel']"/>
</httpRequestBegin>
</pipelines>
</sitecore>
</configuration>
any ideas how to configure what is the issue??