Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello
Prior to Shopify 2.0 adding metafields, I was using an metafields app. Only one of the namespaces is showing up in "metafields without a definition", most of my namespaces are missing. When I add a new definition using one of the missing namespaces and key, I get the error "Namespace and key is already in use for a set of your metafields." How do I get these missing namespaces to show in "metafields without a definition"?
https://shopify.dev/api/liquid/objects/metafield
@IttantaTech – this does not answer anything about @TDroneWarehouse's question. Did you solve this by now?
Mario
@TyW & @Gabe – I cannot find any official documentation on migrating existing metafields to the rather new native metafield interface. Am I missing something or is the metafield feature missing something?
Thanks,
Mario
Hey Mario! @r8r
To migrate the metafields you can add /metafields.json
to the product resource - e.g. myshopify.com/admin/products/[product_id]/metafields.json to determine existing metafields.
Then, if you are migrating the existing theme to 2.0 too, the existing metafields should show or can be added in the metafields area in the main settings. And you should be able to migrate your existing theme with metafields to the new theme 2.0 (including the new metafield types) by following this developer help doc.
The other way to do it with the current theme version is to code manually. More information about adding metafields can be found here: Displaying metafields on your online store · Shopify Help Center. And here, as already posted above, is the help doc about metafields too: The metafield object.
You can also migrate in one of the following two ways:
Some stores are reporting since the recent update that their metafield types are now like "String (old)" or "Integer (old)" (deprecated). In addition, this changelog entry states that the support of the existing valueType
will be removed in October. So if you are migrating all of your metafields types to the new ones, the above docs should help.
Gabe | Social Care @ Shopify
- War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen!
- Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung
- Um mehr zu erfahren, besuche das Shopify Help Center oder den Shopify Blog
@TDroneWarehouse Not all existing metafields show in the "Metafields without a definition tab". I was able to get passed the "Namespace and key is already in use for a set of your metafields." error by visiting the migrate link for a metafield definition directly. Replace "namespace" and "key" with your specific metafield data.
https://shop.myshopify.com/admin/metafields/product/migrate/namespace/key
Thanks @drewisme for the solution. It helped. Do you know why they are missing or it's a mistery?
Hi @kalyan_chakri, this is Neethan from the Metafields team! We currently have a limit of 10 and are working on increasing the number of metafields visible from the "Metafields without a definition" tab.
For now we recommend using the migration url @drewisme mentioned earlier for metafields that don't show up in that tab: https://[my_shop].myshopify.com/admin/metafields/product/migrate/[my_namespace]/[my_key]
Thanks @Neethan I was able to resolve it. It's good if a notice is shown in that page otherwise it is leading to confusion.
Hi @kalyan_chakri, that's great feedback! I'll bring this feedback to the team to make it more clear directly on the page.
I'm trying this for blog posts and it's not working. This is the format I'm using...
https://store.myshopify.com/admin/metafields/blogs/blog-name/article-name/migrate/seo/hidden
I can't see these metafields in the admin area under "without a definition" and I can't add the namespace and key as a new definition either.
@Andy-Envision Go to Settings > Metafields > Blog Posts and then append "/migrate/seo/hidden" to the url:
https://store.myshopify.com/admin/metafields/article/migrate/seo/hidden
Ahh ok duh, thanks! I appreciate the help!
Well, I've been able to get all of the resources removed from the SERPs (again) but I still can't get them to stop appearing in store search.
So Out of the Sandbox developers are telling me that using the seo hidden metafield will only work with hiding Products from the store search. But the shopify developer docs say "any resource" should be removed from store search using this metafield, as it removes the resource from the sitemap.
I tested this in a sandbox site using the Dawn theme and the metafields are only hiding Products from store search. Can anyone explain what is going on? Did Shopify change something, because I'm 99.9 % sure this approach worked in the past for ALL resources. For example, we have created customized Blog templates to act as a video gallery, where the supporting blog posts only house certain code to populate the gallery on the main Blog page, and we would hide the individual blog posts from search with this metafield.
@Neethan any ideas on this?
Thanks!
Hello, this post dates a couple of years ago but I'm looking to solve the same question.
I used the link you gave but unfortunately, it says I don't have an access.
Do you know any other any to see and also delete namespace and keys that are no longer in use?
Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-TekLabs to discuss practical strategies for...
By JasonH Nov 13, 2024The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024