-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ID of generateSitemaps doesn't work in production for sitemap #60894
Comments
This comment has been minimized.
This comment has been minimized.
huozhi
added a commit
that referenced
this issue
Jan 24, 2024
### What Fixes the string id that broken when sitemap is optimized to static route. ### Why When sitemap is optimized to static route in production, the route argument is changed from `[[...__metadata_id__]]` to `[__metadata_id__]`, so the type of it is also changed from array to string that should reflect in the loader code. Fixes #60894 Closes NEXT-2154
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
huozhi
added a commit
that referenced
this issue
Mar 4, 2024
Fixes the string id that broken when sitemap is optimized to static route. When sitemap is optimized to static route in production, the route argument is changed from `[[...__metadata_id__]]` to `[__metadata_id__]`, so the type of it is also changed from array to string that should reflect in the loader code. Fixes #60894 Closes NEXT-2154
This fix is landed in 14.1.2 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/adoring-spence-ypzmjh?file=%2Fapp%2Fbooks%2Fsitemap.ts%3A5%2C1
To Reproduce
If I call
/books/sitemap/10.xml
in production, the console.log shows 1.That should return
not found
or 10This bug is happened in only production.
Current vs. Expected behavior
That should return correct id. If it's existed, it should return
not found
like dev mode.Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
The generateSitemaps works well in development mode, but that has above error in production mode.
It seems like be Next.js issue.
The text was updated successfully, but these errors were encountered: