Shopify / shopify-api-ruby

ShopifyAPI is a lightweight gem for accessing the Shopify admin REST and GraphQL web services.
MIT License
1.06k stars 471 forks source link

title_tag and description_tag not updating #1238

Closed cfreak closed 11 months ago

cfreak commented 1 year ago

Issue summary

title_tag and description_tag not updating when setting it over Rest-API

seo_settings

We are using this Endpoint: PUT https://houseware-ch.myshopify.com/admin/api/2023-10/metafields/XXXX.json

With this data:

array:1 [ "metafield" => array:3 [ "value" => "Test" "namespace" => "global" "type" => "single_line_text_field" ] ]

And we get the following response with 200 Status Code:

array:1 [ "metafield" => array:11 [ "id" => XXXX "namespace" => "global" "key" => "title_tag" "value" => "Hochwertiges Weinzubehör online kaufen ✓ Top Qualität" // <--This one does not update "description" => null "owner_id" => XXXXX "created_at" => "2023-09-27T14:47:46+02:00" "updated_at" => "2023-09-27T14:47:46+02:00" "owner_resource" => "collection" "type" => "string" "admin_graphql_api_id" => "gid://shopify/Metafield/XXXXX" ] ]

Expected behavior

The Field for the specific collection should change from "Hochwertiges Weinzubehör online kaufen ✓ Top Qualität" to "Test"

Actual behavior

The Value doesn't change

Additional

Not sure why this is happening, or if i'm doing something wrong. But we don't get any error / debug message

Can someone help?

silvolu commented 11 months ago

If I understand correctly, you are making REST request directly rather than using the Ruby library? If that's the case, please post your question in the Metafields developer forum.