- 🇮🇹Italy dgsiegel
Patch #55 does not seem to work with a headless approach. Metatags will be saved in the computed field. In a normal approach, where Drupal is rendering the output, the patch overwrites empty tags with global defaults:
// Merge with global defaults. if (strpos($route_name, 'canonical') !== FALSE) { $metatags->overwriteTags(metatag_filter_empty_tokens($entity_metatags->get('tags'), $entity)); }
However when saving to the computed field, the route is not
canonical
and so global defaults are left untouched. When accessing JSON:API, only the computed field gets accessed and no merge can happen at that time. - last update
about 1 year ago 374 pass - 🇺🇦Ukraine alt.dev
I confirm that the patch doesn't work with the JSON:API module.
I updated the latest patch and added the fix for the computed field.