Elxis CMS Forum
Support => Language => Topic started by: e-isodos on October 05, 2010, 09:13:19
-
Hi,
i have a problem with czech language. Actually in frontpage when I am in czech language and want to swich to other languages there is an error on url path i.e.
1. when I want to change language to russian the url seems to be ......cs/ru/ instead of ......../ru/
2. when I want to change to english the path seems to be ......./cs/ instead of ......./en/
3. changing to german is OK ........./de/
Is it something I am doing wrong?
-
Check your .htaccess if there is rewrite rule for czech language.
It should look like this
RewriteRule ^([cs]{2})/(.*)$ /index.php?mylang=czech[QSA,L]
and also in language array
RewriteCond %{QUERY_STRING} !mylang=[...creole|croatian|czech|...]{2,}
-
Thanks for your answer,
you were right. But after I put the code you wrote me I had an error on czech language
"Bad Request
Your browser sent a request that this server could not understand."
-
What is your OS? Do you have rewrite module enabled on apache?
-
I am on 1and1 (lynux) but I guess this is not a problem with modules because all the other languages work OK.
-
Still haven' t found the problem, is there anyone who can help?
-
You can check your apache error log send me a PM with your hosting account details so I can check it out.
-
1and1 don't provide access to server log file
My web page is : http://www.lymberia-hotel-in-faliraki.com
My .htaccess file looks like :
##
# Elxis 2009.2 htaccess file
# Copyright (C) 2006-2010 Elxis.org. All rights reserved.
# License: http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Elxis CMS is a Free Software
##
## Uncomment the following line, if it produces erors, comment it again
# Options -Indexes +FollowSymLinks
#
# mod_rewrite in use
#
RewriteEngine On
# The following line tells the web server where your Elxis installation is located in relation
# to the web server root directory. By default this is set to the www root folder ( RewriteBase / ).
# If you have installed Elxis in a sub-folder then set this path properly.
# For example if your elxis site is accessible via this URL http://www.mysite.com/elxis/
# You should set: RewriteBase /elxis/
RewriteBase /
# Uncomment the line bellow if you use static cache in order to deny direct access to cached files.
#RewriteRule ^cache/static/(.*)$ - [F]
#
# Language Handling
# You may remove the languages that you dont need or add other languages not listed here
# For the proper language names and the iso 639 code languages consider includes/Core/locale.php file
# If you wish to use chinese you should add:
# chinese_traditional : zh-Hant,
# chinese_simplified : zh-Hans
#
RewriteCond %{QUERY_STRING} !mylang=[czech|english|french|german|greek|italian|polish|romanian|russian]{2,}
RewriteRule ^([cs]{2})/(.*)$ /index.php?mylang=czech[QSA,L]
RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA,L]
RewriteRule ^([fr]{2})/(.*)$ /index.php?mylang=french [QSA,L]
RewriteRule ^([de]{2})/(.*)$ /index.php?mylang=german [QSA,L]
RewriteRule ^([el]{2})/(.*)$ /index.php?mylang=greek [QSA,L]
RewriteRule ^([it]{2})/(.*)$ /index.php?mylang=italian [QSA,L]
RewriteRule ^([pl]{2})/(.*)$ /index.php?mylang=polish [QSA,L]
RewriteRule ^([ro]{2})/(.*)$ /index.php?mylang=romanian [QSA,L]
RewriteRule ^([ru]{2})/(.*)$ /index.php?mylang=russian [QSA,L]
#
# Exclude Files and directories
#
RewriteRule ^(administrator/|bridges/|cache/|components/|editor/|help/|images/|includes/|language/|mambots/|media/|modules/|templates/|tmpr/) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
#
## Security rules. Comment them if they cause problems to your site
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
# This rule is commented because it may cause some Elxis features to not work!
# RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
-
1and1 don't provide access to server log file
You don't need server log, you need your vhost error logs. If you have any control panel (plesk,cPanel, etc...) you can see your error logs. Even if you don't have any cp you can see your own error log.
-
Thank you for answering
1and1 hosting does not provide access to error log.....
At the FAQ section of their website I found the follow, for creating own error logs
"Since we don't provide access to Apache error logs on shared hosting packages for
technical reasons, you can create your own error logs for debugging PHP Scripts.
Please insert the following code in your PHP script (or create separate file and
and add the code in it. Include the file using "include()")
error_reporting(0);
$old_error_handler = set_error_handler("userErrorHandler");
function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars)
{
$time=date("d M Y H:i:s");
// Get the error type from the error number
$errortype = array (1 => "Error",
2 => "Warning",
4 => "Parsing Error",
8 => "Notice",
16 => "Core Error",
32 => "Core Warning",
64 => "Compile Error",
128 => "Compile Warning",
256 => "User Error",
512 => "User Warning",
1024 => "User Notice");
$errlevel=$errortype[$errno];
//Write error to log file (CSV format)
$errfile=fopen("errors.csv","a");
fputs($errfile,"\"$time\",\"$filename:
$linenum\",\"($errlevel) $errmsg\"\r\n");
fclose($errfile);
if($errno!=2 && $errno!=8) {
//Terminate script if fatal error
die("A fatal error has occurred. Script execution has been aborted");
}
}
"
I pasted the code to the top of index.php (root) I ' ve uploaed a file named errors.csv on root directory
But file remains empty (last 2 days)
Any idea?
-
Change hosting, this is nonsense. There are thousands of normal hosting providers.
-
Believe me I will. But at the momment and for the spesific website it is impossible.
But what might be the problem with czech ONLY. All the other languages are OK.
Before you told me to add the code in .htascess there was no error message but instead of czech language it loads the english language (default) and then any other language it has the /cs/ directory infront
?? (404 error) i.e. for polish /cs/pl/
Maybe some code is missing for czech and in other files??
-
Have you checked your installation with UPdiag tool?
-
What I should see there?
everything seems OK.
Version: elxis 2009.2
-
Updiag is a multi-purpose tool located in Elxis administration.
Hash files are use to check Elxis file system integrity.
To check your Elxis site (any version) if it is an authentic Elxis copy and no files are missing or are broken follow this procedure:
1. Login to Elxis back-end (any version).
2. Go to tools
3. Go to Updiag tool
4. From the Updiag menu select maintenance -> Download Hash files. You will notified about the available hash files on elxis.org and also a prompt to download them. If you already have them a green tick will be displayed. Notice that folder /administrator/tools/updiag/data/hashes must be writable (permissions 777 or enablement of FTP access) in order Elxis to be able to download hash files from elxis.org.
5. Once you have the hash file that matches your elxis version, select maintenance -> check filesystem.
6. Select the "full" hash file.
See the Updiag's help file if you don't understand something.
-
Thank you for your hepl.
Everything are OK
I have just found that if I unable the SEO Pro then czech language is working !!!
So THE PROBLEM IS AT SEO PRO
Any idea about fixing it?
-
You must modify the .htaccess file.
-
How I should modify the httaccess file.
Any other language (german, italian, english, polish, russian) is working perfect with SEO PRO, the only problem is with czech
-
Open the .htaccess file and add the czech.
Otherwise i will need access to do it for you!
-
I have allready added the czech language at .htaccess file. Have a look
##
# Elxis 2009.2 htaccess file
# Copyright (C) 2006-2010 Elxis.org. All rights reserved.
# License: http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Elxis CMS is a Free Software
##
## Uncomment the following line, if it produces erors, comment it again
# Options -Indexes +FollowSymLinks
#
# mod_rewrite in use
#
RewriteEngine On
# The following line tells the web server where your Elxis installation is located in relation
# to the web server root directory. By default this is set to the www root folder ( RewriteBase / ).
# If you have installed Elxis in a sub-folder then set this path properly.
# For example if your elxis site is accessible via this URL http://www.mysite.com/elxis/
# You should set: RewriteBase /elxis/
RewriteBase /
# Uncomment the line bellow if you use static cache in order to deny direct access to cached files.
#RewriteRule ^cache/static/(.*)$ - [F]
#
# Language Handling
# You may remove the languages that you dont need or add other languages not listed here
# For the proper language names and the iso 639 code languages consider includes/Core/locale.php file
# If you wish to use chinese you should add:
# chinese_traditional : zh-Hant,
# chinese_simplified : zh-Hans
#
RewriteCond %{QUERY_STRING} !mylang=[czech|english|french|german|greek|italian|polish|romanian|russian]{2,}
RewriteRule ^([cs]{2})/(.*)$ /index.php?mylang=czech[QSA,L]
RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA,L]
RewriteRule ^([fr]{2})/(.*)$ /index.php?mylang=french [QSA,L]
RewriteRule ^([de]{2})/(.*)$ /index.php?mylang=german [QSA,L]
RewriteRule ^([el]{2})/(.*)$ /index.php?mylang=greek [QSA,L]
RewriteRule ^([it]{2})/(.*)$ /index.php?mylang=italian [QSA,L]
RewriteRule ^([pl]{2})/(.*)$ /index.php?mylang=polish [QSA,L]
RewriteRule ^([ro]{2})/(.*)$ /index.php?mylang=romanian [QSA,L]
RewriteRule ^([ru]{2})/(.*)$ /index.php?mylang=russian [QSA,L]
#
# Exclude Files and directories
#
RewriteRule ^(administrator/|bridges/|cache/|components/|editor/|help/|images/|includes/|language/|mambots/|media/|modules/|templates/|tmpr/) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
#
## Security rules. Comment them if they cause problems to your site
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
# This rule is commented because it may cause some Elxis features to not work!
# RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
-
Enable SEO and check it. It seems right.;)
-
Nop !
At Basic SEO works OK
At SEO PRO all languages are OK except CZECH ---> I get the error message
Bad Request
Your browser sent a request that this server could not understand.
-
Don't use SEO Basic, always use SEO PRO.
Elxis has 2 language identifiers for Czech, "cs" and "cs-cz". The second one when used on htaccess should be escaped with a backslash (placed before the period symbol), else it will generate error. If you use the "cs" identifier (recommended) it should work fine.
-
Thank you for your answer.
Unfortunently it doens't work on SEO PRO with cs identifier (as you can see at .htaccess).
It works Perfect on SEO BASIC (But of course I want to use SEO pRO)
-
If you wish, send me a personal message with the username/password for your site's FTP to check/fix it.
-
Problem fixed!
I write here the solution for the other users.
The problem was a mistype e-isodos has made on his htaccess file when he added the czech language in it.
This was the problem:
RewriteRule ^([cs]{2})/(.*)$ /index.php?mylang=czech[QSA,L]
You need a space between czech and [QSA,L]
So the corrected rewrite rul is:
RewriteRule ^([cs]{2})/(.*)$ /index.php?mylang=czech [QSA,L]
-
MILLION THANKS.
YOU REALLY CARE ABOUT ELXIS AND IT'S USERS !!!!