Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Issue with translation functionality on pages containing composite components

Avatar

Level 2

A scenario involving composite components (Custom component A is included as sling resource in Custom component B) When a page contains this type of composite component, the language copy and translation project for that page are not being created.

I have already added translation rules for the component property in the translation configuration still not working.

can anybody help me to identify the problem?

 

5 Replies

Avatar

Level 6

Hi @Muruganandham,

Do you see any errors in log while you are trying to create a translation project for such pages? Please provide error logs. 

Avatar

Level 2

Hi
  These are the error in log

com.adobe.cq.wcm.translation.impl.process.CreateLanguageCopyProcess Error in creating language copy at  /content/pagePath

java.lang.UnsupportedOperationException: null

              at java.base/java.util.AbstractCollection.add(AbstractCollection.java:267)

              at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:352)

              com.adobe.cq.wcm.translation.impl.TranslationRuleConfigurationFile.isEmbeddedPagesUpdatedInNode(TranslationRuleConfigurationFile.java:1763) [com.day.cq.wcm.cq-wcm-translation:1.6.186]

             

Avatar

Level 6

@Muruganandham 

Looks like something wrong with translation rules. Can you please provide translation_rules.xml and complete stack trace of the exception in log?

Avatar

Level 2

Hi
  This are the error in log

com.adobe.cq.wcm.translation.impl.process.CreateLanguageCopyProcess Error in creating language copy at  /content/pagePath

java.lang.UnsupportedOperationException: null

              at java.base/java.util.AbstractCollection.add(AbstractCollection.java:267)

              at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:352)

              com.adobe.cq.wcm.translation.impl.TranslationRuleConfigurationFile.isEmbeddedPagesUpdatedInNode(TranslationRuleConfigurationFile.java:1763) [com.day.cq.wcm.cq-wcm-translation:1.6.186]

             

Avatar

Employee Advisor

Hi,

 

There are a few things you can check to help identify the problem with language copy and translation project not being created for pages containing composite components:

  1. Verify that the translation rules have been configured correctly: Double-check that the translation rules have been added correctly for both Custom component A and Custom component B. Make sure that you have added the properties that need to be translated and that the correct node paths have been specified.

  2. Check if the language copy settings are enabled for the page: Make sure that the language copy settings are enabled for the page you are trying to translate. You can check this by navigating to the page properties in AEM and looking for the "Language Copy" tab. If it's not visible, you may need to enable it through AEM configuration.

  3. Verify that the custom components have been configured for translation: Check that both Custom component A and Custom component B have been configured for translation. This can be done by navigating to their properties in AEM and ensuring that the "Translation" tab is present.