Showing posts with label sxa. Show all posts
Showing posts with label sxa. Show all posts

Saturday, May 31, 2025

Sitecore 10.4 SXA Product Issue: Handling Japanese Characters in og:title Meta Tags

Hello All,

Upgrading a Sitecore environment can introduce powerful new features—along with the occasional unexpected quirk. After recently upgrading our Sitecore instance from 10.1 to 10.4, we encountered a curious issue with Japanese language support in Open Graph meta tags, specifically in the og:title and og:description fields.

In this post, I’ll share what we observed, how we investigated it, and what we learned from Sitecore Support. This is especially relevant for teams working with multilingual Sitecore implementations using SXA.


🐞 The Issue: Encoded Characters in og:title for Japanese Content

Our website is primarily in Japanese. Post-upgrade, we found that Japanese text displayed properly on the page and in the <title> tag, but the same text looked strangely encoded in the page source when rendered inside og:title and og:description meta tags.

πŸ” Example:

  • Expected (in CMS and browser preview):
    og:title: レパーァ

  • Actual (in page source):
    og:title: &#12524;&#12497;&#12540;&#12469;

This appeared to be a character encoding issue. The Japanese text was rendered as HTML entities (numeric character references), making it unreadable in the raw HTML.


πŸ’‘ What’s Actually Happening?

  • Webpage Display: Japanese characters show correctly in the visible UI and browser tab.

  • HTML Source View: Open Graph meta tags are HTML-encoded (e.g., &#12524; for “レ”).

  • Impact Scope: Only affects Open Graph meta tags; other fields are rendered as expected.


πŸ”Ž Investigation and Sitecore Support Findings

After escalating the issue to Sitecore Support and sharing reproducible examples:

  • Reproducibility: Sitecore confirmed the issue occurs when non-Latin characters are used in Open Graph fields—particularly on pages set to English language.

  • Bug ID: The issue has been registered as a known bug under SXA-8361.

  • Severity: It’s considered cosmetic—while the source code looks odd, browsers and social media platforms render the characters correctly.

  • Next Steps: Sitecore asked us to evaluate the urgency of a fix, since the bug doesn’t impact how content is displayed or shared.


πŸ€” Why Does This Happen?

Sitecore (like many CMS platforms) sometimes HTML-encodes non-ASCII characters in meta tag content to ensure compatibility with all HTML parsers. While this approach works functionally, it creates visually confusing source code for anyone inspecting it.

Fortunately, most platforms and scrapers (Facebook, Twitter, LinkedIn, etc.) automatically decode these entities when rendering shared content.


⚠️ Should You Be Concerned?

Short Answer: Not in most cases.

✅ You’re likely fine if:

  • Browsers display content as expected.

  • Social media previews correctly render Japanese characters.

  • Search engines can interpret both raw Unicode and HTML-encoded entities, so there’s no SEO penalty.

❗ You should test more thoroughly if:

  • Your systems rely on custom integrations, analytics scripts, or scrapers that directly parse meta tags from the source and expect raw Unicode.


πŸ› ️ What Can You Do?

Here are a few steps to manage the situation:

  • Track the Bug: Follow the progress of SXA-8361 via Sitecore Support.

  • Test Social Sharing: Use tools like Facebook Sharing Debugger or Twitter Card Validator to preview how content appears when shared.

  • Communicate Internally: Inform developers, QA, and content teams that this is a known product issue with no immediate functional impact.

  • Customization (Advanced Option): If raw Unicode output is absolutely essential for business needs, consider customizing SXA’s meta tag rendering pipeline—but weigh the long-term maintenance cost.


🧾 Conclusion

Upgrading to Sitecore 10.4 helped us unlock new capabilities, but also revealed some localized content quirks. Seeing Japanese characters encoded in Open Graph tags may feel concerning, but it’s largely a cosmetic issue.

Sitecore has acknowledged and logged the bug. For now, most users and platforms will experience your Japanese content correctly—even if the page source looks messy.

If you’ve encountered similar localization issues post-upgrade or have advice to share, please drop a comment below or connect with us. Sharing knowledge helps strengthen the whole Sitecore community.

Note: I will share the solution as soon as I receive an update from the Sitecore Product Team.

I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this article if it’s useful for you.

Monday, April 21, 2025

Upgrading Sitecore from 10.1 to 10.4: Overcoming SXA Module Challenges

 

 Hello All,

Upgrading Sitecore from version 10.1 to 10.4 can be a significant step forward in leveraging the latest features and improvements. However, during our recent upgrade, we encountered an issue while upgrading the Sitecore Experience Accelerator (SXA) module. This post outlines the problem we faced and the solution that ultimately resolved the issue.

The Upgrade Process

We followed the official Sitecore SXA 10.4 upgrade guide, which can be found here. The guide provides a step-by-step approach to upgrading the SXA module, ensuring that all necessary components are updated correctly.

The Issue: Step 4 "Update Existing Content"

The problem arose during the fourth step of the upgrade process, "Update existing content." After upgrading Sitecore from 10.1.2 to 10.4, we attempted to upgrade the Sitecore SXA content by clicking the upgrade button. Unfortunately, this action resulted in an error.

Error Description:

  • A PowerShell pop-up appeared without any content.
  • Some sample screenshots:


Here below list of steps after click on upgrade :


Only one left apart from that all completed successfully.

Powershell pop up without any content:





Troubleshooting and Solution

Our team, along with Sitecore support, conducted extensive troubleshooting to identify the root cause of the issue. After a thorough investigation, we discovered that broken links at one of the website tenant levels were causing the problem.

Steps Taken to Resolve the Issue:

  1. Identify Broken Links: We meticulously checked the content for broken links within the affected tenant.
  2. Update Links: Once identified, we updated the broken links to ensure they pointed to valid content.
  3. Reattempt Upgrade: After fixing the broken links, we reattempted the upgrade process.

This approach successfully resolved the issue, allowing us to complete the SXA module upgrade without further errors.

Key Takeaways

  • Thorough Content Review: Before initiating the upgrade, ensure that all content, especially links, is intact and functional.
  • Collaborative Troubleshooting: Working closely with Sitecore support can expedite the resolution of complex issues.
  • Documentation: Always refer to the official upgrade guides and keep detailed records of any deviations or issues encountered during the process.

Conclusion

Upgrading Sitecore and its modules can present challenges, but with careful planning and thorough troubleshooting, these can be overcome. Our experience highlights the importance of detailed content review and collaboration with support teams to ensure a smooth upgrade process.

If you have any questions or need further assistance with your Sitecore upgrade, feel free to reach out!

I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this article if it’s useful for you.

 

 

Wednesday, March 13, 2024

Getting Started With Sitecore SXA Scriban

 Hi All,

We were recently required to create an SXA-based project with the requirement to use the SXA capability with as little code as possible.

I discovered that the SXA Scriban template was really helpful on that trip. The Scriban feature is really helpful, in my opinion. With the SXA Scriban template, there are a tonne of possibilities. We may generate multiple rendering variants by utilizing the Scriban template. 

LiquidJS is a technology used in the Scriban template. With that, we can use plain HTML inside the template and call object values using a syntax similar to MVC by simply placing "{{ }}" in place of dynamic values.

Ex:

 <div class="promo-text">  
   <div>  
     <div class="field-promotext">  
       {{ i_item.PromoText }}  
     </div>  
   </div>  
   <div class="field-promolink">  
     {{ i_item.PromoLink }}  
   </div>  

You need to be aware of the SXA cerating rendering variation before you go on this quest. If not, kindly click the following link to generate a rendering variation.

To begin using Scinban, you essentially need three things:

The embedding functions for the Scriban template may be found at 
https://doc.sitecore.com/xp/en/developers/sxa/93/sitecore-experience-accelerator/the-embedded-functions-for-the-scriban-template.html 

The embedded items and objects in the Scriban context can be found at 
https://doc.sitecore.com/xp/en/developers/sxa/93/sitecore-experience-accelerator/the-embedded-items-and-objects-in-the-scriban-context.html

https://doc.sitecore.com/xp/en/developers/sxa/93/sitecore-experience-accelerator/item-and-field-extensions.html is the URL for item and field extensions.


First, you need to be familiar with the terms used in the Scriban context, such as i_home, i_datasource, i_item, i_site, i_page, o_language, o_model, o_pagemode, etc. To learn more about these terms, click the link below:

https://doc.sitecore.com/xp/en/developers/sxa/93/sitecore-experience-accelerator/the-embedded-items-and-objects-in-the-scriban-context.html

After taking a brief look at the aforementioned URL, you are aware of the fundamental objects that you may utilize in your Scriban template in order to access the things that you require. I_item and o_model, which I utilized the most in our project, are my personal favorites.


We can refer to the following documents to gain access to items and field extensions:

https://doc.sitecore.com/xp/en/developers/sxa/93/sitecore-experience-accelerator/item-and-field-extensions.html

It will be very beneficial for initiating the scriban and obtaining certain fundamental values in the scriban template.

You can search for the embedded function after you have covered these two subjects. Using that, you can use the following url to perform some basic operations, such as retrieving field values, displaying photos, retrieving link values, searching for things, retrieving dictionary values, etc.

https://doc.sitecore.com/xp/en/developers/sxa/93/sitecore-experience-accelerator/the-embedded-functions-for-the-scriban-template.html 

I'm hoping this will motivate you to begin working at SXA Scriban. Please let me know if I can be of any assistance to you. I'd be glad to assist you. We also value your feedback.

I'll try to include additional blogs with Scriban example codes and other proof-of-concept websites built entirely using SXA Scriban, complete with search features, in upcoming blog articles.

I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this article if it’s useful for you.  

Some Other References: Clone an existing SXA component to create a brand new component

https://github.com/scriban/scriban/blob/master/doc/builtins.md