Skip to content
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

SSR Doesnt Work #344

Closed
yaronovsky opened this issue Jul 13, 2021 · 7 comments
Closed

SSR Doesnt Work #344

yaronovsky opened this issue Jul 13, 2021 · 7 comments

Comments

@yaronovsky
Copy link

yaronovsky commented Jul 13, 2021

There is some kind of an issue with ssr
if you view the source of the page there is no html there
Screen Shot 2021-07-13 at 23 16 16
I've checked the next js official getting started, there is no problem there.
I've tried various build methods via next cli, same result.
Please fix this asap, i need the headless framework for a large project

@wjohnsto
Copy link
Contributor

Are you using @wpengine/headless or @faustjs?

@yaronovsky
Copy link
Author

190F0C4D-955B-473C-98D0-F03F904116FE_4_5005_c

@yaronovsky
Copy link
Author

By the way i am using local wp with the atlas plugin to start the project

@yaronovsky
Copy link
Author

The issue has to do with the NextTemplateLoader, If i replace it with html or other components everything is fine.
Thanks in advance

@wjohnsto
Copy link
Contributor

We have experience a bunch of issues with the way the wp-templates works with Next's getStaticProps and getServerSideProps, and in general we recommend not using it. We also have a new version of the framework being released as @faustjs that will soon replace @wpengine/headless. It shouldn't be too difficult to migrate to @faustjs, but if you are too far into it that you are unable to migrate I can try to help you through the issue.

To really get a sense of where the problem is occurring it would be good to see the code for getStaticProps or getServerSideProps in BOTH your Next page as well as the template component if it is implemented there.

@yaronovsky
Copy link
Author

Actually i havent gone to deep yet, can wait for faust js.

@wjohnsto
Copy link
Contributor

We have the getting-started up for that framework here: https://github.com/wpengine/headless-framework/tree/canary/examples/next/getting-started

There are still some quirks, but we're working through them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants