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

Embedded Form in Web Content Template is rendered twice

    Details

      Description

       Reproduction Steps:

      1. Set up DXP 7.2 and log in as admin
      2. Put an Asset Publisher on a test page
      3. Go to Content & Data / Forms and add a new form, including a simple text field and publish. Copy the form ID for later use.
      4. Go to Content & Data / Web Content and create a new web content structure with a text field.
      5. Go to this field's Settings tab and set its Field Label attribute to 'FormId' (the Name attribute shall be changed automatically, accordingly).
      6. Add a new template for this structure with the following source:
        <#if FormId.getData()?has_content>
        <@liferay_portlet["runtime"]
        defaultPreferences=freeMarkerPortletPreferences.getPreferences({ "groupId": "${scopeGroupId}", "formInstanceId": "${FormId.getData()}" })
        portletName="com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormPortlet"
        instanceId="EVENT_FORM_${.vars['reserved-article-id'].data}" />
        </#if>
        
      7. Uncheck the "cacheable" checkbox for the template.
      8. Create a new web content from this structure and insert the form's ID from step 3 and publish. (On 7.2.x, it can be found at the Forms list and on master it can be copied from the form's 'Copy URL' section for example).
      9. Go to the test page's Asset Publisher and open the test web content by clicking on its title.

       

      Current Behavior:

      The form is displayed within the web content, once.

       

      Expected Behavior:

      The form is actually duplicated: it is displayed in the footer section as well.

       

      Reproducible on:

      DXP 7.2 + dxp-4
      7.2.x-private@d2bd0d45e0b9dd823cc938e3aab22b36e4a575ca
      master-private@6b7088213fadb5662e5430b6b70f724a686d1ab4

        Attachments

        1. screenshot-1.png
          50 kB
          Harry Chai
        2. screenshot-2.png
          71 kB
          Harry Chai
        3. screenshot-3.png
          51 kB
          Harry Chai
        4. screenshot-4.png
          81 kB
          Harry Chai
        5. screenshot-5.png
          108 kB
          Harry Chai
        6. screenshot-6.png
          59 kB
          Harry Chai
        7. screenshot-7.png
          56 kB
          Harry Chai

          Activity

            People

            Assignee:
            harry.chai Harry Chai
            Reporter:
            lino.alves Lino Alves
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              40 weeks, 4 days ago

                Packages

                Version Package
                7.2.10 DXP FP6
                7.2.X
                7.3.3 CE GA4
                7.3.10 DXP GA1
                Master