loop through list.metaobject_reference metafield's not working
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11.9k
- Forks
- 1.5k
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 3
Description
Hello,
I think there is a bug with the list.metaobject_reference in product metafields.
In product, I have a meta field "estate" which is of type : list.metaobject_reference
When i do for example :
{% for myEstate in product.metafields.custom.estate.value %}
{{ myEstate | dump }}
{% endfor %}
I have only one entry in the for. But when i do :
{{ product.metafields.custom.estate | dump }}
I have the following print :
["gid://shopify/Metaobject/22999368029","gid://shopify/Metaobject/22999597405","gid://shopify/Metaobject/22999531869","gid://shopify/Metaobject/22999695709"]
I don't understand why it doesn't goes through all attached Estates, and if i do something like:
{{ product.metafields.custom.estate.value | json }}
It show me the first referenced metaobject, but i cannot access any other one..
Any one has the same problem ? Is it a bug ? Base on documentation i should be able to iterate through all values.
But this is not working at this time.
Many thanks for any help 😄
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report provides a Liquid reproduction but names no repository file, test, or entry point. Start by locating the handling of list.metaobject_reference values, then compare iteration over .value with the raw metafield output; done means all four referenced metaobjects are available during iteration.
Written by the indexing model from the issue text.
Assessment
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100