legacy-knowledge-base
公開されました 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

learn-legacy-article-disclaimer-text

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