Uploaded image for project: 'Magnolia Personalization'
  1. Magnolia Personalization
  2. MGNLPN-414

ChangeComponentTemplateAction throws NoSuchDefinitionException when changing to component with no dialog

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Neutral
    • None
    • None
    • None
    • None

    Description

      When changing a template to a component that doesn't have a dialog specified (an optional field), a `NoSuchDefinitionException` is thrown by the `ChangeComponentTemplateAction`. This is caused by the following line in the formDialogPresenter callback:

      final String dialogId = templateDefinitionRegistry.getProvider(String.valueOf(itemToEdit.getItemProperty(NodeTypes.Renderable.TEMPLATE).getValue())).get().getDialog();
      

      Since there is no dialog defined for this new component, that line ends up throwing an exception attempting to retrieve the dialog, causing the action to fail.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jspence James Spence
              AuthorX
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD