- Issue created by @mhmhartman
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
How frustrating!
The metatag field is hidden, as its automatically added to every entity once the the module is enabled. Just in your case, its automatically giving you errors, and sucks.
Lets fix that
What version of the metatag module are you using? - Status changed to Postponed: needs info
about 1 year ago 11:13pm 21 September 2023 - 🇳🇱Netherlands mhmhartman
Hi Almunnings,
At least in my situation the metatags are not automatically added. I have verified that the "GraphQL Compose: Metatags" module is enabled and the content does have metatags entered.
This is my query:
query PageQuery { route(path: "/test-page") { ... on RouteInternal { __typename entity { ... on NodeArticle { id title path changed { time } mediaImage { __typename ... on MediaContentImage { id name mediaImage { variations(styles: HEADER_IMAGE) { url } } } } } } } } }
And this is the result:
{ "data": { "route": { "__typename": "RouteInternal", "entity": { "id": "4d9a8e9a-6dc0-43c3-813a-0cfebc2952f4", "title": "Test page", "path": "/test-page", "changed": { "time": "2023-09-21T14:34:03+02:00" }, "mediaImage": { "__typename": "MediaContentImage", "id": "5def8848-20e2-456d-a2af-0b0d3c67a547", "name": "pyramids-egypt-banner-header_0.jpg", "mediaImage": { "variations": [ { "url": "http://localhost/sites/default/files/platform/styles/header_image/public/content/2023-09/pyramids-egypt-banner-header_0.jpg?itok=dS2kOMS5" } ] } } } } } }
Used versions:
- Core: 9.5.10
- Metatag module: 2.0.0
- Metatag schema: 3.0.1
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
Apologies for the automatic misunderstanding. It automatically adds the field to your entity via the MetaTagInterface.
You still need to query it.
I’ll try and recreate your initial issue.
- 🇳🇱Netherlands mhmhartman
Thanks Almunnings,
using the following query I get the required results:
metatag { ... on MetaTag { tag } ... on MetaTagLink { attributes { rel href } } ... on MetaTagValue { attributes { name content } } ... on MetaTagProperty { attributes { property content } } } }
After execution I don't get any errors, so from my side there are no more issues.
The warnings like "Interface field MetaTagInterface.metatag expected but MediaVideo does not provide it." may still cause unexpected problems though.
Thank you for your help.
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
Out of interest, did you only see the error on initial install?
Do you still see it?It could just be cache if you non longer see it.
- 🇳🇱Netherlands mhmhartman
No I had it for a while, even after fresh install and cache clears. I cant reproduce the errors anymore either..
Sorry I cant be more helpful, I'll let u know when I discover something.
-
almunnings →
committed 02694be5 on 2.0.x
Issue #3388494: Enabling metatags submodule generates error "Interface...
-
almunnings →
committed 02694be5 on 2.0.x
- Status changed to Fixed
about 1 year ago 6:13am 22 October 2023 - 🇦🇺Australia almunnings Melbourne, 🇦🇺
I was able to reproduce it on another install with paragraphs.
Interestingly
MetatagDefaultsForm::getSupportedEntityTypes()
doesn't apply the same logic as the way they actually add the metatag field inmetatag_entity_base_field_info
.I'm probably missing something, but to me it seem like just checking if the metatag field is on the basefields is all the check I need here.
Added check to dev for next release.
- 🇮🇳India er.garg.karan Chandigarh
I am using "2.0.0-beta11" version of graphql_compose and still see this issue. When can we have this fix released in a stable version?
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
Looking to get 2.0.0 out the door this week. Even if its still got issues, at least its in the semantic versioning range. RC is for wimps.
Did a heap of refactoring, so just a bit paranoid on the next release.
- Status changed to Fixed
about 1 year ago 10:00pm 6 November 2023