Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

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

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

/admin/ log-in only possible with i18n disabled !?


Reply


5 Posts   1881 Views

Avatar
Skipper

Community Member, 16 Posts

19 September 2008 at 6:48am

Edited: 19/09/2008 6:50am

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]

Avatar
nlcluigi

Community Member, 7 Posts

21 September 2008 at 9:17am

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

Avatar
Skipper

Community Member, 16 Posts

21 September 2008 at 9:28am

Edited: 21/09/2008 10:33am

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

Avatar
Ingo

Forum Moderator, 801 Posts

26 September 2008 at 12:57am

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

Avatar
nlcluigi

Community Member, 7 Posts

26 September 2008 at 6:25pm

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