?
avatar jschmi01
jschmi01
2 Mar 2015

Steps to reproduce the issue (languages de_DE and en_GB used)

call start-page via http://your-host
joomla responds with http://your-host/index.php?lang=de
click flag-icon to switch to english language
joomla redirects to wrong url: http://your-host/index.php?lang=en&Itemid=xx&option=com_content (xx = itemid of start-page)

Expected result

joomla should redirect to: url: http://your-host/index.php?lang=en&Itemid=xx
or
http://your-host/index.php?lang=en&Itemid=xx&option=com_content&view=featured

Actual result

English start-page will display wrong content, as parameter option (&com_content) is wrong.
if this option added there must be in addition a view parameter - for start-page it would be "&view=featured"

Problem appears after migration from 3.3.6 to 3.4
Circumvented / fixed problem by replacing 3.4 version of mod_languages with 3.3.6 version of module.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar jschmi01 jschmi01 - open - 2 Mar 2015
avatar jschmi01
jschmi01 - comment - 2 Mar 2015

There is a missing check for "sef" (JRoute should not used for non-sef)!
if you change/add this code at line 107 of helper.php all works fine:


//$language->link = JRoute::('index.php?lang=' . $language->sef . '&Itemid=' . $itemid);
// added code:
if ($app->get('sef') == '1')
{
$language->link = JRoute::
('index.php?lang=' . $language->sef . '&Itemid=' . $itemid);
}
else
{
$language->link = 'index.php?lang=' . $language->sef . '&Itemid=' . $itemid;

}

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6253.
avatar jackkum
jackkum - comment - 2 Mar 2015
avatar jschmi01
jschmi01 - comment - 2 Mar 2015

hi,
do not know either - results show that obviously it is not.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6253.
avatar brianteeman brianteeman - change - 2 Mar 2015
Title
3.4 language switcher module (mod_languages) creates wrong url
3.4 language switcher module (mod_languages) creates wrong url
Labels Added: ?
avatar mbabker
mbabker - comment - 2 Mar 2015

JRoute should not used for non-sef

JRoute should always be used. The router classes are designed to be aware if SEF is enabled or not and react as such.

avatar jschmi01
jschmi01 - comment - 2 Mar 2015

hi,
and now - what ist the problem???? I've changed code to bypass router and with this it works (by the way this is the code implementation of V3.3.6!)

avatar Hackwar
Hackwar - comment - 2 Mar 2015

@jschmi01 doesn't mean that the code of 3.3.6 is correct.

The fix for this is #6254

avatar jschmi01
jschmi01 - comment - 2 Mar 2015

OK - thank you! (will stick with may circumvention until fix gets available)

avatar brianteeman brianteeman - change - 2 Mar 2015
Title
3.4 language switcher module (mod_languages) creates wrong url
3.4 language switcher module (mod_languages) creates wrong url
avatar brianteeman brianteeman - change - 2 Mar 2015
Category Modules Modules Multilanguage
avatar fontanil
fontanil - comment - 3 Mar 2015

Hi,
I hope my post will be usefull.
I don't know if it's the same problem as the language switcher. If not, please delete this post.
(I have created a topic on VM forum too).

I reproduced this problem in multilingual VM3 sites and Joomla! 3.4.0 (client's site and own test site too). When SEF is off, as said here, VM URLs in language switcher seems to be right, not Joomla! URLs, .
If SEF is on, language switcher has now good URLs, but another problem appears in Virtuemart: when I put a product in cart, language strings and URLs in the popup window are not in the right language. If I clic on "continue shopping" or "view cart" (in the false language) I am no more in my own language.
You can view it on http://multi.par-robertg.fr/index.php/en/shop (SEF On): change language, popup language remains the same. (I needed to regress in J! 3.3.6 on a client's site).

Robert

avatar prokopsdk
prokopsdk - comment - 14 Apr 2015

I have the same issue as Robert that is unresolved in 3.4.1.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6253.

avatar Gitjk
Gitjk - comment - 14 Apr 2015

I also have the same strange behavior in VirtueMart, which fontanil (Robert) reported above, when I update a Joomla 3.4.0/VM 3.0.x shop (including latest version) to Joomla 3.4.1.

However, Robert said in the comments for #6254 that "...both 6254 and 6278 patches solve language switcher URLs and language in Virtuemart popup." But somehow this problems seems to have reappeared in the J3.4.1 release.

When using the VM 'Add to Cart' button while in a different language than the site default language, the language switcher changes to the default site language. The issue is present with both, SEF urls on/off. This only happens with Joomla 3.4.1. All other Joomla 2.x/3.x combinations with VirtueMart don't have this problem.

I currently have no idea what exactly causes this behavior, because there are no error messages.

@prokopsdk
Perhaps you can add the link to your test site (which I've seen in the VM forum) here so others can see the problem 'live'. Since you seem to have set English as the site default language, the problem becomes visible when using the other languages.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6253.

avatar prokopsdk
prokopsdk - comment - 15 Apr 2015

Live test site: http://inlovemedia.dk/j3-341/index.php/se/
This is a clean install of J!3.4.1 and VM3.0.6.4 with SE and EN languages.

avatar fontanil
fontanil - comment - 15 Apr 2015

I just tested on http://multi.robertg.fr and issue has reappeared in 3.4.1 and VM 3.0.6.4

avatar brianteeman brianteeman - change - 12 Nov 2015
Status New Information Required
avatar brianteeman brianteeman - change - 12 Nov 2015
Title
3.4 language switcher module (mod_languages) creates wrong url
3.4 language switcher module (mod_languages) creates wrong url
avatar brianteeman
brianteeman - comment - 12 Nov 2015

The last comment here was in April. So the question is, Is this issue still valid - there seems to be some confusion from the comments that this is a VM issue not Joomla


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6253.

avatar brianteeman brianteeman - change - 28 Dec 2015
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2015-12-28 10:12:22
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 28 Dec 2015

Closed due to lack of response to previous comment


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6253.

avatar brianteeman brianteeman - close - 28 Dec 2015
avatar ssnobben
ssnobben - comment - 10 Aug 2016

I think this is the similar problem as I had with using &lang or not and cache issues #11470
#11470


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6253.

Add a Comment

Login with GitHub to post a comment