[MGNLFORM-98] Text fields group has a non required 'group name' but without it the internal fields are not used Created: 15/Aug/11  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia Form Module
Component/s: field
Affects Version/s: 1.2.3
Fix Version/s: 2.2.x

Type: Bug Priority: Major
Reporter: Tobias Mattsson Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: verify
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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   

The edit group field adds a set of edit fields within a group. In the dialog it asks for a group name which is indicated to be optional. The group name is in fact the controlName of the field. When binding the form will look at this paragraph and test for the controlName, if it's not there it will skip the paragraph, and all the fields it contains. If it's there it will be part of the form data with an empty value and its children will be bound as well.

We should either, remove the requirement of having a controlName on this field. Or clearly indicate that it's required, although binding it to the form data serves no purpose.

Note that the group name is also used as an id to the div containing the edit fields.

Original report from user-list:

I think to have found a bug inside [1]
When you build a groupEditField you can AVOID to insert a controlName property because in the dialog is not "required".
Even if you insert it, the "value" when you submit the form is empty.

If the controlName property is not present, the field is skipped.

AND

the validation checks on the following lines (110 and 113) prevents to "look inside" the "edits" node to find nested fields.

SOLUTION (tested):
put the last part of if/else-if/else-if outside the "if" as shown on [2]

------------------------------
[1] http://svn.magnolia-cms.com/view/community/modules/magnolia-module-form/trunk/src/main/java/info/magnolia/module/form/paragraphs/models/DefaultFormDataBinder.java

[2] http://pastebin.com/yGKSNCMH

HTH to anybody else (and maybe next MGNL form module versions!!!)

Matteo



 Comments   
Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

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