[MGNLCTS-81] TranslationFileDownloadCommand not working in content apps Created: 03/Aug/16  Updated: 11/Apr/17  Resolved: 20/Mar/17

Status: Closed
Project: Content Translation Support
Component/s: None
Affects Version/s: 2.1.4
Fix Version/s: 2.1.7

Type: Bug Priority: Critical
Reporter: Ruth Stocks Assignee: Ilgun Ilgun
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 0d
Time Spent: 1d 5h
Original Estimate: Not Specified
Environment:

Windows 10


Attachments: XML File config.modules.contacts.xml     XML File config.modules.content-translation-support.xml    
Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Documentation update required:
Yes
Date of First Response:
Sprint: Basel 87
Story Points: 5

 Description   

The procedure for enabling CTS in content apps is documented at https://documentation.magnolia-cms.com/display/DOCS/Content+Translation+Support+module#ContentTranslationSupportmodule-Enablingcontenttranslationincontentapps. It works until you download the file and get a PathNotFound exception.

My configuration files are attached to DOCU-737.

Tested on Magnolia 5.4.8 SNAPSHOT and CTS 2.1.4 SNAPSHOT

Findings from the assignee

It turns out that the main problem is not to have workspace passed from action to the command. Once this achieved the main problem is solved.
Moreover, we have another problem with M.5-5-3 version which the DefaultProperty is not present anymore and replaced with ObjectProperty thus, the check in the code against DefaultProperty was not triggered and therefore the command was not working out of the box only for >= 5.5.3 version. These quirks are fixed now with the related PR.

Documentation Update

Labels should be present, otherwise fields will not be exported.
Workspace and formPath has to be defined in info.magnolia.module.contenttranslationsupport.commands.TranslationFileDownloadCommand under contentTransporter.



 Comments   
Comment by Edwin Guilbert [ 19/Dec/16 ]

This is not working on Magnolia 5.4.4 / module version 2.1.2 either.

I attached the error I get on the original bug (mistakenly marked as fixed for 5.4.4/2.1.2), basically its always looking in the website workspace no matter what you configure inside the custom download translation command. I also attached all the config files needed to test it in the contacts app.
Note: I tested it on 5.4.10 and is not working either.

Comment by Federico Grilli [ 20/Mar/17 ]

2.1.7 CTS release QA: When trying to export a contact translation (using the bootstrap files provided by Ilgün) we get a NPE both on 5.5.2 and 5.4.11.
Nothing appears in the logs. Setting relevant classes at DEBUG level one sees

DEBUG  info.magnolia.module.contenttranslationsupport.commands.TranslationFileDownloadCommand 20.03.2017 16:27:40 -- Starting export of website path /ppicasso.
DEBUG  info.magnolia.module.contenttranslationsupport.dialog.action.TranslationFileDownloadDialogAction 20.03.2017 16:28:55 -- Executing command [downloadContactTranslationFile] from catalog [contenttranslationsupport] with the following parameters [{path=/ppicasso, outputStream=java.io.FileOutputStream@76170fe8, repository=contacts, fileFormat=csvExporter}]...
DEBUG  info.magnolia.module.contenttranslationsupport.commands.TranslationFileDownloadCommand 20.03.2017 16:28:55 -- Starting export of website path /ppicasso.
DEBUG  info.magnolia.module.contenttranslationsupport.dialog.action.TranslationFileDownloadDialogAction 20.03.2017 16:28:55 -- Command execution failed after 5 ms 
DEBUG  info.magnolia.module.contenttranslationsupport.dialog.action.TranslationFileDownloadDialogAction 20.03.2017 16:28:55 -- Translation dialog command execution failed.
Generated at Mon Feb 12 00:33:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.