Closed kivils closed 3 years ago
Hi,
I suppose "WpTemplate_Шаблон обложки" is a page template that you use, and it uses Cyrillic characters. I've reproduced your issue, and it does not seem to depend on a site language, and I'm not sure how it fixes it in your case (doesn't in mine).
The problem is, WPGraphQL creates a type
for each page template, and a GraphQL type
can only be alphanumeric. WPGraphQL changes type names to make them safe, but for some reason it doesn't work with Cyrillic names at all. That's likely a bug, and it's on WPGraphQL's side.
So when graphql on Gatsby's side validates schema and finds this field, it crashes.
A workaround (only one I can come up with now) I can suggest just renaming the template (change it within the template file, without changing the file name itself). After assigning it an alphanumeric name, it works.
Thanks for the reply and investigation! "WpTemplate_Шаблон обложки" - is a default name in twenty-twenty theme in Russian, didn't change it. When site language is English, it works. Most likely WPGraphQL uses msgstr for page template, and it's in Cyrilic (in case of Russian). Will check WPGraphQL for similar issue or create a new one.
For further information: It worked fine with this configuration:
Ahh, yep good investigation and this is indeed an upstream issue. It might also be worth asking about this on the Gatsby repo - WPGraphQL seems to be fine with Cyrilic characters in type names but Gatsby does not. The only thing is I'm not sure if this is coming from graphql-js
or Gatsby itself :thinking:
In any case I'm going to close this because there's nothing that can be done in this plugin to fix it and either fix will be upstream. Thanks for opening this issue!
Hi! I'm facing an error:
gatsby develop
fails when site language is set to Russian id wordpress admin panel. If I switch site language to English (UK) -gatsby develop
doesn't fail and static site is generated as expected.Not sure if this error relates to gatsby-source-wordpress-experimental or WP Gatsby/WP GraphQL.
Environment:
Error message