Setup with Templates

default discord avatar
joebu23
2 months ago
9

Trying to setup Payload with Next JS. Using the template at

https://github.com/payloadcms/template-website

for the CMS and that works as expected. The NextJS template at

https://github.com/payloadcms/template-website-nextjs

throws an error when you try to hit the homepage. Looks to be a graphQL error.



@jmikrut tagging you at your request.

  • default discord avatar
    notchr
    2 months ago

    field name issue?

  • default discord avatar
    joebu23
    2 months ago

    I did try to adjust that query but then everything 404s which is nice because the base 404 page does work so I can deduce that the Next project is functioning properly



    Cannot query field 'formIntroContent' on type 'FormBlock'

  • default discord avatar
    notchr
    2 months ago

    If you replace that with the suggestion, does it work?



    just introContent

  • default discord avatar
    joebu23
    2 months ago

    Then everything 404s

  • default discord avatar
    notchr
    2 months ago

    Odd!

  • default discord avatar
    joebu23
    2 months ago

    so, the 404 page comes up properly, but it does for the home page and 'posts'. (I seeded the database also to rule that out)

  • discord user avatar
    jacobsfletch
    Payload Team
    2 months ago

    Hey @joebu23! Yea many have complained about this. The repo:

    https://github.com/payloadcms/template-website-nextjs

    is still under construction and tbh we should have never publicized it. It's empty! BUT we have been hard at work getting a front-end built for that template. And going forward, we're actually building it directly into the Payload repo here:

    https://github.com/payloadcms/payload/tree/master/templates/website


    Here's a similar conversation for more context:

    https://discord.com/channels/967097582721572934/1109510316175413338


    We should have this finished up within a week or so. It's very far along, and I will do my best to post updates to these threads as I have them.

  • default discord avatar
    joebu23
    2 months ago

    Yeah, I noticed it was empty but had what looked to be completed template in the dev branch.



    Thank you for the help and the heads up!

  • discord user avatar
    jacobsfletch
    Payload Team
    2 months ago

    Aha, ok that makes sense. That other thread I posted has some alternative resources for you to check out in the meantime.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.