[MAGNOLIA-7491] Decoration is not working for dialogs with a presenterClass defined Created: 26/Sep/17 Updated: 24/Apr/19 Resolved: 05/Apr/19 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 5.5.6 |
| Fix Version/s: | 5.5.14, 5.6.10, 5.7.3, 6.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Mercedes Iruela | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.25d | ||
| Original Estimate: | Not Specified | ||
| 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
|
||||
| Release notes required: |
Yes
|
||||
| Date of First Response: | |||||
| Epic Link: | Support | ||||
| Sprint: | Features 8 | ||||
| Story Points: | 5 | ||||
| Description |
|
When trying to decorate workflow:publish it is not working and the following error is thrown:
Caused by: java.lang.ClassCastException: info.magnolia.ui.dialog.formdialog.FormDialogPresenterImpl cannot be cast to info.magnolia.module.workflow.action.WorkflowFormDialogPresenter
at info.magnolia.module.workflow.action.OpenPublicationDialogAction.execute(OpenPublicationDialogAction.java:57)
at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:62)
... 124 more
Exception is thrown because the expected presenterClass is not returned by info.magnolia.config.registry.decoration.CachingDefinitionDecorator.decorate(DefinitionProvider<T>) (this method is returning decorationResult, but decorationResult didn“t have the good definition). Definition app display the expected configuration, the decoration is correctly done. It is easily reproducible. Create file /<my-light-module>/decorations/workflow/dialogs/publish.yaml with this content:
form:
tabs:
comment:
fields:
comment:
required: true
When you try to publish a page from pages, it cannot be done because an error comes up and the dialog is not displayed. |