backdrop-contrib / metatag

Add structured metadata, aka "meta tags", for various pages on your site.
GNU General Public License v2.0
3 stars 15 forks source link

image field token doesn't work at all #48

Closed robertgarrigos closed 4 years ago

robertgarrigos commented 4 years ago

I use a non standard image field token (it's not [node:field_image] but [node:field_imatge_principal]) and is not working:

Metatag___Garrigos_cat

Also, when editing the settings, the opengraph URL image field get automatically populated (if I left it empty) with [node:field_image], which I don't use (not even in any global setting):

image-field

Metatag___Garrigos_cat

robertgarrigos commented 4 years ago

I'm aware of this (https://github.com/backdrop-contrib/metatag/issues/17) and tried to change my single value image field to multiple values, just in case it was an introduced bug, but it doesn't work either.

This happens with all the image fields (in advanced tags, opengraphs and twitter tags)

robertgarrigos commented 4 years ago

I see what happens. Got it fixed (partially): I had to add the tick in the metatag settings for the node type:

Metatag___Garrigos_cat

This is a bit confusing because metatag module comes with a tick already on "Node".

But it hasn't been fixed is the autopopulation of the image field with [node:image_field]. I see that every time I save the content settings, I see some error messages on my logs:

Warning: count(): Parameter must be an array or an object that implements Countable in metatag_metatag_config_instance_info() (line 22 of /home/robert/blog/www/modules/contrib/metatag/metatag.metatag.inc).

I'm on PHP 7.3

robertgarrigos commented 4 years ago

Right. I will divide this bug into two others and fill their PRs.