To reproduce;
1. Browse to en/admin/config/search/metatags/config/global
2. open advanced and on robots check:
Allow search engines to index this page (assumed).
Allow search engines to follow links on this page (assumed).
3. create hook_node_insert($node) on some custom module
4. inside this function print the $node and die()
print_r($node);
die();
5. add some content than see the meatatag content
it will be empty

expected: both default values set on step 2.

If I'm checking the values manually it does show the values on this print.

Comments

DamienMcKenna’s picture

Status: Active » Closed (duplicate)
Issue tags: -default values doesn't show on node print

This is a duplicate of #2511158: metatag export problem which I already answered. This is by design.

If you want to get a list of all of the meta tags that will be output for a specific entity you should use metatags_get_entity_metatags().

DamienMcKenna’s picture

@felixsh: Sorry for being brusque with my reply, I thought you were the same person who opened #251158.

You can use the function I mentioned in my first comment to work out what meta tags will be used for a given entity, and I plan on adding a tab to the Devel module to show what the final output will be (#2511346: Add Devel integration to show the meta tags that would be output).