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

Duplicate <p> tag when creating new Page Fragments with Editable Text

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 7.2.10 DXP FP2, Master
    • Fix Version/s: None
    • Component/s: WCM > Fragments
    • Labels:
      None
    • Fix Priority:
      3
    • JDK:
      Oracle Sun JDK 8
    • Application Servers:
      Apache Tomcat 9.0.x
    • Browsers:
      Chrome (latest)
    • Databases:
      HSQLDB 2
    • Device Type:
      Desktop

      Description

      Issues
      When creating new Page Fragments, using <p> tag inside the Page Fragment would lead to duplicate the <p> tag.

      Steps to Reproduce

      1. Go to Site Settings → Site Builder → Page Fragments
      2. Add new Collection
      3. Add new Section
      4. Add below code in the HTML panel
        <div class="fragment_xxxxx">
          <p>
            <lfr-editable id="dummy-text" type="text">
              Dummy Text
            </lfr-editable>
          </p>
        </div>
      1. Publish the Section
      2. Create new Content Page, and open the Content Page
      3. Click Edit button, and Add the Page Fragments with <p> tag in the Content Page
      4. Publish the added Fragments
      5. Right click on the "Dummy Text" text, and inspect the element in your browser

      Expected Behavior
      <lfr-editable> tag should become a <div> tag and get wrapped by the <p> tag

      Another example of the expected behavior when <p> tag changed into <h1> :

      <div class="fragment_xxxxx">
        <h1>
          <div>
            Dummy Text
          </div>
        </h1>
      </div>

      * See Screenshot 1 for more details

      Actual Behavior
      Duplicate on <p> tag and does not wrap the <div> tag which used to be <lfr-editable> tag.**

      <div class="fragment_xxxxx">
        <p>
        </p>
        <div>
          Error Dummy
        </div>
        <p></p>
      </div>

      * See Screenshot 2 for more details

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 weeks ago

                Packages

                Version Package