reactioncommerce / example-storefront

Example Storefront is Reaction Commerce’s headless ecommerce storefront - Next.js, GraphQL, React. Built using Apollo Client and the commerce-focused React UI components provided in the Storefront Component Library (reactioncommerce/reaction-component-library). It connects with Reaction backend with the GraphQL API.
https://www.mailchimp.com/developer/open-commerce
Apache License 2.0
608 stars 288 forks source link

Example-storefront: 404 on PDP when admin saves a product without title #750

Closed jrw421 closed 3 years ago

jrw421 commented 3 years ago

Type: minor

Describe the bug Admin can save and publish a product without adding its title. This product, when published, is naturally displayed on the storefront side. When the customer tries to open PDP for that product, the system throws 404 Not Found error (in case of Mac) and Sorry! We couldn't find what you're looking for error (in case of Ubuntu).

To Reproduce

  1. From reaction admin, create a product without its title (and thus, slug)
  2. Publish this product
  3. From storefront, open the PDP of the product without title

Expected behavior Error handling on example-storefront for pre-existing products missing titles.

Desktop (please complete the following information):

Additional context There is currently a PR out for requiring a title on product creation in reaction-admin.