We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
localized
The localized gql property is empty when the request is made with a Craft preview token.
token
Make a query like this to an entry that has been added to multiple sites:
query { entries(site: "fr_fr", uri: "fr-fr/articles/the-power-of-yes") { id title localized(site:"en") { id title } } }
Try it with and without a Craft preview token.
The localized property to return the same value, regardless of whether previewing
Without token query param:
{ "data": { "entries": [ { "id": "6806", "title": "Le pouvoir du « oui »", "localized": [ { "id": "6806", "title": "The Power of Yes" } ] } ] } }
With query param:
query
{ "data": { "entries": [ { "id": "2249945", "title": "Le pouvoir du « oui »preview", "localized": [] } ] } }
Example of the request I'm making with a token:
curl --request POST \ --url 'https://domain.com/api?token=JBdBAgdNw6B1Cwu_enp-1goV_RzU0W5j' \ --header 'Content-Type: application/json' \ --data '{"query":"query getArticles {\n entries(\n site: \"fr_fr\"\n\t\turi: \"fr-fr/articles/the-power-of-yes\"\n\t) {\n id\n title\n localized(site:\"en\") {\n id\n title\n }\n }\n}\n","operationName":"getArticles"}'
4.5.6.1
8.0.30
Darwin 23.0.0
MySQL 8.1.0
GD 8.0.30
The text was updated successfully, but these errors were encountered:
b44f59a
Thanks for reporting! Just fixed that for the next release.
If you want to get the fix early, change your craftcms/cms requirement in composer.json to dev-develop as 4.5.10, and run composer update.
craftcms/cms
dev-develop as 4.5.10
composer update
Sorry, something went wrong.
Craft 4.5.11 is out with that fix. Thanks again!
No branches or pull requests
What happened?
Description
The
localized
gql property is empty when the request is made with a Craft previewtoken
.Steps to reproduce
Make a query like this to an entry that has been added to multiple sites:
Try it with and without a Craft preview
token
.Expected behavior
The
localized
property to return the same value, regardless of whether previewingActual behavior
Without
token
query param:With
query
param:Example of the request I'm making with a token:
Craft CMS version
4.5.6.1
PHP version
8.0.30
Operating system and version
Darwin 23.0.0
Database type and version
MySQL 8.1.0
Image driver and version
GD 8.0.30
Installed plugins and versions
The text was updated successfully, but these errors were encountered: