[MGNLUI-2742] Exceptions on using generic fields with extends on field level Created: 13/Mar/14 Updated: 09/Apr/14 Resolved: 28/Mar/14 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | dialogs |
| Affects Version/s: | 5.2.2 |
| Fix Version/s: | 5.2.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Frank Sommer | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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
|
||||
| Visible to: |
Oliver Emke, Rainer Blumenthal
|
||||
| Description |
|
If you use the extends mechanism for generic fields (see example-config.png), the ConfiguredDialogDefinitionManager throws a ClassCastException. 14-03-13 10:46:40 ERROR AUTHOR[Thread-22]info.magnolia.ui.dialog.registry.ConfiguredDialogDefinitionManager: Unable to create provider for dialog [test-module:generic/extendedField] java.lang.ClassCastException: info.magnolia.ui.form.field.definition.SelectFieldDefinition cannot be cast to info.magnolia.ui.dialog.definition.ConfiguredFormDialogDefinition at info.magnolia.ui.dialog.registry.ConfiguredDialogDefinitionProvider.<init>(ConfiguredDialogDefinitionProvider.java:58) at info.magnolia.ui.dialog.registry.ConfiguredDialogDefinitionManager.createProvider(ConfiguredDialogDefinitionManager.java:117) at info.magnolia.ui.dialog.registry.ConfiguredDialogDefinitionManager$1.visit(ConfiguredDialogDefinitionManager.java:90) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:654) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:656) at info.magnolia.ui.dialog.registry.ConfiguredDialogDefinitionManager.reload(ConfiguredDialogDefinitionManager.java:82) at info.magnolia.cms.util.ModuleConfigurationObservingManager.reload(ModuleConfigurationObservingManager.java:112) Reason is that it tries to registrate the generic field as dialog definition. The prior check on the node is to weak. So it is useless. An instanceof check in info.magnolia.ui.dialog.registry.ConfiguredDialogDefinitionManager#createProvider would make more sense. |