getTranslationObjectPreview doesn't provide all necessary files | Community
Skip to main content
New Participant
Sep 20, 2017 9:29 PM UTC
Solved

getTranslationObjectPreview doesn't provide all necessary files

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;

            }

}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sridhar1Accepted solution
Employee
Sep 21, 2017 10:32 PM UTC

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

6 replies

New Participant
Sep 21, 2017 10:34 PM UTC

Thank you!

Translate
Sridhar1Accepted solution
Employee
Sep 21, 2017 10:32 PM UTC

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

Translate
New Participant
Sep 21, 2017 9:57 PM UTC

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?

Translate
Employee
Sep 21, 2017 9:52 PM UTC

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

Translate
New Participant
Sep 21, 2017 8:12 PM UTC

Sure, here is the Github link:

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

The code snippet of interest starts at line 313:

ZipInputStream zipInputStream = translationObject.getTranslationObjectPreview();

Translate
smacdonald2008
Level 10
Sep 20, 2017 10:52 PM UTC

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

Translate