possible .htaccess problem with bilingual site

General questions regarding the use of languages in Joomla! 3.x.

Moderator: General Support Moderators

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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
surdo
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Jul 27, 2013 10:01 am

possible .htaccess problem with bilingual site

Post by surdo » Tue Jul 26, 2016 3:03 pm

Hello,

I recently upgraded to Joomla 3.6 and discovered a problem. I have a bilingual website which has a default home page in Portuguese. When search engine friendly urls is set "off" in the global Joomla settings, everything works fine. However when it is activated, along with URL rewriting etc., the default page jumps, for some reason, to the English page. This occurs since the move to 3.6 and was working fine before.

For example, when I try to access the page http://escuta.org it jumps to http://escuta.org/en

You'll also notice that the language switcher icon (top right) fails to toggle between the languages.

I can't work out what the problem is. The real default Portuguese home page can be reached using the non-search-engine-friendly link of:

http://escuta.org/index.php?lang=pt

I tried copying htaccess.txt to .htaccess, in case it had been updated, but this didn't help.

Any suggestions/solutions will be greatly appreciated!

Thanks,

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30931
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: possible .htaccess problem with bilingual site

Post by Per Yngve Berg » Tue Jul 26, 2016 3:33 pm

Mod. Note: Relocated the Topic to the Language Forum.

It's possible that this is the bug in 3.6
0 that will be fixed in 3.6.1.

There are other posts about it.

surdo
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Jul 27, 2013 10:01 am

Re: possible .htaccess problem with bilingual site

Post by surdo » Tue Jul 26, 2016 5:24 pm

Thank you and sorry I hadn't seen these. It also seems to be affecting redirects, so perhaps it's the same root issue. Are you aware of any patches that I can apply? I'm googling but can't find anything.

surdo
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Jul 27, 2013 10:01 am

Re: possible .htaccess problem with bilingual site

Post by surdo » Tue Jul 26, 2016 6:13 pm

I just found the "!!! 3.6.0: Solution for multilanguage" post above in this forum. I tried the attached languagefilter.php file, but this unfortunately this just made the switcher unusable (flag disappeared and text seemed invisible). My switcher does work, at least, when I'm in non-friendly URL mode.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: possible .htaccess problem with bilingual site

Post by infograf768 » Wed Jul 27, 2016 9:04 am

INDEED, the file needs another modification to be used in 3.6.0.
Will post it here when ready: http://forum.joomla.org/viewtopic.php?f=711&t=929667
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: possible .htaccess problem with bilingual site

Post by infograf768 » Wed Jul 27, 2016 9:16 am

Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

surdo
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Jul 27, 2013 10:01 am

Re: possible .htaccess problem with bilingual site

Post by surdo » Wed Jul 27, 2016 10:33 am

Thanks, but unfortunately it doesn't help when the site is set to friendly URLs. I'll leave the site on friendly URLs for a little longer so you can have a look.

The only way to see the portuguese default page is with:

http://escuta.org/index.php?lang=pt

There after, the "home" button on the top menu of this page directs the page to http://escuta.org which is correct, however the page redirects to: http://escuta.org/index.php?lang=en

In the language toggle, selecting the British flag causes the page to go to: http://escuta.org/index.php?lang=en . No problems there. However when you select the Brazilian flag, the page is directed first to http://escuta.org/pt and redirects to http://escuta.org/index.php?lang=en

I don't ever remember seeing this http://escuta.org/pt link before, it only started appearing in 3.6.0. And as far as I know it doesn't exist, the default page is escuta.org and this should already be in Portuguese.

A solution for me, would be for the Brazilian flag to direct to:

http://escuta.org/index.php?lang=pt

and for the "home" button in the Portuguese top menu, to also direct to this explicit link rather than http://escuta.org (which should work but for some reason doesn't).

All the best,

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30931
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: possible .htaccess problem with bilingual site

Post by Per Yngve Berg » Wed Jul 27, 2016 10:41 am

Did you upgrade from 3.5.1 to 3.6.0?

I remember from previous upgrades that an item did not have permissions to the language. Re-applying it helped.

You can also choose to have the default language show or not in the url with options of the Language Filter Plugin.

surdo
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Jul 27, 2013 10:01 am

Re: possible .htaccess problem with bilingual site

Post by surdo » Wed Jul 27, 2016 12:53 pm

Thanks very much for the suggestion. Setting "Remove URL Language Code" to "no" seems to resolve the problem. As you know, when set to yes, "pt" is removed from the default portuguese pages. This works for a while after clearing the browser cache, but after some time switching between languages, both Chrome and Firefox seem to get stuck on the "en" pages and redirect to English when the root portuguese directory is selected. "Remove URL Language Code" set to "no" resolves this.

There is a problem however. When set to no, I can't seem to get redirects to work. http://escuta.org/espelho for example will redirect to http://escuta.org/pt/espelho (which doesn't exist) and not desired link http://escuta.org/pt/projetos/instalaca ... intro.html

I also tried a redirect on http://escuta.org/pt/espelho but this doesn't work either. However when "Remove URL Language Code" is set to "yes", I can get a redirect on http://escuta.org/espelho to the correct link.

And yes, I upgraded from 2.5.1

surdo
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Jul 27, 2013 10:01 am

Re: possible .htaccess problem with bilingual site

Post by surdo » Wed Jul 27, 2016 1:47 pm

Not to worry. I found a solution. I'll use the .htaccess file. This for example does the redirect I want:

Redirect /espelho http://escuta.org/pt/projetos/instalaca ... intro.html

All the best,


Locked

Return to “Language - Joomla! 3.x”