vaersaagod/seomate

outputAlternate should be disabled if translated page is not active

cecilehabran opened this issue · 1 comments

I have a lot of 404 for translated pages that don't exist (yet).
I assume it's related to the fact that a page has the alternate meta for each language in the head, even if the translation isn't published.
Is there a way to output the alternate ONLY if the translated content is active ?

Maybe adding something like this in the UrlsService (line 135) might solve this:

$enabledSites = $craft->getElements()->getEnabledSiteIdsForElement($element->getId());

if ($url !== false && $url !== null && in_array($site->id, $enabledSites)) { 
    ...
}

This was fixed in 1.1.5.