Posts

Redirection in SXA

Image
301 redirect. That's something we use a lot on websites when there is a change in some part of URL. If not, your old URL or bookmark throws 404. So, to achieve the redirection, we can use regex in config file and redirection happens and gives a valid page with 200 response. All good. What if you are using a SXA site and want to do redirections but don't want to make changes to the config because it needs to go through your CI/CD pipeline and its time-taking process. So, SXA comes with an inbuilt redirection module. There are various types of redirections. 1-1 redirection If you have an item in your content tree and the name of that item is changed. So, you want to make a redirection. You can do this by simply adding an item of template:  /sitecore/templates/Feature/Experience Accelerator/Redirects/Redirect . All you have to do is to add an item of this template to your content tree where your old item is present and name it with the old item name. So your request reaches this i

Xhtml Validation Error on Experience editor

Image
Imagine you created your rendering and testing it, but when you open your page in experience editor, you see a red bar that says there is something wrong on the page. This red bar might appear only if you enable validation. Something like this image below: You might get confused because the component seems working fine, but this error raises a lot of concerns as it is on top of the page and your testers raise concerns that there is something wrong on this page.   First thing to do is to take a look at that url shown on the error page, i.e., https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0365101 . The article shows a few examples which might be the case. So please check those in your code and fix if there is any similar usage of html tags. But what if that is not the case and you still see the error?  I have faced this multiple times and banged my head to cushion a lot(Not wall obviously 😜) and found another cause for this error. This is actually simple but n