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

Decoration is not working for dialogs with a presenterClass defined

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 5.5.14, 5.6.10, 5.7.3, 6.1
    • 5.5.6
    • None
    • None
    • Yes
    • Features 8
    • 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.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

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