legacy-knowledge-base
公開されました Jul. 2, 2025

フラグメント構成がフォーム表示を破る

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

learn-legacy-article-disclaimer-text

問題

  • 7.3 SP3 では、フラグメント <div> に適用される CSS クラスを変更する構成設定を変更すると、ドロップ ゾーンのフォームが 2 回追加され、フォームがまったく表示されなくなります。

    次の警告が、対応する JS 参照とともにブラウザー コンソールに表示されます。

    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 


    ステップから 再現

    1. コンテンツ & データ > フォーム
    2. フォームにタイトルとテキスト フィールドを付けます。 保存.
    3. 次の構成でフラグメントを作成します:
      構成
    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. フラグメントを公開する
    6. コンテンツ ページに移動し、フラグメントを追加します。
    7. フォーム ウィジェットをフラグメントのドロップ ゾーンにドロップします。
    8. 作成したフォームを表示するようにフォーム ウィジェットを構成します。
    9. 公開.
    10. すべて正常に動作することに注意してください。
    11. ブラウザ コンソールを開きます。
    12. ページを再度編集し、[全般] タブでフラグメントのスタイルを変更します。
    13. 警告が表示されることに注意してください。 ページを公開するとページが更新されますが、フォームは完全には表示されません (テキスト フィールドがありません)。

Environment

  • Liferay DXP 7.3

解決策

  • フラグメントの HTML から ${configClass} 削除するか、configuration.TUContainerDecorator を削除してフラグメントの構成設定を読み取ると、問題が回避されます。
  • この問題は、 LPS-119924 および LPS-129443 によっても解決されています。
  • Liferay サポートでヘルプ センター チケットを開き、これら 2 つの修正を含むホットフィックスをリクエストしてください。
did-this-article-resolve-your-issue

legacy-knowledge-base