Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Archive
SilverStripe Forums » Archive » i18n multilingual site: MySQL error
Our old forums are still available as a read-only archive.
|
Page:
1
|
Go to End | |
| Author | Topic: i18n multilingual site: MySQL error | 393 Views |
-
i18n multilingual site: MySQL error

24 November 2008 at 11:38am
Hi Forum,
I enabled multilingual content for a Silverstripe site. Everything worked well but when I tried to log in to the CMS today I get a MySQL error that is connected to the multilingual functionality:
The problem is in a WHERE clause:
"... WHERE (`SiteTree_lang_Live`.OriginalLangID = ) AND (`SiteTree_lang_Live`.Lang = 'mi') ..."
The OriginalLangID is empty. OriginalLangID refers to the page in the original reference language (in this case English) and should be an integer with the ID of the original page in the site tree. I am not sure why and where this error originates from. Did anyone have similar problems? I did not do any special customisation.
Even if I disable i18n I can no longer access the CMS.
Cheers!
Anatol -
Re: i18n multilingual site: MySQL error

24 November 2008 at 12:01pm
I just found another post about this problem: http://silverstripe.com/site-builders-forum/flat/174862. It seems the problem is the login page itself which is not part of the site tree. Did anyone ever manage to make the login page work with i18n enabled?
Cheers!
Anatol -
Re: i18n multilingual site: MySQL error

24 November 2008 at 3:07pm Last edited: 24 November 2008 3:08pm
Here is a temporary but very ugly solution:
Simply create a static html file of the login form (e.g. create the file login_form.html in the Silverstripe root directory or anywhere else). You can simply copy and paste the generated source code of the actual login page so it looks like your template.
Then open the .htaccess file and add this line below RewriteBase:
RewriteRule ^(Security\/login)$ login_form.html
Now every time you go to the URL my-silverstripe-site/admin/ it will redirect you to the static page.
Be aware that the button "I've lost my password" will not work, but you could probably create a static page for that as well if you need it. The static form will also not remember the most recent page you had visited if that is what triggered the login form.
As I said above this is just an ugly temporary hack (and not thoroughly tested) - good if you need a quick hotfix.
I would be very keen to find a better solution. Please do post if you know one.
Cheers!
Anatol
| 393 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: The Error Guy
Welcome to our latest member: The Error Guy
