Jump to:

23550 Posts in 19336 Topics by 2890 members

General Questions

SilverStripe Forums » General Questions » Use this page as the 'home page' for the following domains

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

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

Page: 1 2
Go to End
Author Topic: 2113 Views
  • Chris_Bryer
    Community Member
    35 Posts

    Re: Use this page as the 'home page' for the following domains Link to this post

    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.

Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.