Dear Team,
I recently performed an update to Drupal core, upgrading it to version 10.2.1 and implementing Metatag 2.0 on our headless website using Gatsby with JSON API.
However, I have encountered a multifaceted issue.
Upon investigating, I discovered that the 'field_metatag' is serialized in string format rather than an array rendered format. Consequently, this serialization method is causing the field to render as null. This is particularly problematic as the frontend relies on the field 'title' and 'description,' both of which are also returning null values in GraphQL.
I am seeking a solution or patch to address both the serialization format and the null values promptly, as these issues significantly impact the functionality of the website
Json api
/jsonapi/node/homepage
// 20240108174723
// https://example.com/jsonapi/node/homepage
{
"jsonapi": {
"version": "1.0",
"meta": {
"links": {
"self": {
"href": "http://jsonapi.org/format/1.0/"
}
}
}
},
"data": [
{
"type": "node--homepage",
"id": "6a61bbde-88c5-4cee-b4d0-64c3b3e12469",
"links": {
"self": {
"href": "https://example.com/jsonapi/node/homepage/6a61bbde-88c5-4cee-b4d0-64c3b3e12469?resourceVersion=id%3A8"
}
},
"attributes": {
"drupal_internal__nid": 8,
"drupal_internal__vid": 8,
"langcode": "fr",
"revision_timestamp": "2021-06-10T06:27:59+00:00",
"revision_log": null,
"status": true,
"title": "Homepage",
"created": "2021-06-10T06:27:50+00:00",
"changed": "2024-01-08T13:46:55+00:00",
"promote": false,
"sticky": false,
"default_langcode": true,
"revision_translation_affected": true,
"metatag": [
{
"tag": "meta",
"attributes": {
"name": "title",
"content": "TEST - Accueil"
}
},
{
"tag": "meta",
"attributes": {
"name": "description",
"content": "TEST a pour mission d’imaginer, de construire et d’entretenir des infrastructures de transport de façon responsable."
}
},
{
"tag": "meta",
"attributes": {
"name": "keywords",
"content": "TEST, engagement, actualités, talents, innovation, activités"
}
},
{
"tag": "link",
"attributes": {
"rel": "canonical",
"href": "https://example.com/fr/homepage"
}
},
{
"tag": "meta",
"attributes": {
"name": "robots",
"content": "noindex, nofollow"
}
}
],
"path": {
"alias": "/homepage",
"pid": 312,
"langcode": "fr"
},
"publish_on": null,
"unpublish_on": null,
"content_translation_source": "und",
"content_translation_outdated": false,
"field_metatag": "{\"description\":\"TEST a pour mission d\\u2019imaginer, de construire et d\\u2019entretenir des infrastructures de transport de fa\\u00e7on responsable.\",\"keywords\":\"TEST, engagement, actualit\\u00e9s, talents, innovation, activit\\u00e9s\",\"title\":\"TEST - Accueil\"}"
},
}
}
}
Graphql
{
"data": {
"allNodeHomepage": {
"edges": [
{
"node": {
"field_metatag": {
"title": null,
"description": null
}
}
}
]
}
},
"extensions": {
"enableRefresh": "true"
}
}
Your assistance in resolving this issue would be greatly appreciated.
Thank you