How can I display missing namespaces in metafields without a definition?

TDroneWarehouse
Visitor
1 0 2

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"?

Replies 14 (14)

IttantaTech
Shopify Partner
525 55 102

@TDroneWarehouse 

https://shopify.dev/api/liquid/objects/metafield

Thanks,
Ittanta Technologies Pvt. Ltd. | Shopify Expert
If reply is helpful, please Like and Accept Solution.
To hire us, contact us at info@ittanta.com
r8r
Shopify Expert
2555 327 940

@IttantaTech – this does not answer anything about @TDroneWarehouse's question. Did you solve this by now?

Mario

★ Ja, man kann mich buchen; schreib mir eine Nachricht!
★ Hinterlass gerne ein Like und markiere meine Antwort gegebenenfalls als Lösung. Ich freue ich mich immer über eine Spende an die (Kinder)krebshilfe oder eine kleine Aufmerksamkeit.
Studio Mitte
r8r
Shopify Expert
2555 327 940

@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

★ Ja, man kann mich buchen; schreib mir eine Nachricht!
★ Hinterlass gerne ein Like und markiere meine Antwort gegebenenfalls als Lösung. Ich freue ich mich immer über eine Spende an die (Kinder)krebshilfe oder eine kleine Aufmerksamkeit.
Studio Mitte
Gabe
Shopify Staff
16733 2640 3918

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

drewisme
Shopify Partner
13 2 19

@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

kalyan_chakri
Excursionist
23 0 7

Thanks @drewisme for the solution. It helped. Do you know why they are missing or it's a mistery?

Neethan
Shopify Staff (Retired)
5 2 13

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] 

 

 

kalyan_chakri
Excursionist
23 0 7

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.

Neethan
Shopify Staff (Retired)
5 2 13

Hi @kalyan_chakri, that's great feedback! I'll bring this feedback to the team to make it more clear directly on the page.

kalyan_chakri
Excursionist
23 0 7

Thanks for considering it @Neethan excited to see it there!

Andy-Envision
Shopify Partner
15 0 15

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. 

drewisme
Shopify Partner
13 2 19

@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

Andy-Envision
Shopify Partner
15 0 15

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. 

Andy-Envision
Shopify Partner
15 0 15

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!