What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Can't receive OnlineStorePage translation

Solved

Can't receive OnlineStorePage translation

jasperesign
Excursionist
20 1 2

Since this week it's not possible anymore to receive a single OnlineStorePage translation via GraphQL.

 

This is happening when I do a POST call to `/admin/api/graphql.json` with request data:

 

{
  translatableResource(resourceId: "gid://shopify/OnlineStorePage/123") {
    resourceId
    translatableContent {
      key
      value
      digest
      locale
    }
    translations(locale: "nl") {
      key
      value
      locale
    }
  }
}

 

I do this call via a GuzzleHttp Client, but that should not be the issue because the strange thing is that the query above works for other translatable resources, which are working perfectly.

 

Can you please check if there is something changed for the OnlineStorePage resource or if there is something going on?

 

Let me know if you need more details on this one.

 

Thanks in advance!

Accepted Solution (1)
jasperesign
Excursionist
20 1 2

This is an accepted solution.

Ok, I found the problem myself.

 

Looks like having the `read_translations` admin API access scope is not enough.

 

To receive translations for OnlineStoreBlog, OnlineStoreArticle and OnlineStorePage, you also need the `read_content` scope to access it.
For DeliveryMethodDefinition translations you need the `read_shipping` scope.

 

I'm a bit upset that Shopify didn't report anything related to this change in the changelog.

View solution in original post

Replies 3 (3)

jasperesign
Excursionist
20 1 2

After this weekend also OnlineStoreBlog, OnlineStoreArticle and DeliveryMethodDefinition are affected...

 

OnlineStoreTheme was reported by a customer, but we can't reproduce it at this moment.

 

Can you please look into these affected translatable resources?

 

Thanks in advance!

jasperesign
Excursionist
20 1 2

This is an accepted solution.

Ok, I found the problem myself.

 

Looks like having the `read_translations` admin API access scope is not enough.

 

To receive translations for OnlineStoreBlog, OnlineStoreArticle and OnlineStorePage, you also need the `read_content` scope to access it.
For DeliveryMethodDefinition translations you need the `read_shipping` scope.

 

I'm a bit upset that Shopify didn't report anything related to this change in the changelog.

rohitmishra
Shopify Staff
21 2 14

We should have caught this change of behavior. I will investigate what caused this, and why it was not exposed on changelog. Thanks for reporting a solution here.

Product Lead, Global Commerce and Sales Tax