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

Null pointer for non-internationalized sites

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 3.2.8
    • None

    Description

      When trying to push changes to a site which is not internationalized exceptions are thrown in the log. The changes still get pushed correctly but having the null pointer exception isn't ideal.

      Reproduce

      • Set up a new site which relies only on the default fallback site definition.
      • Create a live copy.
      • Push changes.

      Actual
      A null pointer is thrown when trying to read the i18n configuration from the site definition.

      2022-07-13 10:48:46,689 INFO  vecopy.actions.PropagateMasterContentChangesHelper: Checking if childNodes for: /home0 should be deleted
      2022-07-13 10:48:46,734 ERROR info.magnolia.commands.MgnlCommand                : An error occurred while rewriting links for slave page due to:
      java.lang.NullPointerException: null
      	at info.magnolia.livecopy.actions.rewire.StandardRewirePageLinksHelper.rewriteLinksForNode(StandardRewirePageLinksHelper.java:95) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
      	at info.magnolia.livecopy.actions.rewire.RewirePageLinksHelper.rewritePageLinks(RewirePageLinksHelper.java:59) ~[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:?]
      	at info.magnolia.commands.MgnlCommand.executeSynchronized(MgnlCommand.java:80) ~[magnolia-core-6.2.21.jar:?]
      

      Expected
      We should check for null at this line.

      Notes
      This issue only occurs after I remove the lines for compatibility support. See LIVECOPY-324. My site is using mtk2 template definitions.

      The feedback I get is that an internationalized site is required. There is no mention of it in the documentation. From a technical point of view the code still works without it. Maybe this could be replaced with a warning or doc update.

      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