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

Fragments used in collection display are not given unique fragment ids

    Details

      Description

      Fragments used in collection display are not given unique fragment ids. Since fragment javascript relies on the fragment ID being unique this can cause problems with javascript execution.

      Steps to reproduce:

      1. Start up liferay
      2. Create a number of blog entries
      3. Edit the home page and add a collection display fragment
      4. Configure the collection display to show the Recent Asset collection
      5. Add a Heading fragment to the collection display and map it to the blog title
      6. Publish the page and examine the markup (look for the parent elements of the heading fragments which have "component-heading" as a class)

      Expected Result:

      The text heading fragments in the markup receive unique fragment IDs

      Actual Result

      All the text heading fragments receive the same fragment id, i.e. "fragment-0-gskp"

       

      <div class="" style="border-style: solid; border-width: 0px;">
        <div class="row">
         <div class="col-md-12">
          <div class="" style="border-style: solid; border-width: 0px;">
           <div id="fragment-0-gskp"> 
            <h1 class="component-heading mb-0 text-break" data-lfr-editable-id="element-text" data-lfr-editable-type="text"> test4</h1>
           </div>
           <style>.fragment-heading-text-colored a {
      	color: inherit;
      }</style>
          </div>
         </div>
        </div>
        <div class="row">
         <div class="col-md-12">
          <div class="" style="border-style: solid; border-width: 0px;">
           <div id="fragment-0-gskp"> 
            <h1 class="component-heading mb-0 text-break" data-lfr-editable-id="element-text" data-lfr-editable-type="text"> test2</h1>
           </div>
          </div>
         </div>
        </div>
        <div class="row">
         <div class="col-md-12">
          <div class="" style="border-style: solid; border-width: 0px;">
           <div id="fragment-0-gskp"> 
            <h1 class="component-heading mb-0 text-break" data-lfr-editable-id="element-text" data-lfr-editable-type="text"> test</h1>
           </div>
          </div>
         </div>
        </div>
      
       </div>
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              diego.hu Diego Hu
              Reporter:
              allen.ziegenfus Allen Ziegenfus
              Participants of an Issue:
              Recent user:
              Diego Hu
              Engineering Assignee:
              Ruben Pulido
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 weeks, 6 days ago

                  Packages

                  Version Package
                  Master