several lines of code added to the system/route66 plugin fix the issue.
From the comment, I added 8 lines. Then I added one test to the addHeadLink test (&&empty($canonical))What this modification does is check the head links for an existing canonical tag. If it's empty - your route66 generated canonical tag is added.
public function onBeforeCompileHead()
{
$application = JFactory::getApplication();
$document = JFactory::getDocument();
if ($application->isClient('site') && $document->getType() == 'html')
{
// Check if a canonical html tag already exists (for instance, added by a component).
$canonical = '';
foreach ($document->_links as $linkUrl => $link) {
if (isset($link['relation']) && $link['relation'] === 'canonical') {
$canonical = $linkUrl;
break;
}
}
if ($this->params->get('canonical', 1) && $this->canonical && empty($canonical))
{
$document->addHeadLink(htmlspecialchars($this->canonical), 'canonical');
}
if ($this->params->get('facebookPageId'))
{
$document->addCustomTag('<meta property="fb:pages" content="' . $this->params->get('facebookPageId') . '" />');
}
if (JPluginHelper::isEnabled('content', 'route66metadata'))
{
$this->setMetadata();
}
}
}