[EXCONTRANS-312] i18nFields contain fields from subnodes, despite not including them - NPE on download Created: 18/Dec/18 Updated: 24/Mar/20 Resolved: 18/Dec/19 |
|
| Status: | Resolved |
| Project: | Content Translation Extended (CTX) |
| Component/s: | Translations.com Translator |
| Affects Version/s: | 2.0.3 |
| Fix Version/s: | 3.0.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Sascha Oberhuber | Assignee: | Teresa Miyar |
| Resolution: | Outdated | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Magnolia 5.6.X |
||
| Attachments: |
|
| 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
|
| Date of First Response: |
| Description |
|
Hi all,Hi all, The scenario for this first one is as follows:I have a content app, and add a node from that content app to a batch. I only add a single node, "include subnodes" is disabled in the dialogue. I choose a few random target languages that are known to work. The xliff on each mgnl:translationSubmission node looks fine; It contains a correct reference to the node I added to the batch, as well as the correct number of trans-units. Note that in this context, the i18n-enabled text field properties carry the same name as the one in the parent node ("displayName"). From what I gather from the logs and reading the code, the error happens in SetTranslationCommand:
private void setTranslatedI18nItem(List<I18nItem> i18nFields, NodeList elementsByTagName) { for(int i = 0; i < i18nFields.size(); ++i) { I18nItem i18nItem = (I18nItem)i18nFields.get(i); i18nItem.setTranslatedValue(this.getTranslatedValueFromNode(elementsByTagName.item(i))); } }
This seems to expect just as many trans-unit elements in the xliff as there are subnodes in i18nFields. But they don't match, as i18Fields also contains values from the subnodes. Attachments:
|
| Comments |
| Comment by Teresa Miyar [ 18/Dec/19 ] |
|
Issue not present on 3.0.1 |