Liquid Error (Collection-Grid-Item Line 23): Comparison of string with 0 failed

MoyaaSheaButter
New Member
3 0 0

I am having trouble with my collection-grid-item.liquid code. I had to duplicate a collection to make it manual instead of automatic because we were running into some issues. However now where the collection would have been, it shows no image just an error code “Liquid Error (Collection-grid-item line 23): Comparison of string with 0 failed”. I’ve located the line of code and tried changing it from 0 to 1 but that just changes the error code. I understand it’s trying to compare the number 0 to something that’s not a string. However i cannot figure out how to fix it. Any help would be appreciated!CF5029C8-382B-4CBF-ACBD-5C796D18D353.jpegA06C40C9-4205-469E-AF60-FE8DF4EA1BE8.png

0 Likes
Propero
Shopify Partner
685 80 117

@MoyaaSheaButter ,

Please try to output the {{ collection.all_products_count }}  just before line 23 to check if the product count is evaluating correctly 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution

To hire: email us at shopify@propero.in

Skype : lokendra.panwar1
0 Likes
MoyaaSheaButter
New Member
3 0 0
I imputed {{ collection.all_products_count }} above line 23 but nothing
happened, sorry I am not very coding savvy I’m not sure if this is what you
mean by output it

0 Likes
Propero
Shopify Partner
685 80 117

your collection object is not initialized, we need to login to store and check the code for instances where collection-grid-item is being included. You did not make any changes? Please share your store URL also

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution

To hire: email us at shopify@propero.in

Skype : lokendra.panwar1
0 Likes
MoyaaSheaButter
New Member
3 0 0
I have not made any changes no, my store URL is
moyaa-shea-products-ltd.myshopify.com

0 Likes
Propero
Shopify Partner
685 80 117

Please check this https://ehm80rx9eumxa6jp-13681029.shopifypreview.com

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution

To hire: email us at shopify@propero.in

Skype : lokendra.panwar1
0 Likes