• Home
  • Get help
  • Ask a question
Last post 4 hours 22 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67874
All time tickets 10492
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#1471 – Short URL not working due to a multingual redirection

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Tuesday, 01 December 2015 08:57 UTC
adrien5555
hi,

 if a short URL would be mydomain.com/kk as visible in the source code,

it would be redirected tomydomain.com/en/kk

and result in a 404.

what can I do ?

thx

site : xxxx.net
Tuesday, 01 December 2015 09:31 UTC
wb_weeblr
Hi

1 - Which version of Joomla and sh404SEF are you using?

2 - What extension is doing this redirect? the Joomla language filter?

3 - Have you tried changing the order of the sh404SEF and language filter system plugins?

Rgds
 
Tuesday, 01 December 2015 09:34 UTC
wb_weeblr
Yes, it seems it's the language filter: it's a 303 redirect, which is typical.

Can I ask why you have selected to use the /fr/ code in your default language? this makes your home page, xxxx.net, only accessible through a 303 redirect, which is not the most efficient way of doing things.

Please let us know about versions and changing plugin ordering.

Rgds
 
Tuesday, 01 December 2015 10:45 UTC
adrien5555
1 - Which version of Joomla and sh404SEF are you using?


Joomla! 3.4.5 Stable

sh404sef
4.7.1.3144


3 - Have you tried changing the order of the sh404SEF and language filter system plugins?


nope, never did that.

Can I ask why you have selected to use the /fr/ code in your default language?




1) May I ask you where you see this ?

2) Can you believe me if I tell you that I did not select /fr/ as the default ? Yesterday, /en/ was the default, 10 minutes ago it was still /fr/ and now...it's /en/ again....

really dont get it, thx for your help.

NB : i didnt touch the Joomla language filter plugin
Tuesday, 01 December 2015 10:59 UTC
wb_weeblr
Hi

3 - Have you tried changing the order of the sh404SEF and language filter system plugins?



nope, never did that.
I was suggesting this as a possible solution, not a question. It seems the language filter redirect kicks in before the sh404SEF shURL redirect. So putting the language filter after the sh404SEF plugin may solve the issue.
2) Can you believe me if I tell you that I did not select /fr/ as the default ? Yesterday, /en/ was the default, 10 minutes ago it was still /fr/ and now...it's /en/ again....
That's not what I'm talking about.

First, I'm not sure what you mean by "yesterday the default was /en/ and today is /fr"

The page you're presented by Joomla upon trying to reach xxxx.net depends on what was your last visit to the site, which language you visited last and what your browser default language is.

i didn't touch the Joomla language filter plugin
You should. Or at least look at the settings there and see what options you have.

From what you say, I think you're not the one who built the site?

Rgds
 
Tuesday, 01 December 2015 15:04 UTC
adrien5555
From what you say, I think you're not the one who built the site?


Well, wrong, sir. Not comfortable with multilanguage in Joomla, that's all.


The page you're presented by Joomla upon trying to reach xxxx.net depends on what was your last visit to the site, which language you visited last and what your browser default language is.


Thx, I didnt know that.

It seems the language filter redirect kicks in before the sh404SEF shURL redirect. So putting the language filter after the sh404SEF plugin may solve the issue.


I reordered the plugins, cleared J! cache, but problem is still here. Any pathname is redirected to /en/pathname.

Another strange thing : sometimes the homepage (/en/) show up this URL instead :
en/english/home-pixel

This may be due to the same problem...

Ok, any other idea about how to solve that ?
Tuesday, 01 December 2015 15:13 UTC
wb_weeblr
Hi

Ok, any other idea about how to solve that ?
No, I first need to know if sh404SEF is involved.

Could you please provide us with superadmin credentials to your website. You can create a temporary account, and delete it afterwards, but it must have superuser level.

Thanks and regards
 
Tuesday, 01 December 2015 15:15 UTC
adrien5555
Sure,

http://xxxx.net/administrator/
xxxx
xxxx

Thanks for helping,
Adrien
Tuesday, 01 December 2015 17:39 UTC
wb_weeblr
Hi

So this is indeed a problem caused by the language filter. If you have set it up to always insert a language code in your URLs, even for the default language, and you pass a request such as /xx, it will automatically redirect to /en/xx, or whatever is your default language or the last language you used on the site.

I think I have found a workaround for this, at least for Joomla 3.4.+. You can download a new version from this page.

The other option is to set the language filter to "Remove language code on default language". If you do that, the language filter does not do its automatic redirect and the shurls and aliases should work fine.
Note however that you will need to purge URLS after changing this language filter setting, as URL will be different (no language code on default language).

Rgds
 
Wednesday, 02 December 2015 11:04 UTC
adrien5555
Hi,

your update seems to work fine, now short URLs work ^^

Note however that you will need to purge URLS after changing this language filter setting, as URL will be different (no language code on default language).



Isn't there a way to add this language code on default language with SH404SEF ?

Last question
when clicking on the "language switcher" module, from the homepage the URLs displayed are not the ones expected :

http://xxxx.net/fr/french/accueil-pixel
instead of
http://xxxx.net/fr/

and

http://xxxx.net/en/english/home-pixel
instead of
http://xxxx.net/en/

Am I censed to set up redirections for this, or is it a wrong configuration of mine ?

Thanks !
Wednesday, 02 December 2015 15:19 UTC
wb_weeblr
Hi

This is happening because you have created an association between the two home page articles (id= 8 & id = 7. Just clear the association and purge URLs in sh404SEF, that should be enough.

Rgds
 
Thursday, 03 December 2015 12:19 UTC
adrien5555
Ok, it works.

It is quite strane that the association of homepages, which seems pretty logical , creates this trouble...

but thank you for all !
Thursday, 03 December 2015 12:23 UTC
wb_weeblr
Hi

It's not so much associating the home pages themselves (ie: the menu items for home page).
What you had is associations directly at article levels. And when you do that, the URL associated is slightly different (it has ...&catid=11&... added by Joomla, and the Itemid is possibly not the same).
So this is not the home page link exactly and we don't recognize it as such any more.

What you did was associating 2 articles, but in Joomla an article is not equivalent to a page. A "page" is really a menu item id. Modules and templates are linked to menu items for instance, not to articles or categories.

Associating the home page menu items would cause no problem.

Rgds
 
Thursday, 03 December 2015 12:34 UTC
adrien5555
That's crystal clear.

This menu item in Joomla is sometimes confusing, so your explanations help.

Thanks for all,

Adrien
Thursday, 03 December 2015 13:47 UTC
wb_weeblr
Hi

Glad to hear that ;)

Closing this ticket now, feel free to open a new one as needed. If you do so, please mention this ticket number in the new one.


Cheers
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.