Uploaded image for project: 'Observation'
  1. Observation
  2. MGNLOBS-28

Repository property required in two places for command listeners

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an issue
    • Icon: Critical Critical
    • 2.0.2
    • 2.0.1
    • None
    • Yes

      Per MGNLOBS-26 the repository property is only needed as a command parameter. However, the system expects to find it in two places: under the listener and as command parameter.

      To reproduce:

      1. Import the attached activateAddedPages listener.
      2. Delete the repository property from /modules/observation/config/listenerConfigurations/activateAddedPages/listener/params/repository.
      3. In the Pages app, add a new site root page.
      4. Result: error 1.
      5. Add the property back to command parameters but delete it from /modules/observation/config/listenerConfigurations/activateAddedPages/repository
      6. In the Pages app, add a new site root page.
      7. Result: no error is thrown but the page is not activated.

      Error 1:

      DEBUG a.module.observation.commands.CommandEventListener: Checking event for command info.magnolia.module.activation.commands.ActivationCommand invocation
      DEBUG a.module.observation.commands.CommandEventListener: Command params are {}
      DEBUG a.module.observation.commands.CommandEventListener: Path is /test8
      DEBUG nolia.module.activation.commands.ActivationCommand: Will activate content from null repository with uuid null and path /test8
      ERROR a.module.observation.commands.CommandEventListener: can't execute command 
      java.lang.NullPointerException
      

        Acceptance criteria

              fgrilli Federico Grilli
              ahietala Antti Hietala
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD