Details

    • What problem did the customer find?:
      Hide
      From Help Center Ticket: https://liferay-support.zendesk.com/agent/tickets/16521

      When creating a new fragment from scratch (using https://www.npmjs.com/package/generator-liferay-fragments), the empty fragment gets created correctly. When I'm done with it (added js, css, html and thumbnail) the .zip file created by running "npm run compress" won't include the thumbnail file. The same happens when I run "npm run import".

      Steps to Reproduce:

      1- Run "npm run add-fragment"
      2- Edit the new added fragment (add content to the index.html and index.css) and add a thumbnail.png file.
      3- Edit the fragment.json and add the attribute: "thumbnailPath":"thumbnail.png" as follows
      {"jsPath":"index.js","htmlPath":"index.html","cssPath":"index.css","name":"Card","thumbnailPath":"thumbnail.png","type":"section"}
      4- Run "npm run compress"
      5- PROBLEM: The generated .zip file doesn't contain the .png file and therefore the fragment preview is not working.

      Liferay version: liferay.workspace.lcp.liferay.image=liferaycloud/liferay-dxp:7.2.10-sp1-3.0.14
      Show
      From Help Center Ticket: https://liferay-support.zendesk.com/agent/tickets/16521 When creating a new fragment from scratch (using https://www.npmjs.com/package/generator-liferay-fragments), the empty fragment gets created correctly. When I'm done with it (added js, css, html and thumbnail) the .zip file created by running "npm run compress" won't include the thumbnail file. The same happens when I run "npm run import". Steps to Reproduce: 1- Run "npm run add-fragment" 2- Edit the new added fragment (add content to the index.html and index.css) and add a thumbnail.png file. 3- Edit the fragment.json and add the attribute: "thumbnailPath":"thumbnail.png" as follows {"jsPath":"index.js","htmlPath":"index.html","cssPath":"index.css","name":"Card","thumbnailPath":"thumbnail.png","type":"section"} 4- Run "npm run compress" 5- PROBLEM: The generated .zip file doesn't contain the .png file and therefore the fragment preview is not working. Liferay version: liferay.workspace.lcp.liferay.image=liferaycloud/liferay-dxp:7.2.10-sp1-3.0.14
    • What do you think is the root cause? (if known):
      Unknown, asked by SME to escalate to product team on PTR-1332

      Description

      https://github.com/liferay/generator-liferay-fragments#liferay-fragments-cli

      Issue
      thumbnailPath is ignored when compressing the fragment

      Steps to reproduce

      1. Create a fragment project yo liferay-fragments
      2. Add a new fragment collection npm run add-collection
      3. Add a new fragment npm run add-fragment
      4. Copy an image named thumbnail.png into the fragment's directory
      5. Edit the fragment's fragment.json to add the following attribute: "thumbnailPath": "thumbnail.png"
      6. Package the fragment for distribution npm run compress
      7. Note a zip file is generated in builds directory
      8. Unzip it

      Actual results
      The thumbnail.png is not included in the zip

      Expected results
      The thumbnail.png is included in the zip

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                33 weeks ago

                Packages

                Version Package
                7.3.0 CE GA1
                Master