-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
status: needs-triagePossible bug which hasn't been reproduced yetPossible bug which hasn't been reproduced yet
Description
Describe the Bug
When the basePath (in my case it's /cms) is set, the forgot password form action url is still the default one /api/users/forgot-password without the prefix, which cause a 500 error when submitting the form.
⨯ Error: Failed to find Server Action. This request might be from an older or newer deployment.
Read more: https://nextjs.org/docs/messages/failed-to-find-server-action
at ignore-listed frames
⨯ Error: Failed to find Server Action. This request might be from an older or newer deployment.
Read more: https://nextjs.org/docs/messages/failed-to-find-server-action
at ignore-listed frames
POST /api/users/forgot-password 500 in 1879ms (next.js: 1807ms, application-code: 72ms)
It's worth mentioning the login form is correct with basePath included.
Link to the code that reproduces this issue
https://github.com/xavierchow/payload-forgot-pwd-form-issue
Reproduction Steps
- npx create-payload-app
- add basePath
/cmsto the next.config.ts - pnpm dev
- create the first user and logout
- go to the login page and click the
forgot passwordlink - submit any email in the forgot password form
- server returns 500 error
Which area(s) are affected?
Not sure
Environment Info
Binaries:
Node: 24.11.1
npm: 11.6.2
Yarn: 1.22.22
pnpm: 10.27.0
Relevant Packages:
payload: 3.80.0
next: 16.2.1
@payloadcms/db-sqlite: 3.80.0
@payloadcms/drizzle: 3.80.0
@payloadcms/graphql: 3.80.0
@payloadcms/next/utilities: 3.80.0
@payloadcms/richtext-lexical: 3.80.0
@payloadcms/translations: 3.80.0
@payloadcms/ui/shared: 3.80.0
react: 19.2.4
react-dom: 19.2.4
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:24 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6030
Available memory (MB): 18432
Available CPU cores: 11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: needs-triagePossible bug which hasn't been reproduced yetPossible bug which hasn't been reproduced yet