BUG: Product duplication when adding over 20 products

Hello,

I am wondering if anybody has any idea how to approach this issue. My client is having an issue with a store that I created for them with a custom theme based off of debut.

It seems that when over 20 products are added to the main product page, any products over that number get overwritten with whatever the 20th product is once ‘Save’ is clicked. Even if I try to create a new section and add more product blocks, it still happens.

Any suggestions on where to look for the source of this issue? I have dug around in the code for custom-content section, as well as a few others but haven’t been able to find any sort of obvious indicator that would create this type of behavior.

Hello @doglick Verify the behavior on the frontend outside of the editor.

If it works on frontend probably a javascript or cache issue.

Though sounds like all_products 20 product limit per page

https://shopify.dev/docs/api/liquid/objects/all_products

Or a loop issue, or less likely an issue with pagination set to a low value.

Can be lots of things depending on how your building, operating and outputting products /shrug.

This is the type of thing if all_products isn’t the cause you may need to pare down a version of the theme for a minimal, reproducible example.

Debut is getting pretty old, may want to look through the Dawn reference to see how it’s doing things, and/or start moving things to JSON templates.

https://github.com/Shopify/dawn

If you need this debugged then contact me by mail for services.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact info in signature.

Good Bug Hunting.

1 Like

Thanks for the reply and pointers – here is some of the information I was missing:

Store URL: https://showmethebody.com/

Theme Name: Debut (with some modifications)

I set up this theme based on Debut for a client almost three years ago (it was my first shopify dev experience) for next to nothing, and aside from some minor additions there has been little maintenance so I think its about time for an update to 2.0

Still looking into those leads that you mentioned, will post if I find a solution.