Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Use this page as the 'home page' for the following domains

Go to End

9 Posts   3308 Views


Community Member, 35 Posts

23 February 2012 at 5:00pm

Hey Jason,
thanks for the feedback and the patch. i just took a look and this is actually a bug with the Translatable class in SS 2.3+. it uses similar code to put in the faulty links in the page:

function MetaTags(&$tags) {
		$template = '<link rel="alternate" type="text/html" title="%s" hreflang="%s" href="%s" />' . "\n";
		$translations = $this->owner->getTranslations();
		if($translations) foreach($translations as $translation) {
			$tags .= sprintf($template,

if it was changed to write in $translation->AbsoluteLink() it would be correct, but Link() essentially gives a relative link. i just made a patch and sent a pull request for the Translatable module for Silverstripe 3.0, so we wouldnt need this patch in the future. For 2.4, we could either add this to SingleLocaleDomain so it removes code then adds code, or we could write another class that extends translatable and use it in place of translatable, then override the Metatags function in the Translatable extension. either way i'll probably have to branch the development in github. (now that i think about it, i think they are changing decorators in SS3.0 too so i'd probably have to do that sometime anyways).

any thoughts here? i'm tempted to override Translatable instead to fix the root cause of the problem.

thanks again for the patch and letting me know about the issue.

Go to Top