Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » /admin/ log-in only possible with i18n disabled !?

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1828 Views
  • Skipper
    Avatar
    Community Member
    16 Posts

    /admin/ log-in only possible with i18n disabled !? Link to this post

    I am pretty near finishing a multilanguage site, but for some reason, I can only log into the admin if i18n::enable(); is commented out in _config.pgp. So I comment, log-in and uncomment to be able to continue, iow after having logged-in, I can use the backend w/o problems.

    The error I get is

    FATAL ERROR: DATABASE ERROR: Couldn't run query: SELECT `SiteTree_Live`.*, `GhostPage_Live`.*,
    `UserDefinedForm_Live`.*, `CheckoutPage_Live`.*, `Product_Live`.*, `NewsPage_Live`.*, `StandardPage_Live`.*,
    `ErrorPage_Live`.*, `RedirectorPage_Live`.*, `VirtualPage_Live`.*, `SubscribeForm_Live`.*, `SiteTree_Live`.ID,
    if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName FROM `SiteTree_Live` LEFT
    JOIN `GhostPage_Live` ON `GhostPage_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `UserDefinedForm_Live` ON
    `UserDefinedForm_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `CheckoutPage_Live` ON `CheckoutPage_Live`.ID =
    `SiteTree_Live`.ID LEFT JOIN `Product_Live` ON `Product_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `NewsPage_Live` ON
    `NewsPage_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `StandardPage_Live` ON `StandardPage_Live`.ID =
    `SiteTree_Live`.ID LEFT JOIN `ErrorPage_Live` ON `ErrorPage_Live`.ID = `SiteTree_Live`.ID LEFT JOIN
    `RedirectorPage_Live` ON `RedirectorPage_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `VirtualPage_Live` ON
    `VirtualPage_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `SubscribeForm_Live` ON `SubscribeForm_Live`.ID =
    `SiteTree_Live`.ID WHERE (`SiteTree_Live`.ID = ) ORDER BY Sort LIMIT 1 | 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 ') ORDER BY Sort
    LIMIT 1' at line 1


    and the error is obvious, but not the cause.

    Can anybody help? Thanks in advance with your speculation!

    N.B. For those curious, the site currently is at "www. bleu berlin .com" and take out all spaces.

    [edit: added linebreaks to the error message]

  • nlcluigi
    Avatar
    Community Member
    7 Posts

    Re: /admin/ log-in only possible with i18n disabled !? Link to this post

    Hello.

    I follow your guide to pretty url and lang swicher with no succes. You can put more details on witch files and location I mest do the modifications?
    Also ... you have some better implementation? I see that you have problems too.

    Have a good day,
    Luigi

    e: cristian.nica@gmail.com

  • Skipper
    Avatar
    Community Member
    16 Posts

    Re: /admin/ log-in only possible with i18n disabled !? Link to this post

    Hi Luigi,

    I should have updated my write-ups. I have resolved all the problems (or should I say: I have no known problems for the moment with multilanguage content) for my needs (3 languages: en-de-fr) all is good and beautiful.

    The problem above is an annoyance in SS: The login-screen seems to reside outside SideTree and messing with languages didn't work when logging in. Oh well.

    I have added a recipe for SS 2.2.2 - hopefully it makes sense : http://doc.silverstripe.com/doku.php?id=recipes:pretty_i18n_urls

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: /admin/ log-in only possible with i18n disabled !? Link to this post

    > I should have updated my write-ups. I have resolved all the problems (or should I say: I have no known problems for the moment with multilanguage content) for my needs (3 languages: en-de-fr) all is good and beautiful.

    How did you work around the SQL parsing error? Was it session related? E.g. selecting a specific translated page within the CMS, then disabling i18n while still being logged in?

    > The problem above is an annoyance in SS: The login-screen seems to reside outside SideTree and messing with languages didn't work when logging in.

    But you can set the locale for templates such as the login-screen as well, right?
    See http://doc.silverstripe.com/doku.php?id=multilingualcontent
    Together with the language switcher widget this should work on a user cookie basis.

  • nlcluigi
    Avatar
    Community Member
    7 Posts

    Re: /admin/ log-in only possible with i18n disabled !? Link to this post

    Hi Andreas

    Did you solve the problem with admin login while i18n is enable?
    I have the same problem too.
    I have notice that if I change the theme, do a flush, overwrite the Page.ss from the desire working theme with the blackcandy, do the flush, change back from _config to the desire working theme, do a flush, overwrite the Page.ss, do a flush solve the admin login problem.

    How did you solve the problem? Still with i18n disable?

    p.s.: As of setting locale for login template, I'm lost .. I do silverstripe for 2-3 hours. How I can do that?

    Regards,
    Cristian Nica

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