Enable metatags for comments

Created on 9 April 2023, over 1 year ago
Updated 12 April 2023, over 1 year ago

Problem/Motivation

I would like to enable metatags for comments. My comments are public, I would like to set some Open Graph tags to comment images etc. so they can be shared on Facebook.

Currently only the content type that holds the comments can have tags set, and images in comments do not produce an og:image tag suitable for FB, so I get a really crummy display on FB.

Is it possible to enable this? Via the module or a config somewhere?

Thanks :)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Closed: won't fix

Version

1.22

Component

User interface

Created by

πŸ‡¦πŸ‡ΊAustralia CBEEM

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

Comments & Activities

  • Issue created by @CBEEM
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Are you able to display comments on their own pages?

  • πŸ‡¦πŸ‡ΊAustralia CBEEM

    Ah no, not sure how to do that?

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Do you want to show the meta data for comments on the node pages the comments are shown on?

  • πŸ‡¦πŸ‡ΊAustralia CBEEM

    Yes that would be OK. In particular I have an image field in comments for the blog module content type. I would like an og:image metatag to be available in the header for comments under a given blog topic. I have done it this way so that it easy to take a snap on a phone and put it straight into the image field on a comment, then as an image field it is displayed according to the content type settings.

    Thanks :)

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Metatag is currently only designed to output meta data around the main entity on a page - it's not able to add meta tags for comments when you're viewing the node page the comments are attached to. If the comment entity type had a unique page where you could view it on its own you could then add meta tags to it via defining a new set of default settings for it in the Metatag global settings; even then the meta tags would only show on the standalone comment pages, not when they're shown on a node page.

  • πŸ‡¦πŸ‡ΊAustralia CBEEM

    OK thanks. I'll have to think of some other way to do this.

    Cheers

  • Status changed to Closed: won't fix over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    You might also think through how you would expect to be able to share images from a comment on FB if there are multiple images on a single page - how would you direct FB to share one image vs another, vs the page itself?

Production build 0.71.5 2024