Using generateStaticParams causing 405 error while Hitting POST request
Unanswered
SID posted this in #help-forum
SIDOP
Hi I have configured i18n in nextjs 13 app router using official docs https://nextjs.org/docs/app/building-your-application/routing/internationalization
but I have started getting 405 method not allowed when I use server pages to submit forms
here is similar issue
https://github.com/vercel/next.js/issues/49408
Can anyone help me with this?
but I have started getting 405 method not allowed when I use server pages to submit forms
here is similar issue
https://github.com/vercel/next.js/issues/49408
export async function generateStaticParams() {
return i18n.locales.map((locale) => ({ lang: locale }));
}Can anyone help me with this?
7 Replies
@SID Hi I have configured i18n in nextjs 13 app router using official docs https://nextjs.org/docs/app/building-your-application/routing/internationalization
but I have started getting 405 method not allowed when I use server pages to submit forms
here is similar issue
https://github.com/vercel/next.js/issues/49408
export async function generateStaticParams() {
return i18n.locales.map((locale) => ({ lang: locale }));
}
Can anyone help me with this?
it seems this is a server actions bug; you probably have to not use server actions or [disable static rendering](https://github.com/jmenges/store/commit/c7b7c14cb1ef48c69334d99177d0538357ad603e)
@SID But I will need it for i18n
well but it is a confirmed bug being investigated by the team as you can see by the
[NEXT-1167] tag. you can only use workarounds for now. server actions are in alpha so very unstable, expect bugs@joulev well but it is a confirmed bug being investigated by the team as you can see by the `[NEXT-1167]` tag. you can only use workarounds for now. server actions are in alpha so very unstable, expect bugs
SIDOP
Is there anything else that can provide me same functionality without compromising Server actions?
@SID Is there anything else that can provide me same functionality without compromising Server actions?
you can check the issue and look for workaround – if there is any good workaround it should be there already
if you can't find a workaround good enough, high chances it is simply not possible
if you can do it, you should also try to fix the bug yourself and make a pull request to the nextjs repository