10446 Posts in 2223 Topics by 1719 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 227 Views |
-
TRANSLATABLE: getTranslation fails after changing pagetype (SS3)

4 January 2013 at 2:08am
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
-
Re: TRANSLATABLE: getTranslation fails after changing pagetype (SS3)

13 March 2013 at 7:30pm
Bump.
Andy any progress on this? I'm getting the same thing.
Cheers
Jeremy
| 227 Views | ||
|
Page:
1
|
Go to Top |


