BUG: Liquid page_description returns the untranslated store meta description on the search template

Hi Shopify team!

We’d like to report a bug with the store meta description on the search page.

The store meta description (Online Store > Preferences) is translated and published for our secondary languages, through Translate & Adapt (Store metadata > Search engine listing) and through the Admin API (SHOP resource, key meta_description).

The bug

The Liquid object {{ page_description }} doesn’t return the translation on the search template. On /en/search, /fr/search, /en/search?q=shoes… it always returns the store meta description in the store’s main language.

The other templates that use the same store meta description, the homepage and the collections list (/collections), return the translated text. The rest of the search page is translated too: page_title, request.locale and the t filter all work.

It’s not theme-related: it happens on a fresh copy of Horizon and on every multi-language Shopify store we checked. Happy to share example stores where this happens.

How to reproduce

  1. Publish a second language.
  2. Translate the store meta description and publish it.
  3. Compare the page source of /{language} and /{language}/search.

Expected

On /search, page_description should return the translated store meta description, the same as on the homepage.

Could you please look into it and fix it? Thanks!

Thanks for flagging this @senabre!
I’m not able to provide a timeline for a fix at this stage, so in the meantime, please refer to the workaround below.

Replace the theme’s existing meta-description output with the code below. It uses shop.description on search pages, which is translated there, unlike page_description:

{%- liquid
  assign meta_description = page_description
  if request.page_type == 'search'
    assign meta_description = shop.description
  endif
-%}

{%- if meta_description != blank -%}
  <meta name="description" content="{{ meta_description | escape }}">
{%- endif -%}

Thanks @Paige-Shopify We’ll use that in the meantime as a workaround

Hi @senabre, we’ve deployed a fix for this so the workaround is no longer required. Let me know if you’re still seeing the issue.

Thanks! It’s fixed. Testing in 5 stores and it’s working well now @Paige-Shopify

Thanks for checking and confirming!