[MGNLUI-6587] Runtime error thrown when populating TwinColSelect from JCR config Created: 02/Mar/21  Updated: 23/Mar/21  Resolved: 23/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.7
Fix Version/s: 6.2.7

Type: Bug Priority: Neutral
Reporter: Federico Grilli Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by MGNLUI-6530 Improve LinkField with a select menu ... 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:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:

 Description   

Steps to reproduce

  1.  on 6.2.7 nightly build, open /travel/contact page
  2.  go and edit any form input field, e.g. Subject

Expected results

The form opens without errors and available validators are populated in the TwinColSelect component according to configuration at /modules/form/config/validators

Actual results

A runtime error is thrown, form opens but validators are not populated

java.lang.IllegalArgumentException: Hierarchical data provider doesn't support non-hierarchical queries at com.vaadin.data.provider.HierarchicalDataProvider.size(HierarchicalDataProvider.java:51)

Development notes

Works in 6.2.6 (see demo). Found out during QA of MGNLFORM-322 but seems unrelated.

The underlying DataProvider is HierarchicalJcrDataProvider but a plain Query object is instantiated at com.vaadin.data.provider.DataCommunicator.getDataProviderSize line #815



 Comments   
Comment by Roman Kovařík [ 02/Mar/21 ]

Caused by https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/commits/d958d6a4919e51ce21b0341805da2ca8a836e0b4#magnolia-ui-framework/src/main/java/info/magnolia/ui/field/factory/AbstractSelectFieldFactory.java (the wrapper would convert the query as a side effect)

Consider reverting this commit and creating a follow up.

Comment by Federico Grilli [ 23/Mar/21 ]

Changes causing this were reverted - no longer an issue

Generated at Mon Feb 12 09:37:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.