Jump to:

1160 Posts in 2621 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Can't create a new language in Version 2.3

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 1823 Views
  • wewo
    Avatar
    Community Member
    7 Posts

    Can't create a new language in Version 2.3 Link to this post

    Hello,

    I enabled i18n support in my _config:

    i18n::enable();
    Translatable::enable();

    A /db/build/ did create the tables SiteTree_lang, SiteTree_lang_Live, SiteTree_lang_versions

    When i try to add a new translation, a SQL query fails:

    SELECT `SiteTree`.*, `SiteTree_lang`.*, `SiteTree_lang`.*, `GhostPage`.*, `Artist`.*, `Concert`.*, `Location
    `.*, `ErrorPage`.*, `RedirectorPage`.*, `VirtualPage`.*, `SiteTree_lang`.OriginalLangID, if(`SiteTree_lang
    `.ClassName,`SiteTree_lang`.ClassName,'SiteTree') AS RecordClassName, `SiteTree_lang`.OriginalLangID
    AS ID, `SiteTree_lang_lang`.OriginalLangID AS ID
    FROM
    INNER JOIN `SiteTree_lang` ON `SiteTree_lang`.OriginalLangID = `SiteTree_lang`.OriginalLangID
    INNER JOIN `SiteTree` ON `SiteTree_lang`.OriginalLangID = `SiteTree`.ID
    LEFT JOIN `GhostPage` ON `GhostPage`.ID = `SiteTree_lang`.OriginalLangID
    LEFT JOIN `Artist` ON `Artist`.ID = `SiteTree_lang`.OriginalLangID
    LEFT JOIN `Concert` ON `Concert`.ID = `SiteTree_lang`.OriginalLangID
    LEFT JOIN `Location` ON `Location`.ID = `SiteTree_lang`.OriginalLangID
    LEFT JOIN `ErrorPage` ON `ErrorPage`.ID = `SiteTree_lang`.OriginalLangID
    LEFT JOIN `RedirectorPage` ON `RedirectorPage`.ID = `SiteTree_lang`.OriginalLangID
    LEFT JOIN `VirtualPage` ON `VirtualPage`.ID = `SiteTree_lang`.OriginalLangID
    WHERE (`SiteTree`.`ParentID` = 0 AND `SiteTree_lang`.OriginalLangID != 0) AND (`SiteTree_lang`.Lang
    = 'de') AND (`SiteTree_lang`.Lang = 'de')
    ORDER BY Sort

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
    for the right syntax to use near 'INNER JOIN `SiteTree_lang` ON `SiteTree_lang`.OriginalLangID = `SiteTree_lang
    `.O' at line 1

    On http://demo.silverstripe.com/admin/ creating a new language fails with a 500 error
    http://demo.silverstripe.com/admin/createtranslation?ID=86&newlang=ro&ajax=1

    Is it a bug or a feature? ;)

    best regards,
    wewo

  • jam13
    Avatar
    121 Posts

    Re: Can't create a new language in Version 2.3 Link to this post

    Same problem here.

    Also reported here:

    http://open.silverstripe.org/ticket/3593

    and here:

    http://open.silverstripe.org/ticket/3495

    I think there are various fixes in trunk for i18n stuff, unfortunately enabling it causes /dev/build to die trying to build the lang table.

    Hopefully this should get some attention before 2.3.1 as i18n is currently unusable AFAICS.

  • lxer
    Avatar
    Community Member
    16 Posts

    Re: Can't create a new language in Version 2.3 Link to this post

    so, the table is missing in the query, it should have something like
    FROM `SiteTree_lang` AS something

  • jam13
    Avatar
    121 Posts

    Re: Can't create a new language in Version 2.3 Link to this post

    From the look of the line:

    INNER JOIN `SiteTree_lang` ON `SiteTree_lang`.OriginalLangID = `SiteTree_lang`.OriginalLangID

    I would agree

  • BuddhaSource
    Avatar
    Community Member
    57 Posts

    Re: Can't create a new language in Version 2.3 Link to this post

    We had followed some tutorial in docs and made whole mess of it.

    Not sure if this has the same features that they are trying to get out in 2.4

    The url will itself have the language subdir

    eg: mysite.com/en/home

    Now I am confused which one to pick.

  • alirobe
    Avatar
    Community Member
    35 Posts

    Re: Can't create a new language in Version 2.3 Link to this post

    According to the release notes on the blog, 2.3 doesn't have multi-language support and you should wait for a minor upgrade in the future that will include a new multi-language model. It says not to install 2.3.0 if you want multi-language support.

    1823 Views
Page: 1
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.