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.

Releases and Announcements

Latest news about the SilverStripe software.

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

Translatable ClassName BUG?


3 Posts   1440 Views


13 September 2009 at 10:27am Community Member, 6 Posts

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


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


13 September 2009 at 11:14am Community Member, 6 Posts

$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.


13 September 2009 at 6:23pm Forum Moderator, 801 Posts

Hm, changing the classname in the original page should update all children... there's even a unit test for this: (Line 675).

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