Hi Everyone,
I have the following code in my _config file to make sitetree and dataobjects translatable:
Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('DOStaffMember', 'Translatable'); //Dataobject
Object::add_extension('DOEvent', 'Translatable'); //Dataobject
Object::add_extension('DOAudioVideoFile', 'Translatable'); //Dataobject
Object::add_extension('DOFolder', 'Translatable'); //Dataobject
Object::add_extension('DOPatent', 'Translatable'); //Dataobject
Object::add_extension('DOFrequentlyAskedQuestion', 'Translatable'); //Dataobject
//Restrict all locales to this list:
Translatable::set_allowed_locales(array(
'en_US',
'de_DE',
'ja_JP'
)
);
The problem that I am getting is that a 'Locale' column appears on my sitetree table (which is normal), but also on tables that have extended the Page class, like Homepage and Blog.
this is messing up some things like Blog archive where it uses a Natural Join in a DB::query() call. (the join finds 2 locale tables and returns nothing)
does anyone have any thoughts why these extra columns are being created? The site is using SS 2.3.3 or 2.3.4 (yes, i need to upgrade). I tried only decorating sitetree with Translatable, and removed the Decorators from the DataObjects, deleted the Locale tables from Homepage, but they are added once i do another dev/build/.
I'd love to hear any suggestions.
thanks,
-Chris