vercel / commerce

Next.js Commerce
https://demo.vercel.store
MIT License
11.48k stars 4.24k forks source link

Policies have broken link: 500 error #1295

Closed danieldanielecki closed 7 months ago

danieldanielecki commented 9 months ago

Policies from Settings -> Policies (https://admin.shopify.com/store/123456/settings/legal) aren't correctly displayed.

I tried to have them included in my footer, but those are redirecting to pages with 500 error code:

Screenshot 2024-02-07 at 14 34 06 Screenshot 2024-02-07 at 14 36 28 Screenshot 2024-02-07 at 14 36 45
leerob commented 7 months ago

This is because the "CMS" like pages, e.g. https://demo.vercel.store/shipping-return-policy, are at the root path.

You can view the code here: https://github.com/vercel/commerce/blob/main/app/%5Bpage%5D/page.tsx

If you would like to change that path, you could change to app/policies/[page]/page.tsx.

danieldanielecki commented 7 months ago

@vitustockholm, what do you think about the answer? You know more about all the bugs this repo has, esp. around routing.

danieldanielecki commented 5 months ago

Those are all working, but on the checkout page. Would be good to mention it somewhere!