Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Setup with Templates

default discord avatar
joebu23last year
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.



@364124941832159242

tagging you at your request.

  • default discord avatar
    notchrlast year

    field name issue?

  • default discord avatar
    joebu23last year

    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
    notchrlast year

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



    just introContent

  • default discord avatar
    joebu23last year

    Then everything 404s

  • default discord avatar
    notchrlast year

    Odd!

  • default discord avatar
    joebu23last year

    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
    last year

    Hey

    @606649391541125130

    ! 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
    joebu23last year

    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
    last year

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

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.