CMS Strapi: Does not get page #14851
Unanswered
SalahAdDin
asked this question in
Help
Replies: 1 comment 3 replies
-
Have you tried adding an Like this: const data = await fetchAPI(`your query here`) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm following the CMS Strapi Example, provided by @chibicode, but adapting it to my needs, it involves to use
page
folder instead ofpost
, for instance.Each time I want to see any page by slug I get the next error and it sends me to the
404
, i'm not getting any page despite i can get it in the strapi graphql console. But it does not send afetch
error or something, even more, it gets the pages and urls correctly, as far as i can see it.To Reproduce
/page/education
Expected behavior
It should render the expected page as in the console.
System information
Additional context
You can get the full code here. I just followed the project structure and files, i didn't copy-paste at all, maybe i missed something.
I also want to say it could be great if you make a very deep blog explaining the example, because alas i don't get so much here, maybe that's why i cannot understand what is going on with this bug.
Update:
It does not work with paths too, what I see it is API is returning a valid promise, but the client is not getting it:

This one is in the preview mode, we are getting the page with the given slug, no problem... until you see it is rendering 404 error.
Here, again, we can see a resolved promise for pages.

Here, we can see the promise is coming, at least it does exist, and it is resolved, but, again, the client does not get anything.

Again, pages exist in the resolved promise, but the client never gets the data.

It never got defined, because the data never comes.

How can i solve this? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions