Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

getTranslationObjectPreview doesn't provide all necessary files

Avatar

Level 1

Hi,

I need to get preview of a page to send it as a reference to the linguists. Using getTranslationObjectPreview on a TranslationObject should get me a zip which contains an html and supporting css/js files which can be used to preview the page outside AEM instance.

I am getting a zip but which is missing important files and messing up the page formatting which can't be used as a valid reference file. From the code below, the ZipInputStream is converted to a zip file which I can then extract. Am I missing something here? Why are the necessary css/js files included in the zip? Code an preview screenshot below:

@Override

    public String uploadTranslationObject(String jobId, TranslationObject object)

   throws TranslationException {

    

      ZipInputStream inputStream = null;

            try {

                inputStream = object.getTranslationObjectPreview();

            } catch (Exception ex) {

                LOGGER.info("Error while generating translation object preview.");

                inputStream = null;

            }

}

AEM-preview.png

1 Accepted Solution

Avatar

Correct answer by
Level 2

For AEM 6.3 , the fix is part of AEM 6.3SP1 CFP1 release in November

View solution in original post

6 Replies

Avatar

Level 10

Can you point the community to the online doc or sample you are using to base this work on please.

Avatar

Level 1

Sure, here is the Github link:

aem-translation-framework-bootstrap-connector/BootstrapTranslationServiceImpl.java at master · Adobe...

The code snippet of interest starts at line 313:

ZipInputStream zipInputStream = translationObject.getTranslationObjectPreview();

Avatar

Level 2

It's a bug in AEM 6.2. The fix is scheduled to go live in CFP-8 next month.

Avatar

Level 1

Thank you! Can you please confirm if this is also a bug in AEM 6.3? And can I expect a CFP for 6.3 as well next month?

Avatar

Correct answer by
Level 2

For AEM 6.3 , the fix is part of AEM 6.3SP1 CFP1 release in November