Liquid error (snippets/card-product line 258): new_comment form must be given an article

Solved

Liquid error (snippets/card-product line 258): new_comment form must be given an article

Amy200101
Excursionist
30 1 7

Hey Guys,

 

https://www.supplieswarehouse.co.uk/collections/best-selling-products

 

Not sure what I've changed but I was trying to add breadcrumbs and now under my images I have this text

 

 

Liquid error (snippets/card-product line 258): new_comment form must be given an article

 

Any ideas how to fix this?

 

This is line 258- 264

 

{%- form 'product', product_form_id %

                      , card_product

                      , id: product_form_id

                      , class: 'form'

                      , novalidate: 'novalidate'

                      ,

                      }

Accepted Solution (1)

PaulNewton
Shopify Partner
7536 666 1592

This is an accepted solution.

HI @Amy200101  that is invalid syntax you've presented.

There should be no orphan percent sign (%) before the parameters and no missing percent sign before the closing bracket

And do you diligence and check the form tag usage in the dev docs

https://shopify.dev/api/liquid/tags/form 

{%- form 'product', product_form_id 
 , card_product
 , id: product_form_id
 , class: 'form'
 , novalidate: 'novalidate'
 %}

 

Beyond that rollback the file or restore a backup(you did make one before customizing a theme right)

 

If you need theme repair services then contact me.

Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


View solution in original post

Reply 1 (1)

PaulNewton
Shopify Partner
7536 666 1592

This is an accepted solution.

HI @Amy200101  that is invalid syntax you've presented.

There should be no orphan percent sign (%) before the parameters and no missing percent sign before the closing bracket

And do you diligence and check the form tag usage in the dev docs

https://shopify.dev/api/liquid/tags/form 

{%- form 'product', product_form_id 
 , card_product
 , id: product_form_id
 , class: 'form'
 , novalidate: 'novalidate'
 %}

 

Beyond that rollback the file or restore a backup(you did make one before customizing a theme right)

 

If you need theme repair services then contact me.

Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org