Solved

Liquid error: product form must be given a product

ChristoLuks
Visitor
2 1 1

Hello,

 

All that was changed was the quantity of a product and one of our products buy button and image disappeared. An error message saying "Liquid error: product form must be given a product" is shown in its place. Could anyone help me with this issue?

Screen Shot 2020-06-02 at 9.57.10 AM.png

Accepted Solution (1)
ChristoLuks
Visitor
2 1 1

This is an accepted solution.

Hey Louis, thank you for your reply but I found the problem. Turns out that whoever coded the site before pulled the products through custom code (not dynamically through collections). The minute any changes are made on the product's end, that error message would show up again. For now, I'll just make the changes manually through the code and product but in the future, I'm hoping to pull the products dynamically instead of having to go through this tedious process!

View solution in original post

Replies 12 (12)

Lixon_Louis
Shopify Partner
1193 35 267

@ChristoLuks Can you specify what exactly you changed in featured-products2.liquid and which theme you are using?

ChristoLuks
Visitor
2 1 1

This is an accepted solution.

Hey Louis, thank you for your reply but I found the problem. Turns out that whoever coded the site before pulled the products through custom code (not dynamically through collections). The minute any changes are made on the product's end, that error message would show up again. For now, I'll just make the changes manually through the code and product but in the future, I'm hoping to pull the products dynamically instead of having to go through this tedious process!

Casimir1
Visitor
1 0 0

Hi can you help me with that. I have the same problem with gempages

garypatch
Visitor
2 0 0

Me too. I'm using Gempages also.

garypatch
Visitor
2 0 0

I have solved it. For the products that are having that error in Gempages. Go into your Shopify dashboard, go that specific product and on the top right there is Product Availability section. Make sure you tick Online store and other places you're going to selling.

BATE_Cindy
Tourist
5 0 1

This is happening to me as well but I'm using PageFly and Narrative theme. I've tried checking product availability is checked for online store but it's still showing the error. Any assistance would be appreciated! 

1213
Visitor
1 0 0

Me too 😕  
help please!
Captura de Pantalla 2020-09-19 a la(s) 02.05.07.png

IsmailTalb
Shopify Partner
3 0 0

That error mean you did not pass the 'product object to the form like this :

{%- form 'product' -%}
it should be : {%- form 'product', product-%}
SkyeM
Shopify Partner
1 0 0

Hi, I'm also having this problem, but all my products are available in Online Store and POS, and the code seems to be correct as you cited, could there be another reason why the Add to Cart button wouldn't show up? 

mikealf
Visitor
1 0 0

Is your PageFly page a Product template? It needs to be and you need to select the product that you want the information for

ctayah
Visitor
1 0 0

this helped me.. was using autoDS. i figured it out with this. thank you

Vienna_J
Visitor
1 0 0

Hi Christo. What you need to do is definitely not related to the code. I solved it just by customizing my online store, change the product with available products inside my list. That's it, the exact problem is you have to make your products available.