Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-3847

When creating a new option template or specification on a product, spaces aren't converted into dashes

    Details

      Description

      Assumptions

      1. At least one catalog

      Steps to Reproduce - Specifications

      1. Create a product (Control Panel → Commerce → Products)
      2. Fill in the required fields and Publish
      3. Go to the Details tab → Add Specifications
      4. In the input box, enter a string with spaces, e.g. Specification with Spaces
      5. Click "Create New"
      6. Look at the specification's key, either by searching for it in the Add Specification box or in the list of Specifications (Control Panel → Commerce → Products → Specifications)

      Expected Result

      The key is autogenerated and replaces spaces with dashes, e.g. specification-with-spaces

      Actual Result

      . They key is autogenerate but doesn't replaces spaces with dashes but instead encodes them as 20, e.g. specification20with20spaces

      Steps to Reproduce - Options

      1. Create a product (Control Panel → Commerce → Products)
      2. Fill in the required fields and Publish
      3. Go to the Options tab → Add Options
      4. In the input box, enter a string with spaces, e.g. Option One Two Three
      5. Click "Create New"
      6. Look at the option's key, either by searching for it in the Add Option box or in the list of Option Templates (Control Panel → Commerce → Products → Options)

      Expected Result

      The key is autogenerated and replaces spaces with dashes, e.g. option-one-two-three

      Actual Result

      . They key is autogenerate but doesn't replaces spaces with dashes but instead encodes them as 20, e.g. option20one20two20three

      Notes

      • The issue is limited to the item finder component. If you create an option template or specification label in Control Panel → Commerce → Products → Options/Specifications, you'll see that spaces are converted into dashes.

      Reproduced On

      7.2

      Tomcat 9.0.33 + HSQL 2.3.3
      DXP 7.2 FP5
      Commerce marco-leo/liferay-portal-ee:7.1.x git hash 81d645a88651067f4dda24f226b90657efa5180f

      7.1

      Tomcat 9.0.33 + HSQL 2.3.3
      DXP 7.1 FP17
      Commerce marco-leo/liferay-portal-ee:7.1.x git hash 81d645a88651067f4dda24f226b90657efa5180f

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pietro.bocale Pietro Bocale
              Reporter:
              corbin.murakami Corbin Murakami
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  2.1.2