hello I’m new with Backdrop and I'm finished building a website.
I have a problem with the metatag module.
I would like to use it for sharing articles on Facebook. So, in the content type "article", I created a field named "facebook_share" for og: description.
In the "metatag" configuration page, open graph section, in the "content description" field, I specified [node: field_facebook_share] token.
But when I look at the source code of the page, I do not see any og: description
Do I forget something?
Thank you for your attention and the help :)
A link to a page of the web site : https://zine.lechantdesmuses.fr/le-canard-kenyan
That sounds right to me. This metatag configuration takes place in the "Content" Metatag Type, or did you put it in "Global"?
Also, did you clear caches after you changed settings?
Yes, in the "Content" Metatag type.
I also tried to put them directly into one or other of my content types, but it does not change anything. (for exemple in "Article" content type).
…and I cleared caches.
I recreated what you described in a local sandbox and it seems to be working:
Are you typing the token manually, or using the token selector? Any chance of a typo?
Here is a screenshot of the configuration for the type "Content" in Open graph section, and for two other content types: Article and Œuvre.
Note that I also used an "Image" tag that does not work either:
Here is a screenshot with the available tokens ... and the field "content description" filled:
…and the result in the source code of an "article" page:
What version of Metatag are you using?
What type of field is the Facebook Partage field -- plain text, WYSIWYG... text field or text area?
Got to run for now...
text field, plain text, size of the text field: 58
… Thank you very much to try to help me, and good run :)
I installed Metatags fresh on my sandbox to make sure none of the tweaks I was making as I troubleshot had any effect, and I am able to reproduce this. It seems to keep the default setting for Description (which is the "Summary" of the main body field) even though a different field token is specified. I'll see if I can track down where that is because I must have tweaked something last night while troubleshooting that got it to work temporarily. (Then we can file a bug fix PR for the module).
I haven't solved it but it looks like there is an issue already filed on Metatag about this bug.
Yes, it could be that :/
…And the same goes for the image field !