FROM CACHE - en_header

Collections Not Updating

Adam_Walder
Shopify Partner
10 0 2

Hello all. I update all product information via the API. All was well until recently I noticed collections aren't updating based on the tags criteria which is updated in the API. For example, I have a collection called "Frontpage Vinyl" where the criteria is: Product Tag is equal to "Collections-Frontpage Vinyl". I update the item via the API to remove that tag, yet the item is still showing in the Collection. This is something that has started within the past month - has something changed on the Shopify end that I now need to include when updating? This is a major issue because collections which are only supposed to show say a total of 10 items, are now showing hundreds of items since the items no longer in the collection are not updating. The only way I was able to fix the issue is to delete the collection and rebuild it - something I certainly don't want to do hourly for several collections.

See screenshot below showing the "Collections-Frontpage Vinyl" tag not existing, yet it is showing up in the Collections listing (the last Collection showing is "Frontpage Vinyl" (this is on the Product Detail Shopify GUI):

Replies 15 (15)
Chris_Konieczki
New Member
2 0 1

We are experiencing the same issue as described above.  We are using the API to update the tags for products and this seems to be working correctly but the collections are not.  Even though a tag has been removed from a product, it is not being removed from the collections that are dynamically built based on tags.  There is no way to manually refresh the collections either.

 

Is there a status update on resolving this issue with the API?

Adam_Walder
Shopify Partner
10 0 2

Chris - your description is exactly what is happening with us. The only fix was to DELETE the entire collection and then CREATE NEW collection via the GUI. However, if the collection was on the navigation menu, it gets deleted from the menu as well so it needs to be added back to the navigation menu after you CREATE NEW. Lol! Certainly not something I want to continue doing as it's a royal pain.

Alex
Shopify Staff
Shopify Staff
1561 81 325

Hey guys,

The behaviour you're experiencing is not expected and our development team is aware of it. I'll update the thread once a fix has been pushed.

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Octavian1
New Member
1 0 0

Hi Adam,

In case you need the fix for only one product, you may just update the product type or add a test tag and save it (Remove the test tag after update). The wrong collection will disappear automatically. Unfortunately it not works on product content update, it only works when you manually update the Product Type, Price, Collecitons or Tags.

Adam_Walder
Shopify Partner
10 0 2

Octavian, thanks for the reply. Yes, it works via the Shopify GUI, but not via the API. I do all product updating via the API.

Adam_Walder
Shopify Partner
10 0 2

I believe I have found a temporary workaround. While it's not perfect (since it will use up the API bucket size more frequently), it does solve the issue of Tags not updating Collections immediately via the API.

What I have done is clear out all tags for a product via an API call, and then repopulate all of the tags for that product in the next API call.

Example code in classic .asp!

'''' Reset all previously existing tags on Shopify to null ''''
Set ServerXmlHttp = Nothing
Set ServerXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
					
ServerXmlHttp.open "PUT", "https://(STORE NAME).myshopify.com/admin/products/(Shopify Product ID).xml", false, (apikey), (pass)
	
ServerXmlHttp.setRequestHeader "Content-type","application/xml"
'''' Below I am nulling out the tags ''''
ServerXmlHttp.send "<product><tags></tags></product>"

'''' Now I will repopulate the product tags ''''
Set ServerXmlHttp = Nothing
Set ServerXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
					
ServerXmlHttp.open "PUT", "https://(STORE NAME).myshopify.com/admin/products/(Shopify Product ID).xml", false, (apikey), (pass)
	
ServerXmlHttp.setRequestHeader "Content-type","application/xml"
'''' Below I am populating the tags with actual tag values ''''
ServerXmlHttp.send "<product><tags>(Tag 1, Tag 2, Tag 3, etc.)</tags></product>"

 

Alex
Shopify Staff
Shopify Staff
1561 81 325

Hello again,

We've pushed a fix for the above noted behaviour. Let us know here if the issue is somehow still persisting.

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Adam_Walder
Shopify Partner
10 0 2

Great, thank you Alex!

ta2016
Shopify Partner
1 0 0

Hi,

we noticed that our Shopify store has the same issue: some products added using the API in July 2017 are not included in any automatic collections (and there may be others we don't know of).

The product data is intact, because I have manually rebuilt three collections and after that the products appear in them.

E.g.
- product: /products/id115857 was not visible in any automatic collections (before I rebuilt 3 of them),
- but another product from same API import batch: /products/id117469 is included in 9 automatic collections.

We are adding new products with the API twice a week, and it would be very laborous to manually rebuild dozens of collections every week. Please check if something can be done about this.

 

 

Adam_Walder
Shopify Partner
10 0 2

ta2016 - support said the bug is fixed. Just reupdate the product data via the API and it should be fine. If not, just use the temporary workaround I posted. I am still using the workaround because it doesn't effect the speed of the API calls so you won't notice any slowdown.

gturkistani
Shopify Partner
3 0 2

Hi,

 

we are facing same issue. and, we've updated the collections and removed many items from it. But, still appear. 

 

what is your suggestion. 

 

anyone found a solution,

 

Regards,

 

Ghazi

OJ-Global
New Member
1 0 0

Hi 

 

I'm having the same issue too, has a solution been found?

Elizabeth_Chris
Tourist
11 1 7

Also having same issue, but directly editing inside shopify GUI. 

lu2021lu
Tourist
5 0 1

It's 2021, its not fixed yet

FrancescoDS
Shopify Partner
2 0 0

Hello, This bug still exists. We update the product tags via API, the collection is removed from the product page, if you check in the collection the product is not in it, but on the front-end, you still see the product in the collection.

Any news on a fix?