[MAGNOLIA-6180] i18nContentSupport fails to get translated MultiValueField Created: 22/Apr/15  Updated: 19/May/22  Resolved: 19/May/22

Status: Closed
Project: Magnolia
Component/s: i18n
Affects Version/s: 5.3.7
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Pierre Sandrin Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File Dialog-Configuration.jpg     JPEG File JCR-browser.jpg     JPEG File Komponent-Multivaluefield.jpg     File seminarList.ftl     Text File workaround-in-java.txt    
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   

Hello Magnolians,

when I want to retrieve a MultiValueField property from a node in a language other than the default one the I18nContentWrapper fails to deliver it.
I attached the freemarker script and screenshots from the JCR Browser and the dialog configuration.

It seems that the Problem is caused by the isEmpty() Method in I18nContentWrapper:398. It checks only for String Value and not for Values[].

To reproduce:
Node contentNode = contentMap.getJCRNode();
Value[] values = contentNode.getProperty("seminars").getValues();
if the language is not the default one and the property "seminars_fr" exists an exception is thrown by the isEmpty() method.

I wrote a workaround in a model class that works, but it s not nice because I do what the I18nNodeWrapper should do. (See attached file)



 Comments   
Comment by Roman Kovařík [ 19/May/22 ]

Hello,

This ticket is now marked as closed due to one of the following reasons:

  • A long period of inactivity
  • Uses an old or Beta version of an application, module, or framework that we no longer support
  • The issue is no longer reproducible or has been fixed in later versions

If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you.

Thank you,
The Magnolia Team

Generated at Mon Feb 12 04:12:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.