Skip to content

Content Drive: global search pagination returns duplicate pages and hasMoreContent never turns false #37210

Closed

Description

@dario-daza

Problem Statement

When using the global search filter in Content Drive, pagination becomes unreliable: hasMoreContent keeps reporting true even once there is no more matching content, and the "next page" control stays enabled indefinitely. Paginating past the real result set returns the exact same rows as page 1 instead of an empty page, so a user can click "next" forever without ever reaching a natural end.

Steps to Reproduce

Video: content drive pagination bug.mov

  1. In Content Drive, use the global search filter and type a term that matches fewer results than a full page (e.g., searching "taxonomi" returns 10 contentlets, while the page size is 20).
  2. Observe the "next page" button is enabled even though fewer than a full page of results were returned.
  3. Click next page — the exact same 10 contentlets from page 1 are shown again, not new content and not an empty page.
  4. Continue paginating — no content is shown but "next page" remains enabled indefinitely.

Expected vs Actual

Expected: once the returned result count is smaller than the page size, hasMoreContent should be false and pagination controls should disable; paginating past the end should not repeat already-seen content.

Actual: hasMoreContent stays true regardless of whether more content exists; page 2 returns identical rows to page 1; further pages return nothing but pagination remains enabled.

Acceptance Criteria

  • hasMoreContent reflects whether more matching content actually exists beyond the current page
  • When a page returns fewer results than the requested page size, hasMoreContent is false
  • Paginating past the end of a result set does not return duplicate rows from a previous page
  • Verified against a large dataset (~718,174 contentlets) using the global search filter
  • Pagination controls in the UI reflect the corrected hasMoreContent value

Parent Epic

#36814

Activity

  1. added theissue type on Aug 25, 2026
  2. ihoffmann-dot commented on Sep 11, 2026

    @ihoffmann-dot
    Member

    This looks resolved by the review fix-ups on PRs #37394, #37395, #37396, #37397 (integration-content-drive-perf-v2-37394-37395-37396-37397, commit e720fb9b50).

    Root cause: not the field-filter chunk-ordering issue we initially suspected in #37395, but the replacement of the generic offset/dbCursor pagination param with explicit contentCursor / folderCursor fields (see AbstractDriveRequestForm). The old single offset couldn't reliably resume a chunked ES scan across content/folder/link result sets; the split cursor fixes that at the root, and dot-content-drive.store.ts was updated in lockstep to thread nextContentCursor/nextFolderCursor from each response into the next request.

    Verification against the built image (dotcms/dotcms-test:1.0.0-SNAPSHOT, id 7132c489f9cb):

    • Exact repro from this issue — global filter matching fewer results than page size ("taxonomi", 10 matches, page size 20, inside a 21,383-item folder): page 1 returns contentCount=10, hasMoreContent=false; page 2 (requested anyway, cursor-based) returns contentCount=0, hasMoreContent=false. No duplication, no stuck flag.
    • Multi-page case that exercises the ES chunking path (>876 candidates per sub-query): filtered search with 40+ matches across pages, cursor advancing 0 → 1609 → 3161, zero identifier overlap between pages.
    • Unfiltered pagination across folders of varying size (83 to 4,188 items): cursor advances correctly, zero overlap between pages.

    Full request/response evidence available on request if useful for the record.

    Closing as resolved by #37394–#37397. Reopen if it resurfaces on a build without those review fix-ups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions