Issue with Product Metafields and Submarkets

Hi,

While gearing up for a theme update with our store, I’ve stumbled across an issue involving product metafields and Shopify’s submarkets feature. I wanted to reach out to see if anyone else has experienced something similar or knows a solution.

Situation
We’re using the Impact theme to show linked product variations on our product pages via metafields (specifically, a list of product references). Normally, this setup includes about 50 products, and it works perfectly fine when viewed in the Store Default market.

The Problem
However, things get weird when I switch to a submarket. Instead of the full list, only 27 out of the 51 linked products show up on the storefront.

Screenshots:

Store Default Market:

Submarket:

Market Setup:

What We Know
The developers of our theme, Maestrooo, have confirmed this isn’t due to the theme itself. They believe it might be an underlying issue with Shopify’s platform or submarkets functionality.

What I’m Looking For
I’d really appreciate any insights or advice from the community:

  1. Has anyone run into similar issues with metafields and submarkets?

  2. Are there specific settings or known bugs related to metafield visibility across different markets that we should be aware of?

  3. Any tips for ensuring consistency in displaying metafield data across multiple market contexts?

Are you using any translations of the metafield?

Is all the products available in the “submarket”?

Should still show them, but go to a 404. But maybe they fixed that?

Hi @JordanFinners,

The metafield is set up as follows. From my knowledge, thats nothing to translate anyways and even if, there are no translations defined for it.

Hi @curzey

yes, all products are available on all submarkets.

Does sound weird indeed.

Are you totally sure that the missing swatches (product references) are available in the region you’re previewing?

Find an example that are missing in some market/region - can you access and add that product to cart anywhere else via that specific market?

Just to exclude a markets/region issue

@curzey yes they are.

Everything shows up fine when previewing “Store Default” in the theme customizer.

When switching to a submarket, or preview the theme, it doesn’t work.

But given the fact it display correctly in “Store Default” in the theme customizer, it can’t be an issue related with the metafield setup.

Edit.: I’m posting here on behalf of the Theme Developers “Maestrooo”, wo have confirmed that it’s an issue with the product metafields API, not the setup or theme.

Anyone who knows/could link someone from the Shopify Dev team to look into this?

Also meantioning @bakura10 due to the relevance of the issue :slight_smile:

Interesting.. nice catch.

Can you link the tweet/post where that is “confirmed”, and then tag Liam-Shopify?

Hello @senkels_dev ,

I can confirm this issue is unrelated to our theme. You will need to have a Shopify engineer working on custom data to investigate this.

Shopify did a change a few weeks ago related to markets and product list metafields, this might be related. I’m going to ping Matt Koenig on your thread, but we (at Maestrooo) won’t be able to do more here.

@curzey I reported that long time ago and this finally got fixed on June 25th by Shopify. Products that are no longer in a market won’t be returned in the product list metafield (so no 404 anymore).

1 Like

@senkels_dev , also if you are on the Slack Partner, please send a DM to Matt Koenig (tell him you’re coming from me) so you can share him details. He will be the guy for those kind of problems.

1 Like

@curzey I reported that long time ago and this finally got fixed on June 25th by Shopify. Products that are no longer in a market won’t be returned in the product list metafield (so no 404 anymore).

Oh cool - I also pinged about that but never heard anything

It took me nearly 1 year of effort and frequent pinging to Shopify to have this solve :smiley:

1 Like

Whoever marked this issus as “Solved”, it is still present!

1 Like

The bug has now been fixed.

@bakura10 As the current setup of the product variations block in Impact is limited to displaying 50 products from the metafield, it would perhaps make sense to change it to {% paginate product.metafields.custom.related_products.value by 100 %} to display all of them.

I assume this could be a frequent limit for anyone wanting to link many color variations of the same product.

Hello senkels. Thanks for the follow-up. To be honest it’s probably not a very frequent use case (you’re the first one who reported this issue in about 4 years since we have this so it’s not that widespread). I will consider it though, although I’m a bit reluctant because, officially, the limit of pagination is 50.

There used to have an “unofficial” limit of 1000 for the paginate, but after many years working, Shopify broke this for performance reason.

When it comes to themes, I’d prefer to keep, as much as possible, the official limits so that we don’t run any kind of problem.

That makes sense of course.

As it actually ways the suggestion by the Shopify Dev Team, I assumed this to be an official solution.

This was the response from the Shopify Dev Team:

To provide some more context, the default pagination limit for metafield references is 50. It is entirely possible to render more than 50 items, however this is done using liquid code.

For example the following snippet will render up to 100 items at a time:

{% paginate product.metafields.custom.related_products.value by **100** %}

{% for product in product.metafields.custom.related_products.value %}

<br>{{ forloop.index }}{{ [product.id](http://product.id/) }}

{% endfor %}

{% endpaginate %}