Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7491

Decoration is not working for dialogs with a presenterClass defined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.5.14, 5.6.10, 5.7.3, 6.1
    • 5.5.6
    • None
    • None
    • Yes
    • Features 8
    • 5

      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.

        Acceptance criteria

              jsimak Jaroslav Simak
              miruela Mercedes Iruela
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 0.25d
                    0.25d