Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
fix(next): custom views not overriding built-in single-segment routes (#14066)
### What? Fixes the ability to override built-in single-segment admin views (like `create-first-user`, `login`, `account`, etc.) with custom views via `admin.components.views`. ### Why? Previously, when users tried to replace built-in views like `create-first-user` using the custom views configuration, the built-in view would still render. The routing logic in `getRouteData.ts` was checking for built-in views before checking for custom view overrides, making it impossible to replace them. ### How? Modified the route matching logic in `getRouteData.ts` to check for custom view overrides before falling back to built-in `oneSegmentViews`. When a custom view is configured with a key matching a built-in view (e.g., `'create-first-user'`), the custom view now takes precedence while preserving the correct template type and view type from the built-in configuration. Fixes #14046
P
Patrik committed
691f810e69bfe1d19a0db36f95321fd9abe297d0
Parent: cd94f8e
Committed by GitHub <noreply@github.com>
on 10/10/2025, 5:48:01 PM