Metatags don't respect langcode

Created on 10 April 2025, 16 days ago

When using a langcode on a query everything is returned in the correct language apart from metatags. I've checked they are working in the Drupal admin pages as expect just not in the graphql queries.

I tried to pinpoint where the issue is but not been able to find. Does anyone know what it might be?

🐛 Bug report
Status

Active

Version

2.3

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @marcus.w
  • Think I've narrowed it down to metatag_computed. But even if you pass in the langcode it doesn't work. Guess as this is the only thing using fetchDataByPropertyPath it makes sense as to why this is the only thing that doesn't work.

        $metatags = $this->renderer->executeInRenderContext(
          $render_context,
          function () use ($typed_data, $bubbleable, $context) {
            return $this->getDataFetcher()
              ->fetchDataByPropertyPath($typed_data, 'metatag', $bubbleable, $context->getContextLanguage())
              ->getValue();
          }
        );
    
Production build 0.71.5 2024