Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-110515

Can not add a fragment with ${configuration} that has a "text" type field to page

    Details

      Description

      Step to reproduce:

      1. Site admin > Site Builder > Page Fragments
      2. Add a new fragment
      3. Edit the following code
      <div class="fragment-configuration">
      	<button type="button" class="btn btn-primary">${configuration.buttonText}</button>
      </div>
      
      {
        "fieldSets": [
           {
           "label": "Button",
           "fields": [
             {
               "name": "buttonText",
               "label": "Button Text",
               "description": "button-text",
               "type": "text",
      	       "typeOptions": {
                "placeholder": "Set Button Name"
               },
               "dataType": "string",
               "defaultValue": ""
             }
           ]
         }
       ]
      }
      
      1. Publish
      2. Add a page based on Blank
      3. Add the new fragment to page

      Expected Results:
      The new fragment should be shown in page.

      Actual Results:
      Request failed. The following error is thrown in browser console.

      Workaround: Add validation to typeOptions, like this:

          "type": "text",
          "typeOptions": {
              "placeholder": "Set Button Name",
              "validation": {
                  "errorMessage": "",
                  "type": "text"
              }
          }
       

      Reproduced on:
      Tomcat 9.0.17 + MySQL 5.7. Portal master GIT ID: 563dc037f8816938b79492180c370710b845e1e2.

        Attachments

          Activity

            People

            Assignee:
            yang.cao Yang Cao
            Reporter:
            yang.cao Yang Cao
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              36 weeks, 5 days ago

                Packages

                Version Package
                7.3.1 CE GA2
                7.3.2 CE GA3
                7.3.10 DXP GA1
                Master