Jump to:

659 Posts in 2116 Topics by 163 members

Releases and Announcements

SilverStripe Forums » Releases and Announcements » Translatable ClassName BUG?

Latest news about the SilverStripe software.

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

Page: 1
Go to End
Author Topic: 1432 Views
  • maksfeltrin
    Avatar
    Community Member
    6 Posts

    Translatable ClassName BUG? Link to this post

    Anyone got this problem too?

    When I modify an untranslated page behaviour (ClassName), the translated pages keep the original behaviour (ClassName) so I end up with un untranslated page ( getTranslation(s) look for the same ClassName ) .

    The problem is outlined with the following code:

    $page->hasTranslation($some_locale) = TRUE

    but

    $page->getTranslation($some_locale) => NULL

  • maksfeltrin
    Avatar
    Community Member
    6 Posts

    Re: Translatable ClassName BUG? Link to this post

    $page->getTranslation($some_locale, 'Stage')

    works .... changes in the original language page->ClassName are stored in SiteTree not in SiteTree_Live for translated pages. You need to save & publish every translated page to have changes reflected in SiteTree_Live.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Translatable ClassName BUG? Link to this post

    Hm, changing the classname in the original page should update all children... there's even a unit test for this:
    http://open.silverstripe.com/browser/modules/sapphire/trunk/tests/model/TranslatableTest.php#l675 (Line 675).

    But you're right, the changes aren't automatically published - mainly to avoid accidentally publishing changed content on the translations.

    1432 Views
Page: 1
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.