Uploaded image for project: 'Magnolia CLI'
  1. Magnolia CLI
  2. NPMCLI-173

If page directory with ftl doesn't exist when adding component availability, page definition content is completely removed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 2.2.0, 3.0.0
    • None

    Description

      To reproduce, create page and set it's definition as follows:

      title: bucket-list
      templateScript: /bucket-list-module/templates/pages/bucket-list.ftl
      renderType: freemarker
      dialog: bucket-list-module:pages/bucket-list
      visible: true
      areas:
        main:
          availableComponents:
            activity:
              id: bucket-list-module:components/activity
            image:
              id: mtk:components/image
            linkList:
            google-maps:
              id: google-maps-magnolia:components/google-maps
      

      run the command below and observe error:

      jsimak ~/work/magnolia/git/Build/foobar $ mgnl add-availability mtk:components/linkList5 module:page1@main4
      info Created new area main4 at the end of /Users/jsimak/work/magnolia/git/Build/bucket-list-module/templates/pages/bucket-list.ftl
      info Availability for mtk:components/linkList5 added into /Users/jsimak/work/magnolia/git/Build/foobar/templates/pages/page1.yaml
      ERR! ENOENT: no such file or directory, open '/Users/jsimak/work/magnolia/git/Build/bucket-list-module/templates/pages/bucket-list.ftl'
      ERR! Error: ENOENT: no such file or directory, open '/Users/jsimak/work/magnolia/git/Build/bucket-list-module/templates/pages/bucket-list.ftl'
      ERR! 
      ERR! 
      ERR! mgnl: 2.2.1-snapshot node: v9.5.0 os: darwin
      ERR! please open an issue including this log on https://jira.magnolia-cms.com/browse/NPMCLI
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jsimak Jaroslav Simak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD