[MGNLFORM-152] Multistep form conditions are not working Created: 04/Feb/13 Updated: 29/Aug/13 Resolved: 24/Jul/13 |
|
| Status: | Closed |
| Project: | Magnolia Form Module |
| Component/s: | None |
| Affects Version/s: | 1.4.7, 2.0.2 |
| Fix Version/s: | 1.4.8, 2.0.3, 2.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Antti Hietala | Assignee: | Roman Kovařík |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Magnolia CMS EE 4.5.7 |
||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| 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 |
|
Conditions in the multistep form are not working. The issue can be reproduced in the demo-features project /demo-features/special-templates/multi-step-form. In the example screenshot a simple radio button choice was added (gender: male/female). When you select one of the choices the form should take the user to the second-to-late step. This is not happening. On submit the next step in the sequence is displayed. |
| Comments |
| Comment by Lukasz [ 21/Feb/13 ] |
|
File NavigationUtils.java public static Iterable<Node> getPageParagraphsOfType(Node page) { Iterable<Node> paragraphList = new ArrayList<Node>(); try { paragraphList = NodeUtil.collectAllChildren(page, new AbstractPredicate<Node>() { @Override public boolean evaluateTyped(Node node) { try { if (node.hasNode("condition")) { return true; } } catch (RepositoryException e) { log.error(e.getMessage(),e); } return false; } }); } catch (PathNotFoundException e) { log.error(e.getMessage(),e); } catch (RepositoryException e) { throw new RuntimeException(e.getMessage(), e); } return paragraphList; } Remember to remove params from the method. |
| Comment by Roman Kovařík [ 24/Jul/13 ] |
|
The patch posted above looks for conditions incorrectly also in subpages and includes all nodes with subnode named "condition" which don't have to be necessary form condition nodes. |