Uploaded image for project: 'Live Copy'
  1. Live Copy
  2. LIVECOPY-324

Class cast exception when using 6.2 dialog configuration

    XMLWordPrintable

Details

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

    Description

      When using live copy with pure 6.2 template configuration it's not possible to push master changes without throwing exceptions in the log.

      Reproduce

      • Setup two sites using mtk2 and mtk templates.
      • Create a live copy of each site
      • Push master changes on each site to its slave.

      Actual
      The mtk2 based site will produce the following exception on each push:

      2022-07-13 10:12:57,136 ERROR info.magnolia.commands.MgnlCommand                : An error occurred while rewriting links for slave page due to:
      java.lang.ClassCastException: class info.magnolia.ui.dialog.ConfiguredFormDialogDefinition cannot be cast to class info.magnolia.ui.dialog.definition.DialogDefinition (info.magnolia.ui.dialog.ConfiguredFormDialogDefinition and info.magnolia.ui.dialog.definition.DialogDefinition are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @65ae095c)
      	at info.magnolia.livecopy.actions.rewire.CompatibilityRewirePageLinksHelper.getDialogDefinition(CompatibilityRewirePageLinksHelper.java:429) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
      	at info.magnolia.livecopy.actions.rewire.CompatibilityRewirePageLinksHelper.getComponentDialogFields(CompatibilityRewirePageLinksHelper.java:411) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
      	at info.magnolia.livecopy.actions.rewire.CompatibilityRewirePageLinksHelper.rewriteLinksForNode(CompatibilityRewirePageLinksHelper.java:94) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
      	at info.magnolia.livecopy.actions.rewire.RewirePageLinksHelper.rewritePageLinks(RewirePageLinksHelper.java:58) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
      	at info.magnolia.livecopy.command.PropagateMasterContentChangesCommand.lambda$5(PropagateMasterContentChangesCommand.java:101) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
      	at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
      	at info.magnolia.livecopy.command.PropagateMasterContentChangesCommand.rewritePageLinks(PropagateMasterContentChangesCommand.java:99) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
      	at info.magnolia.livecopy.command.PropagateMasterContentChangesCommand.execute(PropagateMasterContentChangesCommand.java:64) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
      

      Expected
      Projects using latest configurations shouldn't be throwing exceptions

      Notes
      Live copy needs a refactoring of its rewiring package. Compatibility classes should be broken out to a separate module. OR there needs to be some configuration at the module level to turn off compatibility mode. Simply calling both isn't an ideal solution for new projects.
      See RewirePageLinksHelper.java#58

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              rgange Richard Gange
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD