Jump to:

23377 Posts in 18296 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » i18n Bug with SS 2.3.1

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 919 Views
  • Henk Poley
    Avatar
    30 Posts

    i18n Bug with SS 2.3.1 Link to this post

    I got this strange error.

    On my 'dev' it works with:

    // Enable Translations
    i18n::enable();
    i18n::set_locale('nl_NL');
    i18n::set_default_lang('nl_NL');

    I get an error when I change set_default_lang() to 'nl'

    On my 'live' it works with:

    // Enable Translations
    i18n::enable();
    i18n::set_locale('nl_NL');
    i18n::set_default_lang('nl');

    For example on 'live' I get this error when I change set_default_lang() to nl_NL:

    [User Error] Couldn't run query: SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `Page_versions` ON `Page_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `CheckoutPage_versions` ON `CheckoutPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Product_versions` ON `Product_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ProductGroup_versions` ON `ProductGroup_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ArticlePage_versions` ON `ArticlePage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SchouwenPage_versions` ON `SchouwenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SleperPage_versions` ON `SleperPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `WachtschepenPage_versions` ON `WachtschepenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_lang_versions`.Lang = 'nl') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1 Column 'URLSegment' in where clause is ambiguous
    GET /

    Line 400 in /home/knr11075/domains/waterscouting.com/public_html/frontpage/sapphire/core/model/MySQLDatabase.php

    Source

    391    }
    392    
    393    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    394       // try to extract and format query
    395       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    396          $formatter = new SQLFormatter();
    397          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    398       }
    399       
    400       user_error($msg, $errorLevel);
    401    }
    402 }
    403
    404 /**
    405 * A result-set from a MySQL database.
    406 * @package sapphire
    Trace

    Couldn't run query: SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `Page_versions` ON `Page_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `CheckoutPage_versions` ON `CheckoutPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Product_versions` ON `Product_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ProductGroup_versions` ON `ProductGroup_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ArticlePage_versions` ON `ArticlePage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SchouwenPage_versions` ON `SchouwenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SleperPage_versions` ON `SleperPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `WachtschepenPage_versions` ON `WachtschepenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_lang_versions`.Lang = 'nl') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1 Column 'URLSegment' in where clause is ambiguous
    Line 400 of MySQLDatabase.php
    MySQLDatabase->databaseError(Couldn't run query: SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `Page_versions` ON `Page_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `CheckoutPage_versions` ON `CheckoutPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Product_versions` ON `Product_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ProductGroup_versions` ON `ProductGroup_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ArticlePage_versions` ON `ArticlePage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SchouwenPage_versions` ON `SchouwenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SleperPage_versions` ON `SleperPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `WachtschepenPage_versions` ON `WachtschepenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_lang_versions`.Lang = 'nl') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1 | Column 'URLSegment' in where clause is ambiguous,256)
    Line 102 of MySQLDatabase.php
    MySQLDatabase->query(SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `Page_versions` ON `Page_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `CheckoutPage_versions` ON `CheckoutPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Product_versions` ON `Product_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ProductGroup_versions` ON `ProductGroup_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ArticlePage_versions` ON `ArticlePage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SchouwenPage_versions` ON `SchouwenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SleperPage_versions` ON `SleperPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `WachtschepenPage_versions` ON `WachtschepenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_lang_versions`.Lang = 'nl') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1,256)
    Line 104 of DB.php
    DB::query(SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `Page_versions` ON `Page_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `CheckoutPage_versions` ON `CheckoutPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Product_versions` ON `Product_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ProductGroup_versions` ON `ProductGroup_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ArticlePage_versions` ON `ArticlePage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SchouwenPage_versions` ON `SchouwenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SleperPage_versions` ON `SleperPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `WachtschepenPage_versions` ON `WachtschepenPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_lang_versions`.Lang = 'nl') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1)
    Line 426 of SQLQuery.php
    SQLQuery->execute()
    Line 106 of ModelAsController.php
    ModelAsController->findOldPage(home)
    Line 47 of ModelAsController.php
    ModelAsController->getNestedController()
    Line 25 of ModelAsController.php
    ModelAsController->handleRequest(HTTPRequest)
    Line 34 of RootURLController.php
    RootURLController->handleRequest(HTTPRequest)
    Line 277 of Director.php
    Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    Director::direct()
    Line 115 of main.php

  • shingonoide
    Avatar
    Community Member
    3 Posts

    Re: i18n Bug with SS 2.3.1 Link to this post

    I got these error too, I'll investigate more, but I think the problem is change default parameters with site already created.
    Ex.:
    SStripe installed and you put some entries in site after then change languages value, SStripe create some wrong MySQL query, SStripe don't work well with this yet I think.
    Maybe the solution for this problem will be resolved soon, the SStripe team is great.

    Try to test in a clean database install, make new database in your MySQL then change _config.php to point to this new database then run http://mysite/db/build to create a new fresh db.

    P.S. please your setup language configuration before db/build.
    Hope this help

    Peace

  • shingonoide
    Avatar
    Community Member
    3 Posts

    Re: i18n Bug with SS 2.3.1 Link to this post

    Sorry but it will not work, I'll put my debug out for someone help to debug.
    I'm using pt-BR.

    my _config.php
    i18n::enable();
    i18n::set_default_lang('pt-BR');
    i18n::set_locale('pt_BR');

    When I comment i18n::enable or use i18n:disable the problem goes away, but just i18n::set_locale does not work alone.
    My Output debug:

    [User Error] Couldn't run query: SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Forum_versions` ON `Forum_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ForumHolder_versions` ON `ForumHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GameFlash_versions` ON `GameFlash_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GoogleCustomSearch_versions` ON `GoogleCustomSearch_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_versions`.SubsiteID IN (0)) AND (`SiteTree_lang_versions`.Lang = 'pt') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1 Column 'URLSegment' in where clause is ambiguous
    GET /

    Line 400 in /home/shingo/Documents/Repositories/someunet/sapphire/core/model/MySQLDatabase.php
    Source

    391    }
    392    
    393    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    394       // try to extract and format query
    395       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    396          $formatter = new SQLFormatter();
    397          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    398       }
    399       
    400       user_error($msg, $errorLevel);
    401    }
    402 }
    403
    404 /**
    405 * A result-set from a MySQL database.
    406 * @package sapphire

    Trace

    * Couldn't run query: SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Forum_versions` ON `Forum_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ForumHolder_versions` ON `ForumHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GameFlash_versions` ON `GameFlash_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GoogleCustomSearch_versions` ON `GoogleCustomSearch_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_versions`.SubsiteID IN (0)) AND (`SiteTree_lang_versions`.Lang = 'pt') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1 Column 'URLSegment' in where clause is ambiguous
    Line 400 of MySQLDatabase.php
    * MySQLDatabase->databaseError(Couldn't run query: SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Forum_versions` ON `Forum_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ForumHolder_versions` ON `ForumHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GameFlash_versions` ON `GameFlash_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GoogleCustomSearch_versions` ON `GoogleCustomSearch_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_versions`.SubsiteID IN (0)) AND (`SiteTree_lang_versions`.Lang = 'pt') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1 | Column 'URLSegment' in where clause is ambiguous,256)
    Line 102 of MySQLDatabase.php
    * MySQLDatabase->query(SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Forum_versions` ON `Forum_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ForumHolder_versions` ON `ForumHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GameFlash_versions` ON `GameFlash_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GoogleCustomSearch_versions` ON `GoogleCustomSearch_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_versions`.SubsiteID IN (0)) AND (`SiteTree_lang_versions`.Lang = 'pt') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1,256)
    Line 104 of DB.php
    * DB::query(SELECT `SiteTree_versions`.RecordID FROM `SiteTree_lang_versions` INNER JOIN `SiteTree_versions` ON `SiteTree_lang_versions`.OriginalLangID = `SiteTree_versions`.ID LEFT JOIN `GhostPage_versions` ON `GhostPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogEntry_versions` ON `BlogEntry_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `BlogHolder_versions` ON `BlogHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `Forum_versions` ON `Forum_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ForumHolder_versions` ON `ForumHolder_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GameFlash_versions` ON `GameFlash_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `GoogleCustomSearch_versions` ON `GoogleCustomSearch_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `ErrorPage_versions` ON `ErrorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `RedirectorPage_versions` ON `RedirectorPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `VirtualPage_versions` ON `VirtualPage_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `UserDefinedForm_versions` ON `UserDefinedForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID LEFT JOIN `SubscribeForm_versions` ON `SubscribeForm_versions`.ID = `SiteTree_lang_versions`.OriginalLangID WHERE (`SiteTree_versions`.SubsiteID IN (0)) AND (`SiteTree_lang_versions`.Lang = 'pt') AND (`SiteTree_versions`.`WasPublished` = 1 AND `URLSegment` = 'home') ORDER BY `LastEdited` DESC, `SiteTree_versions`.`WasPublished` LIMIT 1)
    Line 426 of SQLQuery.php
    * SQLQuery->execute()
    Line 106 of ModelAsController.php
    * ModelAsController->findOldPage(home)
    Line 47 of ModelAsController.php
    * ModelAsController->getNestedController()
    Line 25 of ModelAsController.php
    * ModelAsController->handleRequest(HTTPRequest)
    Line 34 of RootURLController.php
    * RootURLController->handleRequest(HTTPRequest)
    Line 277 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    * Director::direct()
    Line 115 of main.php

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: i18n Bug with SS 2.3.1 Link to this post

    i18n does not work with 2.3.1. This is the goal for 2.3.2. For more information see http://open.silverstripe.com/ticket/3517

  • Kalileo
    Avatar
    Community Member
    127 Posts

    Re: i18n Bug with SS 2.3.1 Link to this post

    @willr: Is it possible that you mean: "Translatable" does not work with 2.3.1 ? That ticket you mention concerns Translatable.
    At least if i18n itself has issues they seem not to be a major problem, i just developed a multilingual site with 2.3.1 using i18n (not translatable!) and it works as expected.

  • Kalileo
    Avatar
    Community Member
    127 Posts

    Re: i18n Bug with SS 2.3.1 Link to this post

    just checked my code, and i'm using only i18n::set_locale() but not i18n::set_default_lang().
    You're sure you need set_default_lang()?

  • henning.blunck
    Avatar
    Community Member
    6 Posts

    Re: i18n Bug with SS 2.3.1 Link to this post

    I remember coming across the same Error-accumulation.
    Are you sure you updated your Database after setting the default lang? Setting this means, than i18n is enabled and therefore, a bunch of new tables has to be created in the database.

    Bye,

    Henning

  • Kate
    Avatar
    Community Member
    16 Posts

    Re: i18n Bug with SS 2.3.1 Link to this post

    I just got this error message with even touching i18n. I might have pressed the translation tab out of curiosity.

    Fatal error: Cannot use string offset as an array in /homez.60/lasergra/www/SS/sapphire/core/i18n.php on line 859

    CMS is now blocked because of this.

    919 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.