[MGNLCTS-132] NullPointerException when two fields we have same key, itemProvider, namePrefix.. Created: 10/Feb/21  Updated: 17/Feb/21  Resolved: 15/Feb/21

Status: Closed
Project: Content Translation Support
Component/s: None
Affects Version/s: 2.5.1
Fix Version/s: 2.5.2

Type: Bug Priority: Critical
Reporter: Teresa Miyar Assignee: Teresa Miyar
Resolution: Fixed Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2021-02-10 at 14.53.17.png     File componentHeading.yaml    
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
Release notes required:
Yes
Date of First Response:
Sprint: Maintenance 44, Maintenance 45
Story Points: 1

 Description   

Steps to reproduce

  1. Create a dialog like the one in the picture
  2. Export and import content using the content translation app

 

Getting NullPointerException when a multivalue field contains extra fields that should not be translated.

java.lang.NullPointerException: null
	at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1470) ~[?:?]
	at java.text.DateFormat.parse(DateFormat.java:393) ~[?:?]
	at info.magnolia.translation.io.TranslationItem$Builder.withLastModificationTime(TranslationItem.java:184) ~[magnolia-content-translation-2.5.1.jar:?]

 

Duplicated keys can be generated with different combination of itemProvider (current, child) and propertyNameDecorator (switchable field) or simple fields (attached example yml):

 

Expected results

Import without an error

Actual results

 

NullPointerException

Workaround

There is no workaround

Development notes


Generated at Mon Feb 12 00:33:32 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.