I'm using both Global Redirect and Metatags. And getting duplicate canonical metatags as a result.

<link rel="canonical" href="/professional-development/programs" />
<link rel="shortlink" href="/node/543" />
<meta content="Programs" about="/professional-development/programs" property="dc:title" />
<link rel="canonical" href="http://mywebsite.edu/professional-development/programs" />

For a while I think there was a work around by adding an empty space. On this page ( "http://mywebsite.edu/admin/config/search/metatags/config/global" under the advanced section.

The pervious posts on the issue had workarounds and patches but they were from older versions of the module and don't work anymore. So pls don't call this a duplicate issue.

I will heap mountains of good karma on someone had a workaround for this. Launching site tomorrow.

Thank you!!!!!!

Comments

DamienMcKenna’s picture

Status: Active » Closed (works as designed)

This is by design - you have enabled two modules that each output a canonical URL meta tag. What you need to do is either disable the canonical URL option in GlobalRedirect, or disable the tag in Metatag by removing the value in all of the configurations (global, front page, content, etc).

joelhsmith’s picture

Thanks. I have removed them in all the locations but still get both. Any other ideas?

DamienMcKenna’s picture

If you disabled them in Metatag you'll need to clear the caches to make Metatag reload the configuration for each node.

joelhsmith’s picture

Was a cache issue. Stupid me. Thank you! I'm sending warm thoughts and good karma your way :-)

DamienMcKenna’s picture

From the hassle you went through with this I've added a new issue to the backlog to automatically clear the caches after the configurations are changed: #2319357: Clear caches after configuration changes

Thank you for your unintended contribution! :-)

metaltoad’s picture

DamienMcKenna this was super helpful. Thank you!