[GH-ISSUE #7905] docs: Searching "React Router" in docs leads to 404 — Orama search index out of sync with production site #28268

Closed
opened 2026-04-17 19:42:51 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @n-huzaifa on GitHub (Feb 11, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/7905

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Go to https://www.better-auth.com/docs
  2. Open the search dialog (Cmd+K / Ctrl+K)
  3. Type "react router"
  4. Click the first result ("React Router v7 Integration")
  5. You are navigated to https://www.better-auth.com/docs/integrations/react-router
  6. The page returns 404

Current vs. Expected behavior

Current: Clicking the search result for "React Router v7 Integration" navigates to /docs/integrations/react-router which returns a 404. The production site still serves the old Remix page at /docs/integrations/remix.

Expected: The search result should link to a page that exists. Either the production site should be redeployed with the React Router pages from PR #7457, or the Orama index should match what's actually deployed.

Root Cause Analysis

PR #7457 renamed the Remix integration docs to React Router v7 (file docs/content/docs/integrations/remix.mdxreact-router.mdx). This was merged to canary on Feb 5, 2026.

However, the production site was never redeployed with these changes:

  • /docs/integrations/remix still returns 200 with the old "Remix Integration" content
  • /docs/integrations/react-router returns 404
  • The Next.js integration page sidebar still shows "Previous: Remix → /docs/integrations/remix"

The Orama search index was updated (likely during a preview build) because the docs build script runs next build && pnpm run scripts:sync-orama — the Orama sync is a side effect of every build, including preview deployments, and it updates a global cloud index.

This created a mismatch: search has React Router URLs, but the production site still serves Remix pages.

Additionally, docs/ignore-build.sh uses $message instead of $VERCEL_GIT_COMMIT_MESSAGE, which may cause production builds to always be skipped (since $message would be empty).

Suggested Fix

  1. Redeploy the docs site from the latest canary to bring the production site in sync.
  2. Guard the Orama sync so it only runs on production builds (e.g., check VERCEL_ENV === "production" in scripts/sync-orama.ts) to prevent preview builds from updating the global index.
  3. Fix docs/ignore-build.sh to use $VERCEL_GIT_COMMIT_MESSAGE instead of $message.

Which area(s) are affected?

Documentation, Search (Orama), Deployment

Originally created by @n-huzaifa on GitHub (Feb 11, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/7905 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Go to https://www.better-auth.com/docs 2. Open the search dialog (Cmd+K / Ctrl+K) 3. Type "react router" 4. Click the first result ("React Router v7 Integration") 5. You are navigated to https://www.better-auth.com/docs/integrations/react-router 6. The page returns **404** ### Current vs. Expected behavior **Current:** Clicking the search result for "React Router v7 Integration" navigates to `/docs/integrations/react-router` which returns a 404. The production site still serves the old Remix page at `/docs/integrations/remix`. **Expected:** The search result should link to a page that exists. Either the production site should be redeployed with the React Router pages from PR #7457, or the Orama index should match what's actually deployed. ### Root Cause Analysis PR #7457 renamed the Remix integration docs to React Router v7 (file `docs/content/docs/integrations/remix.mdx` → `react-router.mdx`). This was merged to `canary` on Feb 5, 2026. However, the **production site was never redeployed** with these changes: - `/docs/integrations/remix` still returns 200 with the old "Remix Integration" content - `/docs/integrations/react-router` returns 404 - The Next.js integration page sidebar still shows "Previous: Remix → /docs/integrations/remix" The **Orama search index was updated** (likely during a preview build) because the docs build script runs `next build && pnpm run scripts:sync-orama` — the Orama sync is a side effect of every build, including preview deployments, and it updates a **global** cloud index. This created a mismatch: search has React Router URLs, but the production site still serves Remix pages. Additionally, `docs/ignore-build.sh` uses `$message` instead of `$VERCEL_GIT_COMMIT_MESSAGE`, which may cause production builds to always be skipped (since `$message` would be empty). ### Suggested Fix 1. **Redeploy the docs site** from the latest `canary` to bring the production site in sync. 2. **Guard the Orama sync** so it only runs on production builds (e.g., check `VERCEL_ENV === "production"` in `scripts/sync-orama.ts`) to prevent preview builds from updating the global index. 3. **Fix `docs/ignore-build.sh`** to use `$VERCEL_GIT_COMMIT_MESSAGE` instead of `$message`. ### Related - PR #7457 (renamed Remix → React Router v7): https://github.com/better-auth/better-auth/pull/7457 ### Which area(s) are affected? Documentation, Search (Orama), Deployment
GiteaMirror added the locked label 2026-04-17 19:42:51 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Feb 11, 2026):

It looks like you've raised an important issue regarding a 404 error when searching for "React Router" in the documentation. This situation arises because the current production site hasn't been updated to reflect changes made in the canary version after PR #7457.

To address this, the next steps are:

  1. Redeploy the documentation site from the latest canary to sync the production site with the correct pages for React Router.
  2. Ensure Orama search sync only runs during production builds to prevent mismatch after preview builds.
  3. Fix the build script to properly use the $VERCEL_GIT_COMMIT_MESSAGE.

If you'd like a more detailed discussion or if you have any specific questions about this, feel free to tag the members of the Better Auth team, Beka and Max, who can provide additional support.

Have you encountered any other issues while using Better Auth?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3882328738 --> @better-auth-agent[bot] commented on GitHub (Feb 11, 2026): It looks like you've raised an important issue regarding a 404 error when searching for "React Router" in the documentation. This situation arises because the current production site hasn't been updated to reflect changes made in the `canary` version after PR #7457. To address this, the next steps are: 1. **Redeploy the documentation site** from the latest `canary` to sync the production site with the correct pages for React Router. 2. **Ensure Orama search sync** only runs during production builds to prevent mismatch after preview builds. 3. **Fix the build script** to properly use the `$VERCEL_GIT_COMMIT_MESSAGE`. If you'd like a more detailed discussion or if you have any specific questions about this, feel free to tag the members of the Better Auth team, Beka and Max, who can provide additional support. Have you encountered any other issues while using Better Auth? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@bytaesu commented on GitHub (Feb 21, 2026):

Hi @n-huzaifa,

OramaCloud old platform has shut down, so we've temporarily switched to the default search. The issue is now resolved, and even if we adopt new cloud search provider later (planning), we'll make sure main and canary docs don't get mixed again 🙂

<!-- gh-comment-id:3939429791 --> @bytaesu commented on GitHub (Feb 21, 2026): Hi @n-huzaifa, OramaCloud old platform has shut down, so we've temporarily switched to the default search. The issue is now resolved, and even if we adopt new cloud search provider later (planning), we'll make sure main and canary docs don't get mixed again 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#28268