[MGNLFORM-287] Component "formSummary" do not work correctly on Windows Created: 10/Aug/16  Updated: 31/May/21  Resolved: 31/May/21

Status: Closed
Project: Magnolia Form Module
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3.3

Type: Bug Priority: Major
Reporter: Zarko Ivanoski Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: form, forms
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
supersession
is superseded by MGNLFORM-277 Summary component - do not display co... Closed
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   

Component "formSummary" do not work correctly on Windows when need to display data from "formSelection" component.

Problem is that in the text area of "formSelection" where labels and values are added, new line separator is always "\n". But then in "info.magnolia.module.form.templates.components.FormSummaryModel", new line separator is choose dynamically with "System.lineSeparator()" and for windows this is "\r\n".

Changing the "LINE_SEPARATOR" static field in the model class to use "\r\n|\r|\n|\x0085|\x2028|\x2029" same as in "formSelection.ftl" should fix the issue.

How to reproduce it:
Deploy Magnolia 5.4.8 on Windows. Open page "/travel/book-tour/meal" and add component "formSummary". Then go to the page "/travel/book-tour", fill some data in the form and select some checkboxes. Click on "Next Step" and in the "formSummary" component, values from selected checkbox and select fields will not be shown.



 Comments   
Comment by Jan Haderka [ 31/May/21 ]

Fixed by changes inĀ MGNLFORM-277

Generated at Mon Feb 12 05:38:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.