After metatag_entity_info_alter() and metatag_entity_supports_metatags() were changed in #1846080: Only enable Metatag on entities that request it to specifically enable support on certain entities rather than guestimate whether they should be supported, there has been some redundant code in metatag_entity_info_alter() that could be removed - all this function should do is assign 'metatags' => TRUE for the supported core entities, nothing more.


DamienMcKenna’s picture

Status: Active » Closed (works as designed)

Then again, metatag_load_entity_from_path() does some additional checks against the current page path to identify whether the current path is for a specific entity. However, this function uses the entity type variable 'default path' rather than 'path' so it won't do anything; also, this function is never called.

Finally, both metatag_ctools_render_alter() and metatag_views_post_render() use the entity type's 'path' variable, so perhaps this should be left as-is.