question

kenth avatar image
kenth asked

UpdateCatalogItems changes catalog to primary

Admin API call to UpdateCatalogItems with a CatalogVersion other than the primary causes the specified catalog to become the primary (and subsequently used in all calls where CatalogVersion is omitted). Is this intended behavior or a bug? At the very least it's undocumented (https://api.playfab.com/Documentation/Admin/method/UpdateCatalogItems).

This causes problems as we use different catalogs to store special meta items, and the game should always use our set primary catalog.

Steps to reproduce and verify:

  1. Create CatalogA and CatalogB where CatalogA is the primary.
  2. Verify that GetCatalogItems API call with no specified CatalogVersion return the items of CatalogA.
  3. Call UpdateCatalogItems with "CatalogVersion":"CatalogB" and arbitrary update data.
  4. Verify that GetCatalogItems API call without specified CatalogVersion now instead returns the items of CatalogB.

As a side note, in the dashboard CatalogA still has a star and is being marked as the primary. This is fixed by using "Edit Catalog" and saving (without performing any changes), which will correctly show that CatalogB is now the primary.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Thanks for calling that out! Reviewing the code, we do see the issue and we'll be fixing it shortly.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kenth avatar image
kenth answered

Thank you for the quick response, glad that it's being handled! As a side note this also affects SetCatalogItems and probably any similar functionality.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Thanks, and yes, that's correct - the issue would affect the catalog returned whenever it's updated by either call. We'll get it taken care of shortly, though.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.