Updating to latest Metatag dev I suddenly got the following for my Commerce Product entities:

Unknown (commerce_product)
Unknown (commerce_product): Unknown (product)

How should I deal with this please? What does the "Unknown" mean.

Greetings, Martijn


davidts’s picture

I have the same problem.

DamienMcKenna’s picture

This is because as of v1.0-beta Metatag requires entity types to be specifically enabled for use with Metatag, rather than automatically assuming all entity types can be used. To enable support for Metatag in the commerce entities, commerce_entity_info() needs to be updated, see metatag.api.php for details. I recommend either submitting a patch to the Commerce project or writing a small module of your own that implements hook_entity_info() to tell Metatag which entities should be supported.

DamienMcKenna’s picture

Status: Active » Closed (works as designed)
rvallejo’s picture

Title: Unknown (commerce_product) » Add support for Drupal Commerce/product tags

Instead of posting a new issue I'm gonna ride on this one...

I've created a simple module to expand on the Metatag module to provide better support for commerce sites.

Metatag Commerce sandbox: https://drupal.org/sandbox/rvallejo/2102725

Currently the only thing DC-specific are some defaults I've set for some of the tags, but I'm also planning on adding a default Product Display configuration. I will also consider enabling support for Commerce Products in this module as well. I welcome feedback and co-maintainers if anyone is interested.

I'm still in the process of developing it. So far, tags included in the sandbox:


I also have the following tags in my working copy, which I'll commit later on today:


twitter:card "product", option added to available card types.

I expect some defaults will need tweaking to work with a more generic setup. I've been working on this to enable Pinterest rich pins, Twitter Cards, etc. for better integration with social networks.

I've also included a fix for og:image and twitter:image tags to split multiple images into multiple tags rather than a comma-delineated list (code originally written by fiftyz over at https://drupal.org/node/1305402#comment-6420040). I included the code as it's necessary to work with social networks, and because fiftyz's code only made the fix for open graph images -- eventually, I assume the fix will be in the appropriate Metatag submodules.

achton’s picture

@rvallejo: What is the status of the support for twitter tags (data1 + data2)? I am not using Commerce, but would like to expose certain bundles as products in Twitter cards, and that requires that I map entity fields to those tags.
See the Card Validator to understand how this works: https://dev.twitter.com/docs/cards/validation/validator

DamienMcKenna’s picture

Can you guys please move to a new issue to discuss this? Your comments have nothing to do with the original request.