MSM content structure for XF to support several language variations | Community
Skip to main content
Level 2
October 10, 2023
Solved

MSM content structure for XF to support several language variations

  • October 10, 2023
  • 4 replies
  • 2029 views

Hi, community,

 

On your project (AEM Release 2023.9.13665.20230927T063259Z), we follow a well-known content structure to manage pages and XFs.

 

Content: /content/site/language-masters | |__de |__en - language copy of /content/site/language-masters/de |__fr - language copy of /content/site/language-masters/de /content/site/de/de - live-copy of /content/site/language-masters/de /content/site/gb/en - live-copy of /content/site/language-masters/en /content/site/fr/fr - live-copy of /content/site/language-masters/fr /content/site/ch/fr - live-copy of /content/site/language-masters/fr XF: /content/experience-fragments/site/language-masters | |__de |__en - language copy of /content/experience-fragments/site/language-masters/de |__fr - language copy of /content/experience-fragments/site/language-masters/de /content/experience-fragments/site/de/de - live-copy of /content/experience-fragments/site/language-masters/de /content/experience-fragments/site/gb/en - live-copy of /content/experience-fragments/site/language-masters/en /content/experience-fragments/site/fr/fr - live-copy of /content/experience-fragments/site/language-masters/fr /content/experience-fragments/site/ch/fr - live-copy of /content/experience-fragments/site/language-masters/fr

 

 

However, we found out that languages like nl_be, zh_cn are not correctly handled during the rollout process of XFs. There is an action referencesUpdateXF that rewrites references in the XF during the rollout process. Based on the code of this action, it expects to have language code (not locale) in the XF source path and link to be rewritten. For example:

We have /content/experience-fragments/site/language-masters/zh_de/teaser/teaser that has a button with a link to /content/site/language-masters/zh_de/some-page. We want to roll out XF to /content/experience-fragments/site/cn/zh/teaser/teaser. 

Actual result:

The link is not rewritten. 

Expected result:

The button link leads to /content/site/cn/zh/some-page.

 

During the rollout actions expects that the source XF path looks like /content/experience-fragments/site/language-masters/zh/teaser/teaser and link /content/site/language-masters/zh/some-page. However, it doesn't fix requirements, because the zh language is another variation and is used for another country. 

 

Has anyone encountered the same problem and how did you solve it?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Harwinder-singh

@koha26 You will need a custom rollout config to achieve this. something similar to this one - https://bimmisoi.blogspot.com/2021/07/update-link-reference-inside-experience.html

 

4 replies

kautuk_sahni
Community Manager
Community Manager
October 10, 2023

@aanchal-sikka @a_h_m_imrul , Can you please review this Question and share your thoughts? 

Kautuk Sahni
Shashi_Mulugu
Community Advisor
Community Advisor
October 10, 2023

@koha26 how had you created live copy folders in Experience fragments?

koha26Author
Level 2
October 10, 2023

Let me describe our content management flow. 

We have a 3rd-party translation provider. It's responsible for creating language copies.

If we want to introduce new language (to create a language copy), we will add /content/site/language-masters/de as content source, and all XF source paths (e.g. /content/experience-fragments/site/language-masters/<new_lang>/site/header) to the translation project. As a result of the translation, we will have a language copy for content and XFs.

 

Having content, XFs under the language masters we are able to create live-copies. To do that, we have a custom workflow that helps to create XF live copies from the language masters.

Under the hood, we programmatically create XF live-copy using POST /bin/wcmcommand with "createLiveCopy" command.

As a payload we take a live copy path in the content, find relevant source XF language master path, and target XF path. For example: 
Content: /content/site/ch/de
Source XF language master: /content/experience-fragments/site/language-masters/de

Target XF: /content/experience-fragments/site/ch/de

Shashi_Mulugu
Community Advisor
Community Advisor
October 10, 2023

Understood @koha26 still not optimal way for handling msm in exp fragments, you should be able to manage with lang masters version itself in sites pages and ootb exp fragment core component has capability to pickup localized exp fragment.

 

But to your question , use custom link rewriter with custom sling pipeline option which acts at html rendering level than at each rollout action.. so technically at jcrcontent it will be based on source but while we hit .html url, it will change.

Harwinder-singh
Community Advisor
Harwinder-singhCommunity AdvisorAccepted solution
Community Advisor
October 10, 2023

@koha26 You will need a custom rollout config to achieve this. something similar to this one - https://bimmisoi.blogspot.com/2021/07/update-link-reference-inside-experience.html

 

kautuk_sahni
Community Manager
Community Manager
October 11, 2023

@koha26 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
koha26Author
Level 2
October 12, 2023

Thanks to @harwinder-singh, we will implement a custom rollout config to handle nl_be, and zh_cn links rewriting. 

Regarding second issue that I mentioned above (rewriting fragmentVariationPath), I found that Adobe released a fix in Release 13665 (2023.09):

  • SITES-14773: Experience Fragments: Link Reference does not get updated inside experience fragment.