hi forum,
when i change a pagetype (e.g. from Page to HomePage) the existing translations of that page keep the original classname and the cms pagetype dopdown for the translations is readonly. $page->getTranslation($locale) returns null although a translation exists. that is because the corresponding query filters by classname: ("SiteTree"."ClassName" IN ('HomePage')).
my question is: how is this supposed to work? does a valid translation have to have the same classname and all translations should have their classnames changed like i assume after inspecting Translatable::onBeforeWrite()? or should it be possible to have translations with different classnames wich should be returned by Translatable::getTranslation()?
class Page_Controller extends ContentController {
public function Homepage($locale) {
if(empty($locale)) $locale = Translatable::get_current_locale();
$homepage = $this->Page('home');
$_REQUEST['showqueries'] = 1;
if($homepage->Locale != $locale) $homepage = $homepage->getTranslation($locale);
$_REQUEST['showqueries'] = null;
return $homepage;
}
}
anyway, looks like this is broken. or am i missing something.
i'm using ss3.1.0.beta1 with the most recent version of translatable.
cheers
andy