Skip to content
New issue

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

open graph component field names fails in graphql #93

Open
zoran995 opened this issue Nov 16, 2024 · 2 comments
Open

open graph component field names fails in graphql #93

zoran995 opened this issue Nov 16, 2024 · 2 comments

Comments

@zoran995
Copy link

The version of plugin 2.0.2 doesn't work in the strapi app that uses GraphQL as the field names contain : which is not supported in QraphQL. Exact error is

GraphQLError: Names must only contain [_a-zA-Z0-9] but "og:title" does not.

I can resolve the error by manually updating the component but it might be worth updating in the plugin and the release pages.

@harold-gr-dev
Copy link

Hi @zoran995 . What did you do exactly? I tried to install the plugin but my DB crashed and Strapi stopped working.

Any advice?

@zoran995
Copy link
Author

Hi @harold-gr-dev I just updated the open-graph custom component definition src/components/shared/open-graph.json
so it has prop names with an underscore (_) instead of a colon (:)
i.e.

"og_title": {
  "type": "string",
  "required": true,
  "maxLength": 70
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants