Problem/Motivation

Snippet preview within blog post is displaying the "Body" field text, rather than the "Summary" field text as specified by the [node:summary] token within the meta tags > Basic tags > Description settings for the post.

However, the code reflects the appropriate meta tags in the header.

Steps to reproduce

  1. Set default meta tags for the Content > description:. (See attached bug-image-1-meta-tags image)
  2. Create a blog post, filling out the Title, Summary, Body fields. Review "Snippet Preview" section under the "Real-time SEO for Drupal" section. It is not pulling the appropriate information according to the default tokens set within the Meta tags > Basic tags > Description section. (See attached bug-imate-2-post-fields-rtseo-display image)
  3. Review code to make sure meta tags are displaying properly within section. (See attached bug-image-4-page-head-code-after-saving image)

    1. Proposed resolution

      Make sure the Real-Time SEO for Drupal snippet preview is pulling the appropriate field within the interface. Can cause confusion for users.

      Remaining tasks

      User interface changes

      API changes

      Data model changes

Comments

tracyamescooper created an issue. See original summary.

anruether’s picture

If I understand this issue correctly it also applies to 2.x: If a token is used in metatags description, yoast_seo does not use the value of that token.

I would expect the same behaviour as with the metatags title field: If I insert a token e.g. [node:title] | [site:name] and after clicking on another field, yoast_seo updates the preview immediatly.

jplana’s picture

I have a similar problem, where the [node:summary] seems to be replaced within the browser, and the meta description field ends up containing HTML.

Even if I try replacing the token in the metatag configuration the SEO module seems to be ignoring my settings.

jplana’s picture

StatusFileSize
new621 bytes

After some more digging I saw that the Yoast SEO module defaults the summary field to be the body (yoast_settings.fields.summary). This will make the meta description snippet to get the unparsed content of the body field.

I put together a patch that strips the HTML tags from all fields. Unfortunately I don't have a solution for the original issue reported here.

superyaourght’s picture

Hello,
I had the same issue. I forgot to extend the permissions of metatag to the content type.

You can find it in /admin/config/search/metatag/settings and activate basic metatags for the content with yoast on.