The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 18 posts ] 
Author Message
PostPosted: Sat May 04, 2013 8:44 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 24, 2012 2:56 pm
Posts: 15
Hi... First of all, English it's not my native language. Patience please ;)

I know that this may be a known issue. But after looking and searching (a lot of) info around the web and forums I can't get my language configuration right.

And here I post the configuration of Joomla and languages:

Joomla n server config:
Apache
PHP 5.3.6
Joomla 3.1.1
Protostar Template (same template for all languages)
K2 2.6.6
SEF ON (native)

My host provider is an elite company with dedicated servers especialized in joomla, so at least it isn't a host problem.

I attached imgs of my language status and filter configuration.


---------------------- THE PROBLEM ------------------------

I have my site in 4 languages: English, Spanish, Portuguese and Korean. The site default language is spanish (cause most of us speak es, and we have the most complete version of the site in that language).

In the past I used SH404SEF to make friendly urls for my K2 component. But since K2 have a new built-in seo urls plugin, I stop using SH404SEF (I always pridge to avoid the unnecessary use of extensions, if you can do it natively).

And since Joomla release the new multilanguage feature, I said goodbye to JoomFish :laugh: BTW I think that the multilanguage power is the STRONGEST spot of Joomla , something that either WP can fight.

Something that SH404SEF did is remove the url default language code from all my spanish (default language). That wasn't a choice, that is the way the component work dunno why. So "www.mysite.com/es/hello.html" become "www.mysite.com/hello.html", and the others languages stay as the same, with their owns language tags in url "en", "pt" and "ko".

When I change to Joomla 3, I used the language filter natively. And GREAT! there was an option to turn off the default language code, so I kept my urls articles the same.

Everything OK. BUT, lately I figured out that this option is messing things out.

For example. My PC is in spanish... for me there are no problem to enter in any version of my site in any language.

But in any PC where the default language is different from spanish, the site wont display spanish information... NEVER. I mean NEVER in any part of the site. And this have nothing to do with item associations.


---------------------- THE EXAMPLE ------------------------

I mean. For example, my cousin have his PC in portuguese. And he can access my site in Portuguese (defualt language when he enter):

"www.mysite.com/pt"

He can access to English and also Korean site too...

"www.mysite.com/en" or "www.mysite.com/ko"

But when he try to access in spanish (the real default language). There start the problems...

There are different kind of errors, but I think that everything come from the same point: a bug in languagefilter or a incorrect form of manage language redirection in joomla core.

For example:

If for some reason the menu alias is the same in portuguese and spanish, the the url change correctly but the content (the article, categories and modules, etc) remains in portuguese...

"www.mysite.com/pt/city.html" (PT URL) --> (click es in language switcher) --> "www.mysite.com/city.html" (ES URL)

"www.mysite.com/pt" (PT URL) --> (click es in language switcher) --> "www.mysite.com" (ES URL)

In the cases above, city is the same alias in spanish and portuguese, and the homepages have the same alias. but even the url change, all the rest stay in portuguese. There are not 404 page in these cases.

But in all the others cases where the alias are different, there redirect to an 404 error... most of cases. Example:

"www.mysite.com/pt/atracoes.html" (PT URL) --> (click es in language switcher) --> "www.mysite.com/atracciones.html" (ES URL) but with a nice 404 error page.

The same occurs in other languages. For example:

"www.mysite.com/en/attractions.html" (EN URL) --> (click es in language switcher) --> "www.mysite.com/atracciones.html" (ES URL) but with a nice 404 error page, AND THE CONTENT OF THE 404 PAGE IN PORTUGUESE, the default language of my cousin PC.


---------------------- THE SOLUTION (?) ------------------------

When I turn off the option of remove url language code, everything appear to works fine.

But if I do this, I'm not only going to have to wait to Google crawl all my new urls again (and I'm talking about hundred of pages), also I'm going to lost hundred of Social likes and comments (Fb, Twitter, G+ and others) in spanish. Obviusly I work very hard to got that user interactions and I really don't want to lose that.

I really don't know if this is the best way to solve this. Anyway, the option "remove url language code" may cause problems with others users that are dealing with multilanguage sites.

I found a forum post of someone that describe the same issue: http://forum.joomla.org/viewtopic.php?f=711&t=793150

But, I have the impression that he still couldn't find the solution.

I rly wait a lot of months before posting this, but I don't know what to do now... Please, give me a hand.

Thanks for reading!

---------------------- UPDATES ------------------------

■ J2.5 doesn't seems to reproduce this problem, since the http://multilingual-joomla-demo.cloudaccess.net, is 2.5. And I can access to all languages (also the default english).


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Fri May 10, 2013 7:51 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
Please send me by pm a superuser access to your site back-end.
I will have a look.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Fri May 10, 2013 9:51 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 24, 2012 2:56 pm
Posts: 15
Hi... sr, very thanks for your attention. But I rly prefer to mantain my admin classfied. Please, understand that I had a lot of bad experiences.

This is a real bug, have nothing to do with my Joomla or Server configuration

You can reproduce the problem by:
- Make a fresh install of Joomla 3.1 and a multilanguage site.
- Turn on SEF URL, multilanguage plugin, and remove default language code in url.
- Try to access to the default language page from a PC (and browser) where the language is different from the default site language.

Regards!


Top
 Profile  
 
PostPosted: Sat May 11, 2013 9:49 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
Giu Tae Kim wrote:
Hi... sr, very thanks for your attention. But I rly prefer to mantain my admin classfied. Please, understand that I had a lot of bad experiences.

This is a real bug, have nothing to do with my Joomla or Server configuration

You can reproduce the problem by:
- Make a fresh install of Joomla 3.1 and a multilanguage site.
- Turn on SEF URL, multilanguage plugin, and remove default language code in url.
- Try to access to the default language page from a PC (and browser) where the language is different from the default site language.

Regards!

I can't reproduce this precise issue here.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Mon May 13, 2013 6:04 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 24, 2012 2:56 pm
Posts: 15
Well... I spent the whole week testing... and I have this results:

- This error have nothing to do with any of joomla components (like K2).

It seems to be server related. Cause, the error occurs only in the pages where I use an especific hosting.

But how can the server configuration affect the joomla url sef or multilanguage behaviour? I can't find the connection...

Sir infograf768, I will send you a site developed in joomla where I'm having the same issue by PM... thanks for your attention


Top
 Profile  
 
PostPosted: Tue May 14, 2013 7:11 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
I looked, and my feeling was that it may have been related to K2.

But if you have tested that your server settings are at fault, there is not much I can do.
I suggest you contact your host.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Tue May 14, 2013 9:41 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 24, 2012 2:56 pm
Posts: 15
It's not K2 as long that I can reproduce the problem with or without K2.

I only supose that is server related.

But how can the server configuration affect the multilanguage behaviour?

Thanks for your attention


Top
 Profile  
 
PostPosted: Wed May 15, 2013 6:32 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
I suggest you compare the parameters of the server where it works to the one where it does not. It may be an .htaccess difference, or anything else...

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sun May 19, 2013 5:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 24, 2012 2:56 pm
Posts: 15
The server settings are the same, the the php version is correct too.

Something more that I point out is that the error occurs also if the option "Language selection for new visitors" is "browser settings". If this is as "Default Language", the error desappear.

BUT the new visitors from the whole world are going to enter in spanish always first...

I'm rly lost. The host provider say that the host have nothing to do with this. There are no other cases like this?


Top
 Profile  
 
PostPosted: Wed Jun 19, 2013 6:05 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Oct 30, 2010 1:43 pm
Posts: 44
I'm having the same issue:

viewtopic.php?f=711&t=793150

Apparently it didn't happen with Joomla 2.5


Top
 Profile  
 
PostPosted: Fri Jul 05, 2013 8:23 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Jul 05, 2013 8:07 pm
Posts: 2
Giu Tae Kim wrote:
The server settings are the same, the the php version is correct too.

Something more that I point out is that the error occurs also if the option "Language selection for new visitors" is "browser settings". If this is as "Default Language", the error desappear.

BUT the new visitors from the whole world are going to enter in spanish always first...

I'm rly lost. The host provider say that the host have nothing to do with this. There are no other cases like this?


Giu,

try to switch off "Search Engine Friendly URLs" as 'freeme' posted in the forum viewtopic.php?f=711&t=793150. This helped to solve my issue, so hopefully it will solve yours as well.


Top
 Profile  
 
PostPosted: Mon Oct 07, 2013 11:03 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Oct 07, 2013 10:48 pm
Posts: 1
Lets suppose that we have two language "en(default)" and "fr" .

If "remove url language code" is off everything is well because
user can navigate
http://mysite/en/photos to http://mysite/fr/photos

if "remove url language code" is on joomla removes en/ and this is the beginning of all problems.

In reality joomla cannot go from http://mysite/fr/photos to http://mysite/photos.
So joomla does a redirect (trick) from http://mysite/fr/photos to http://mysite/en/photos and finally to
http://mysite/photos

I have found a tricky solution. I don't know if it is 100% accurately.

Go to joomla/plugins/system/languagefilter/languagefilter.php in function parseRule.

Go to this code

// redirect if sef does not exists and language is not the default one
if (!isset(self::$sefs[$sef]) && $lang_code != self::$default_lang)
{
$sef = isset(self::$lang_codes[$lang_code]) ? self::$lang_codes[$lang_code]->sef : self::$default_sef;

$uri->setPath($sef . '/' . $path);

change the bold text with this

if(strpos($_SERVER["REQUEST_URI"],'fr/') === false)
$uri->setPath('en/' . $path);
else
$uri->setPath($sef . '/' . $path);

Of course languages depend from your site.

Thanks. Sorry for my bad English.


Top
 Profile  
 
PostPosted: Sat Oct 12, 2013 5:01 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
When using Items associations, whether menu items or articles. categories, etc. it is strongly suggested to set default to Default Site language instead of Browser Settings and to NOT take off the URL language code for that language.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Wed Dec 11, 2013 3:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed May 30, 2012 2:22 pm
Posts: 5
Location: Wien, Austria
Hi guys,
@ Joomla 2.5.16
I had the same problems here at my site http://www.loytec.com; and there is really a big problem, when switching to the other not default page.

I debugged the problem and I figured it out; now it works.
Our default language is en-US and we have a second language de-DE, and we enabled the
"Remove URL Language Code" as option in the Plug-in Language Filter.
e.g. http://www.loytec.com/de/produkte/linx is a German page and the English counterpart is build with either
http://www.loytec.com/en/products/linx
or
http://www.loytec.com/products/linx

Using the last link from being on the German http://www.loytec.com/de/produkte/linx page, gave an error 404, because it has built "www.loytec.com/de/products/linx" - and that site does not exist!
Please change the following line at
plugins/system/languagefilter/languagefilter.php : (line 250)
Code:
// redirect if sef does not exists and language is not the default one
               if (!isset(self::$sefs[$sef]) && $lang_code != self::$default_lang)
               {
                  
                  //LOYTEC patch TK++ 2013-12-11; if path =""; then switch to the next language
                  // $sef = isset(self::$lang_codes[$lang_code]) ? self::$lang_codes[$lang_code]->sef : self::$default_sef;
                  $sef = (isset(self::$lang_codes[$lang_code]) && empty($path)) ? self::$lang_codes[$lang_code]->sef : self::$default_sef;
                  

Now it works at my site. - only if you enter the naked site with http://www.loytec.com, it switches to your browser's language site; e.g. on a German browser, it switches to: http://www.loytec.com/de

You can try the old behavior at http://www2.loytec.com/de (only the next following days, ..) and compare it with http://www.loytec.com/de .
Where can I send that bug and solution to?

Thomas Kuschel, Tom oe1tkt, Austria


Top
 Profile  
 
PostPosted: Thu Dec 12, 2013 6:22 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
@tkuschel

This looks indeed like solving the 404s issue when a lang cookie is set and one clicks on an url with no languagecode. Tested on both 2.5.x and master/3.2.x.

I am getting other testers now and will make the patches for both versions if confirmed.

Will post here the urls to the tracker.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Thu Dec 12, 2013 7:19 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
Here is the tracker

http://joomlacode.org/gf/project/joomla ... 41&start=0

Please comment.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Fri Dec 13, 2013 9:04 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
This has now been committed for 2.5.17 and 3.2.1

Thanks a lot. That was an old problem.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Tue Dec 17, 2013 9:24 pm 
Joomla! Intern
Joomla! Intern

Joined: Fri May 25, 2012 10:25 am
Posts: 55
Thanks for this patch, that worked for me no more 404 error

_________________
A Joomla games website http://www.unity-games.org
http://www.unity-3d.org


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 



Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group