App reviews, troubleshooting, and recommendations
we tried to migrate from `Metafield.valueType` to Metafield.type
but when we use type="json" as per this article
https://shopify.dev/apps/metafields/types
we get error
{ "metafields": { "shop": "testsite.myshopify.com", "settings": {"error":"json not allowed for this object"}, "moneyFormat": "\u003cspan class=money\u003eRs. {{amount}}\u003c\/span\u003e" } }
any idea to resolve will be great
we were using Metafield->put
it works fine with
"type" => "json_string"
but
"type" => "json"
does not work
Hi,
Was just checking your post, I can not see any problem with the approach you have mentioned. Since i can not see your code can't tell very specifically but it seems like you have problem with metafield definition Mutation.
If you can share your code then i would be able to tell you exact problem.
i was using this code to create new theme file but seems its old theme code and we need to migrate to OS2 theme code, but customer who is using OS1 theme code wont have issue if we start pushing OS2 code in all store as shopify is throwing error with above code and deadline is 1st jan 2023 and any idea on how to change below code for OS2 will be great
{%- comment -%}Please DO NOT edit this file{%- endcomment -%}
{%- layout none -%}
{%- assign paramKey = \'q\' -%}
{%- assign paramValue = \'\' -%}
{%- capture contentForQuerystring -%}{{ content_for_header }}{%- endcapture -%}
{%- assign pageUrl = contentForQuerystring | split:\'"pageurl":"\' | last | split:\'"\' | first | split:\'.myshopify.com\' | last |
replace:\'\/\',\'/\' |
replace:\'%20\',\' \' |
replace:\'\u0026\',\'&\'
-%}
{%- assign pageQuerystring = pageUrl | split:\'?\' | last -%}
{%- assign parts = pageQuerystring | split:\'&\' -%}
{%- for part in parts -%}
{%- assign keyAndValue = part | split:\'=\' -%}
{%- if keyAndValue[0] == paramKey -%}
{%- assign paramValue = keyAndValue[1] | strip -%}
{%- endif -%}
{%- endfor -%}
{%- assign namespace = \'pdsocialproof_\' | append: paramValue -%}
{
"metafields": {
"shop": {{ shop.permanent_domain | json }},
"settings": {{ shop.metafields[namespace].settings | json }},
"moneyFormat": {{ shop.money_format | json }}
}
}
were you able to find a solution to your issue? i'm having the same error
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024