Issue
- When using a Collection Fragment with a Custom Fragment to display entries from a Liferay Object, the sequence of the entries is not reflected correctly on the page.
- The order of the entries appears to be random, especially after making changes (e.g., to HTML, CSS, or JavaScript) in the custom fragment.
- The expected behavior is that the entries are displayed in the same order as they are defined in the Object's entry list.
Steps to reproduce:
- Login to Liferay DXP 7.4 u90.
- Create an object along with some fields like (name, designation and imageurl) and publish the object.
- Create a widget page, drag and drop the created object into it.
- Provide the values to the fields (name, designation and imageurl) one by one. Note: Please provide the link of image in imageurl field from the path: /home/me/Downloads/liferay-dxp-tomcat-7.4.13.u90-20230816105706384/liferay-dxp-7.4.13.u90/tomcat-9.0.75/webapps/ROOT/html.
- Create a basic fragment and under the configuration, provide the code for HTML, CSS and JavaScript.
- Create a content page, drag and drop the widget "Collection Display" into it.
- Now, from the right panel, click on select collection-> Collection provider ->Select the object created.
- Again, from the right panel, select the layout as 4 columns.
- From the widgets section, select the created fragment [step 5], drag and drop it into one of the columns.
- Click on the “name” field and from the right panel, map it with the name created under the object. Similarly, perform for the “designation” field.
- Finally, once all the values get populated in the content page, publish the page.
- Go to the widget page and enable view permission for the guest user for all the entries.
- Open localhost:8080 in a different browser, navigate to the content page and see that the entries are visible in the same sequence.
- Now, perform any changes in the fragment (HTML, CSS and JavaScript).
- Refresh the content page. Sometimes it is observed that the sequence of entries are as it is, and sometimes it is observed that the entries are not in sequence as it was created initially.
Actual Result: The object entries do not get rendered on the page in a sequential manner; instead, they get rendered randomly.
Expected Result: The object entries should be visible on the pages in the same sequence in which the sequence of entries was created.
Environment
- Liferay DXP 7.4
Resolution
- This behavior is a known issue that has been addressed via LPD-56443.
- Please submit a support ticket to get the hotfix on the same by attaching patch details.
Additional Information
- Always upgrade the DXP to the latest update to achieve the expected behavior: Upgrade Basics
- Please submit a support ticket if you require more information from the product aspect by attaching patch details.
- Installing Fix Packs and Hotfixes on Liferay DXP will guide to installation of the hotfix in the respective environment.