getTranslationObjectPreview doesn't provide all necessary files | Community
Skip to main content
September 20, 2017
Solved

getTranslationObjectPreview doesn't provide all necessary files

  • September 20, 2017
  • 6 replies
  • 1860 views

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.
Best answer by Sridhar1

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

6 replies

smacdonald2008
Level 10
September 20, 2017

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

September 21, 2017

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();

Adobe Employee
September 21, 2017

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

September 21, 2017

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?

Sridhar1Adobe EmployeeAccepted solution
Adobe Employee
September 21, 2017

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

September 21, 2017

Thank you!