Jump to:

655 Posts in 2094 Topics by 163 members

Releases and Announcements

SilverStripe Forums » Releases and Announcements » 2.3 - Default Language Bug ?

Latest news about the SilverStripe software.

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

Page: 1 2 3 4 5
Go to End
Author Topic: 7047 Views
  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: 2.3 - Default Language Bug ? Link to this post

    I'm bumping into odd behaviour as well..

    first, If I translate a child-page , it creates a translation for both the child and it's parent page (this seems logical). If I then go back to translate a sibling (so a child of the same parent page which was just translated) , it creates a translated version for the page , but I cannot see it in the translated site-tree.

    Another bug pops up when you click "show deleted pages" in a translated site-tree. It now shows the sitetree of another language.

    ps(Is this the right thread to talk about the new Translatable features?) ....

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: 2.3 - Default Language Bug ? Link to this post

    @Fuzz10
    Do you mean when translating sibblings you don't end up with a new tree every time? You just keep one tree but lose the earlier sibblings? Did you change the default language as I did?

    [EDIT]
    Because in the ticket I saw mentioned what you describe: the loosing/exchanging of siblings in the translated tree, whereas I get all these extra trees - it could be two different bugs. Do you get any Existing translations mentioned in you default language?

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: 2.3 - Default Language Bug ? Link to this post

    @martimiz
    Indeed, default language is dutch.

    I don't end up with a new tree ever time. It just refuses to add new translated children to the already translated parent... So it is basically the opposite of what happens on your installation..... ;)

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: 2.3 - Default Language Bug ? Link to this post

    Have another one: if I try and translate from a secundary language to any other language I get a 'Javascript Error' on the bottom right.

    @Fuzz10
    This is weird - we should have the same results then. I'll try a new installation later on. Using FF 3.0.10 for that matter...

    [EDIT]
    BTW - is there an svn for this version? I'm using the original download from the blog...

    [EDIT 2]
    Downloaded 2.3.2beta1 again from the blog. Did a fresh install (Debian Etch, Apache2, MySQL5), tested in FF3.0.1 (XP), IE6 (XP) IE7 (Vista). Same thing: translating a sibbling results in creating a second tree. In both IE, translating a sibbling resulted in an error message 'I can't handle sub-URLs of a CMSMain object'. I then have to reload to see that the second tree was still created.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: 2.3 - Default Language Bug ? Link to this post

    OK, looks like we have some work to do - thanks for testing! Having a default language other than "en_US" definetly complicates things - I've tested this of course, but there can be more side effects and wrong assumptions.

    I've created a ticket for the missing parent relation on translated children:
    http://open.silverstripe.com/ticket/4032#comment:1

    And another ticket for optionally translating a subtree or the whole page tree:
    http://open.silverstripe.com/ticket/4033
    This won't make it into 2.3.2 - patches are welcome of course, don't think translating a subtree will be too hard to set up.

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: 2.3 - Default Language Bug ? Link to this post

    While waiting for stable - is there maybe a tiny little patch to make the frontend at least acknowledge a different locale in 2.3.1? I'm only working on Dutch sites now, I wouldn't mind using some hardcoding for the time being just to change the default. I could plow through the code of course - but if anybody has already done this? Please?

    [EDIT]
    simplest solution: for the time being I hardcoded Content-Language in SiteTree.php: $tags .= "<meta http-equiv=\"Content-Language\" content=\""...

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: 2.3 - Default Language Bug ? Link to this post

    Hi!

    I don't know how do you managed to actually create some translations! Here, on a fresh install of 2.3.2beta1, I can go as far as building the database with the Locale field correctly set to 'en_GB' (not default locale), I checked the database. Then, when I try to enter the CMS, I get:

    [Notice] Undefined index: en_GB
    GET /ss-232b1/admin/
    Line 1350 in C:\Users\Juan\Documents\Travail en cours\Web\silverstripe-v2.3.2-beta1\cms\code\CMSMain.php

    That's the LangSelector function.

    Any ideas? (as I continue debugging)

    Best regards,
    Juan

    *EDIT*
    I understand now: the problem is that CMSMain looks for the default locale (set here to en_GB) in the common_locales array, where en_GB is not defined, as soon as I change this list or the function get_common_locales to get_locale_list in LangSelector, I can access the CMS.

    So: when starting a new site, verify that your locale is in the list of common_locales or include it!

    Should I consider that a bug or a feature? ;)

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: 2.3 - Default Language Bug ? Link to this post

    Development.

    Ingo, please, would you consider adding this to _config.php as good SilverStripe practice? I'm not good at php…

    /* Multilingual content */
    /********************/
    // Enable Translatable
    Object::add_extension('SiteTree', 'Translatable');
    Translatable::set_default_locale('en_GB');
    //Define allowed locales overriding those present in i18n::$common_locales
    $allowed_locales = array(
          'en_GB' => array('English', 'English'),
          'es_ES' => array('Spanish', 'espa&ntilde;ol')
       );
    i18n::$common_locales = $allowed_locales;

    Thanks in advance,
    Juan

    7047 Views
Page: 1 2 3 4 5
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.