You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
Hi guys, I'm using your repo as a reference for a WordPress and Next implementation. Thank you for all the work you are doing, it is a great contribution.
Description
I am having some issues fetching hierarchical posts. You are fetching posts by ID from the URI if it is hierarchical, from the SLUG if it is not here.
And then you are splitting the path here to return it in the getStaticPaths function.
All of that makes perfect sense. But I'm seeing that if you have a URI for example people/name, you return the path as an array ['people', 'name'] and then in the params attribute of getStaticPropshere, it receives only slug: ['name']
For some reason in the background I am losing one of the parameters.
Hi guys, I'm using your repo as a reference for a WordPress and Next implementation. Thank you for all the work you are doing, it is a great contribution.
Description
I am having some issues fetching hierarchical posts. You are fetching posts by ID from the URI if it is hierarchical, from the SLUG if it is not here.
And then you are splitting the path here to return it in the getStaticPaths function.
All of that makes perfect sense. But I'm seeing that if you have a URI for example
people/name
, you return the path as an array['people', 'name']
and then in theparams
attribute of getStaticProps here, it receives onlyslug: ['name']
For some reason in the background I am losing one of the parameters.
Notes
I found some discussions that could be related, I add the references in case they are useful:
vercel/next.js#14150
vercel/next.js#11272
vercel/next.js#11738
I would like to know if it was something that you were also experiencing or maybe I am doing something wrong. Thanks
The text was updated successfully, but these errors were encountered: