Skip to content

🐛 Bug: Fix blog pagination on category change #2571

Open

Description

@yashveer-1

Describe the bug

  • Changing the blog category does not immediately reset the current page to page 1.
  • This can cause invalid pagination, such as "Page 5 of 2", and temporarily hide blog posts.
  • Using history.replaceState() can cause the browser URL and Next.js router state to become inconsistent.

Steps To Reproduce

  1. Go to the JSON Schema blog page.
  2. Select the All category.
  3. Navigate to the last page (e.g., Page 5 of 5).
  4. Click the Case Study category.
  5. Observe the pagination state. It may briefly show "Page 5 of 2" before resetting to "Page 1 of 2".

Expected Behavior

  • Changing the blog category should reset pagination to Page 1.
  • The page number should remain valid throughout the filtering process.
  • The filtered blog posts should display correctly without a temporary empty state.
  • The URL and Next.js router state should remain synchronized.

Screenshots

Device Information [optional]

- OS:
- Browser:
- version:

Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

Activity

  1. added
    🐛 BugIndicates that the issue is a bug or defect.
    Status: TriageThis is the initial status for an issue that requires triage.
    on Oct 20, 2026
  2. sham-jadhav03 commented on Nov 12, 2026

    @sham-jadhav03

    Hi @yashveer-1 @theory , I would like to work on this issue. Please assign it to me!

  3. theory commented on Nov 12, 2026

    @theory
    Contributor

    Anyone have an idea why people keep mentioning me on website issues? I have no involvement in the organization or maintenance of the json schema site.

  4. jdesrosiers commented on Nov 12, 2026

    @jdesrosiers
    Member

    Sorry this keeps happening @theory. Let's see if this helps, #2645

  5. theory commented on Nov 13, 2026

    @theory
    Contributor

    Thank you, @jdesrosiers! Still don't know what list I appear n that people mention me, but this should indeed help.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is the initial status for an issue that requires triage.invalidThis doesn't seem right🐛 BugIndicates that the issue is a bug or defect.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions