Legacy Knowledge Base
Published Sep. 10, 2025

Erratic behavior when using pagination in Documents and Media

Written By

Jose L. Bango

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

  • When listing documents in Documents and Media section, some files are missing or duplicated when using pagination.
  • The same can happen in other sections as well, such as Web Content.

Environment

  • DXP 7.3
  • DXP 7.4
  • Quarterly Releases

Resolution

  • This can happen if the files have the same modification date. The default sorting in Liferay uses this date, which leads to unpredictable results when the modification date is not unique.
  • Editing the files to change their modification date will resolve the issue. You don't need to change the actual content; simply re-save the files.
    • Alternatively, you can change the sort order to other field, which will avoid the issue.
      • Newer DXP versions allow changing the default sorting order in the site settings.
  • If you have verified that this is your case, double check your customizations to avoid this behavior and ensure a unique modified date instead. Ordering based on a column that isn’t strictly unique is not necessarily deterministic. Modified date should humanly be unique, but likely due to customization it has duplicates.
    • You can consider opening a Feature Request to let the team investigate if Service Builder could be updated to generate all ordered finders with a secondary ordering of the entities' primary key.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base