We have a Confluence Forge app with custom UI.
We are facing an issue when fetching paginated comments for pages and blog posts using the following APIs:
/wiki/api/v2/pages/{pageId}/footer-comments?sort=-created-date&limit=10&body-format=atlas_doc_format
/wiki/api/v2/blogposts/{blogPostId}/footer-comments?sort=-created-date&limit=10&body-format=atlas_doc_format
Use case:
We need to display the latest 10 comments initially and then fetch more comments on demand using the _links.next
URL.
Problem:
Pagination works correctly for the first two pages, but from page 3 onward, duplicate comment IDs reappear from earlier pages (e.g., comments from page 1 show up again). As a result, some comments are duplicated while others are missing.
Example (assuming 50 comments with IDs 1–50):
This issue only occurs when we add sort=-created-date
. If we omit sort
and just use limit=10&body-format=atlas_doc_format
, the pagination works as expected.
Questions:
sort=-created-date
?Hello @Mohan Kanawade
Yes similar issues are reported when paginating with sort parameters escpecially reverse sorting.
Below is an alernate approach which might help
Thanks
Jayesh R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.