Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCU-2701

Update commands docs

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Done
    • Neutral
    • None
    • None
    • None
    • None

    Description

      In commands docs, the section about executing a command in the groovy console contains 2 examples. Option B is not working anymore since the inclusion of webhook in Magnolia 6.2.22. Therefore, docs should indicate accurately that the script from 6.2.22 onwards should be different.

      old
      cm = info.magnolia.commands.CommandsManager.getInstance()
      command = cm.getCommand('activate')
      command.setRepository('website')
      command.setPath('/travel/about/careers')
      command.setRecursive(true)
      command.execute(new info.magnolia.context.SimpleContext())
      
      current
      cm = info.magnolia.commands.CommandsManager.getInstance()
      commandChain = cm.getCommand('activate'); 
      command= commandChain.getCommands().get(0); 
      command.setRepository('website')
      command.setPath('/travel/about/careers')
      command.setRecursive(true)
      command.execute(new info.magnolia.context.SimpleContext())
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              abrooks Adrian Brooks
              jayala Jonathan Ayala
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: