Legacy Knowledge Base
Published Jul. 2, 2025

Fragment Configuration Breaks Form Display

Written By

Joel Jeong

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • In 7.3 SP3, Changing a configuration setting that changes the applied CSS class on the fragment <div> causes the Form in the drop zone to be added twice, which results in the form not displaying at all.

    The following warning is displayed in the browser console with its corresponding JS reference:

    Component with id "ddmFormi69CgH2t" is being registered twice. This can lead to unexpected behaviour in the "Liferay.component" and "Liferay.componentReady" APIs, as well as in the "*:registered" events.
    combo?browserId=chrome&minifierType=js&languageId=en_US&b=7310&t=1650979779676&/o/frontend-js-aui-web/aui/aui/aui.js&/o/frontend-js-aui-web/liferay/modules.js&/o/frontend-js-aui-web/liferay/aui_sandbox.js&/o/frontend-js-aui-web/aui/attribute-base/attribute-base.js&/o/frontend-js-aui-web/aui/attribute-complex/attribute-complex.js&/o/frontend-js-aui-web/aui/attribute-core/attribute-core.js&/o/frontend-js-aui-web/aui/attribute-observable/attribute-observable.js&/o/frontend-js-aui-web/aui/attribute-extras/attribute-extras.js&/o/frontend-js-aui-web/aui/event-custom-base/event-custom-base.js&/o/frontend-js-aui-web/aui/event-custom-complex/event-custom-complex.js&/o/frontend-js-aui-web/aui/oop/oop.js&/o/frontend-js-aui-web/aui/aui-base-lang/aui-base-lang.js&/o/frontend-js-aui-web/liferay/dependency.js&/o/frontend-js-aui-web/liferay/util.js&/o/frontend-js-web/loader/config.js&/o/frontend-js-web/loader/loader.js&/o/frontend-js-web/liferay/dom_task_runner.js&/o/frontend-js-web/liferay/events.js&/o/frontend-js-web/liferay/lazy_load.js&/o/frontend-js-web/liferay/liferay.js&/o/frontend-js-web/liferay/global.bundle.js&/o/frontend-js-web/liferay/portlet.js&/o/frontend-js-web/liferay/workflow.js:652 


    Steps to Reproduce

    1. Content & Data > Forms
    2. Give the form a title and a text field to the form. Save.
    3. Create a fragment with the following configurations:
      Configuration
    4. {

          "fieldSets": [

              {    

                  "label": "Style",

                   "fields": [

                      {

                          "dataType": "string",

                          "defaultValue": "barebones",

                          "label": "Decorator",

                          "name": "TUContainerDecorator",

                          "type": "select",

                          "typeOptions": {

                              "validValues": [

                                  {

                                      "label": "Barebones",

                                      "value": "barebones"

                                  },

                                  {

                                      "label": "Decorate",

                                      "value": "decorate"

                                  }

                              ]

                          }

                      }

                  ]

              }

          ]

      }
      HTML
      [#assign configClass = "tu-component-" + configuration.TUContainerDecorator]

      <div class="fragment_24001 ${configClass}">
       <lfr-drop-zone></lfr-drop-zone>  
      </div>
    5. Publish the fragment
    6. Navigate to a content page and add the fragment.
    7. Drop a Form widget onto the fragment's drop zone.
    8. Configure the Form widget to display the created form.
    9. Publish.
    10. Note that everything works fine.
    11. Open the browser console.
    12. Edit the page again and change the fragment's style in the General tab.
    13. Note that the warning appears. Publishing the page will refresh the page, but the form won't fully display (the text field is missing).

Environment

  • Liferay DXP 7.3

Resolution

  • Removing the ${configClass} from the fragment's HTML or removing configuration.TUContainerDecorator to read the fragment configuration setting prevents the issue.
  • This issue has also been resolved by LPS-119924 and LPS-129443.
  • Open a Help Center Ticket with Liferay Support and request a hotfix that includes these two fixes.
Did this article resolve your issue ?

Legacy Knowledge Base