VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: RobertG on March 03, 2015, 09:40:10 AM

Title: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on March 03, 2015, 09:40:10 AM
Hi,

I did'nt found the same problem reported here so I open a new topic.

As one can know, they are some problems with multilingual sites in J! 3.4.0.
I have tried on two websites VM 3.0.6: when SEF in off, Joomla! URL in language switcher are false (VM URL are right), as described on issues.joomla.org.
So I switched SEF to "On": language switcher URLs are OK then but when I put a product in cart, the popup language and URLs for viewing cart or continuing shopping are not in the right language, and the client who clic on them is no more in his own language. Please test http://multi.par-robertg.fr/index.php/en/

I mean the problem is the new language code in J! 3.4.0 and not VM, so I needed to regress to J! 3.3.6 for a client site, because of these problems.
May I open a topic in issues.joomla.org as I don't know if this popup language problem belongs to Joomla! or Virtuemart?

Thanks for your help!
Robert
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on March 05, 2015, 21:44:26 PM
Seems to be a joomla 3.4 problem

http://issues.joomla.org/tracker/joomla-cms/6253
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: GJC Web Design on March 06, 2015, 00:03:13 AM
I had problems with the J3.4 multi-language (but no VM problems)
I replaced the J3.4 mod_languages module with the J3.3.6 one and all fixed
Just rename the old mod_languages folder and ftp up the 3.3.6 one

maybe this works?
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on March 06, 2015, 17:17:09 PM
@Milbo: I wrote a message for this problem (fontanil) and no one answered...

@GJC Web Design: I tried to replace mod_languages but it does'nt work as you can see on my test website. SEF on = wrong language in VM popup. I hope 3.4.1 will solve!
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: MarioP on March 07, 2015, 11:52:52 AM
Hi,
I had the same type of issue but with other extension. Here seems to be the solution
http://issues.joomla.org/tracker/joomla-cms/6336

Unfortunately not approved by the Joomla team...
http://forum.joomla.org/viewtopic.php?f=711&t=875801#p3275719
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: prokops on March 29, 2015, 17:12:22 PM
I tried the solutions suggested in this thread but it did not help my principal issue, the same issue as RobertG, that Virtuemart modal popup is screwed on language if Joomla SEF=ON.

Have anybody solved this ?

Cheers,
prokop
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: prokops on March 30, 2015, 09:19:22 AM
I replaced the joomla 3.4.0 /plugins/system/languagefilter with the joomla 3.3.6 version and this particular issue was resolved.

Joomla 3.4.1 does not fix this issue, so I hope it comes in next version.

Cheers, prokop
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on March 30, 2015, 10:45:30 AM
For me, Joomla! 3.4.1 solved this problem.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on March 30, 2015, 12:30:17 PM
Prokops, did you try our fullinstaller? Using joomla 2.5?
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: prokops on March 30, 2015, 20:47:48 PM
Hi Milbo

I tried a clean full install of Joomla 3.4.1 and VM 3.0.6.4, the cart language issue is there: http://inlovemedia.dk/j3-full/en/
This is tested on several different hosts. Why should I try Joomla 2.5 ?
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on April 01, 2015, 19:46:02 PM
There are no language problems with j2.5 and the router is still in development in j3.x so,...
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: prokops on April 13, 2015, 15:31:32 PM
Hi Milbo,

Unfortunately, there is no going back to j2.5 for me, so I am really hoping to find a solution. Language localization on the cart confirmation lightbox surely must be getting attention as it is a fundamental problem for any multilanguage shop. Is there a more effective way to report this to the dev team ?

J!3.4.1 and VM 3.0.6.4 clean install have this issue.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on April 14, 2015, 09:00:18 AM
You can try to tell the joomla guys, or actually Hannes Papenberg. It is a joomla 3.4.1 bug and very likely solved in j3.4.2.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on April 14, 2015, 09:20:30 AM
RobertG already joined them, it seems like that http://issues.joomla.org/tracker/joomla-cms/6253
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: prokops on April 14, 2015, 14:38:36 PM
I am baffled at how Robert can have solved this issue with 3.4.1 as it is broken for me with both upgrade and clean install tests.

Not even replacing the languagefilter from 3.4.1 with the 3.3.6 works anymore as it did on 3.4.0.

I will try and contact Hackwar / Hannes.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on April 14, 2015, 19:54:03 PM
I confirm: no more problems since I updated in 3.4.1
I moved this test site: http:multi.robertg.fr
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: jjk on April 14, 2015, 23:05:34 PM
Quote from: prokops on April 14, 2015, 14:38:36 PM
I am baffled at how Robert can have solved this issue with 3.4.1 as it is broken for me with both upgrade and clean install tests.
I think Robert didn't test with the final J3.4.1 release.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on April 15, 2015, 11:35:42 AM
My Joomla! version on multi.robertg.fr is:
QuoteJoomla! 3.4.1 Stable [ Ember ] 21-March-2015 20:30 GMT
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: jjk on April 15, 2015, 11:56:01 AM
Quote from: RobertG on April 15, 2015, 11:35:42 AM
My Joomla! version on multi.robertg.fr is:
QuoteJoomla! 3.4.1 Stable [ Ember ] 21-March-2015 20:30 GMT
So you still share the unsolved problem with us...
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: jjk on April 15, 2015, 15:38:52 PM
As a temporary workaround I've replaced the J3.4.1 file languagefilter.php with the version dated 17th February (last update before J3.4.0 release) from Joomla's Github history. Seems to work for the moment.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on April 15, 2015, 21:56:16 PM
You're right! :(
The problem is still there! Sorry!
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Studio 42 on April 16, 2015, 01:33:15 AM
Quote from: RobertG on April 15, 2015, 21:56:16 PM
You're right! :(
The problem is still there! Sorry!
HI robert the problem is here:
vmLang = '&lang=fr' ;
this is a javascript problem in Virtuemart not Joomla
Simply uncheck fix language or something similar in the virtuemart config.

En francais:
Salut roberG, le soucis vient de la configuration de virtuemart. il y a une case "fixer le probleme de la langue" enfin dans le genre.
Essaye de décocher la case dans la config et refait un teste.
ce fix ne fonctionne pas car tu n'as pas de langue anglaise, donc virtumart cherche les produits dans myslq en fr_fr, bien évidement cela fait que la popup est en francais ;)

Greets,
Patrick K.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on April 16, 2015, 10:30:00 AM
The site is using english language (and german, french, spanish and italian), default frontend language is french.

On another site (in construction, offline) I applied the patches that were available on github, and it works fine!
Probably one of them was not merged?
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: jjk on April 16, 2015, 14:24:50 PM
@Studio 42
I did test your suggestion with J3.4.1/VM 3.0.7.2. Once I played with 'Language Javascript Fix' in VM Configuration > Checkout tab (was it a Fix for Joomla 1.6?), the language switcher doesn't work when going from a category view to a product details view. Fails in both cases, 'Language Javascript Fix' disabled/enabled.

However, it seems that when I enable that old fix when using the latest staging version of Joomla 3.4.2 from Github, languages are always loaded correctly. In Joomla! 3.4.2-dev (latest staging) the languagefilter.php code is a little bit different from the one in the Joomla 3.4.1 release.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Studio 42 on April 17, 2015, 01:56:36 AM
Hi,
The only real solution is to sef all javascript links.
currently the javascript set this :
vmSiteurl = 'http://site.com/' ;
vmLang = "&lang=fr";

but shoud be

vmSiteurl = 'http://site.com/' ;
vmSitewithLang = 'http://site.com/en/' ;
vmLang = "";

or something so. vmSitewithLang can then be used to prevent bad language setting in the case you need it.
I changed myself some url because google pagespeed(in google chrome only) reported me redirecting in ajax when price update, because language was not set and now it work as i needed.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on April 20, 2015, 11:24:28 AM
Hi,
I tested yesterday with Joomla! staging version 3.4.2dev and VM 3.0.7.4 and the issue was there.
Tomorrow I removed these files and installed Joomla! 3.3.6 and VM 3.0.7.4: all is correct as you can see on http://multi.par-robertg.fr
So I think the problem in in Joomla! not in VM. Right or not?
Robert
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Studio 42 on April 20, 2015, 13:18:53 PM
RobertG,
THe bug is only for eg. when you have 2 languages in your site and one in virtuemart.
If you set  the shop language as your joomla site, you don't  have the problem with the modal in false language.
If you set the config as i wrote, then you have a redirection in joomla depending you current language, and the modal is in the right language.
Simply make a real multilanguage shop(en+fr) or change the setting as i explained and normally the bug is solved.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on April 20, 2015, 14:24:35 PM
Non, le site en 3.4.1 a une configuration 5 langues Joomla! et les mêmes 5 langues VM, même si les exemples ne sont pas traduits (tous en anglais donc), les tables de toutes les langues étant remplies avec la version démo anglaise.
En version 3.3.6, le pop-up utilise parfaitement la langue sélectionnée, en 3.4.0 et 3.4.1 et même maintenant en 3.4.2dev, c'est systématiquement la langue par défaut du site qui est utilisée, et non celle choisie par le visiteur.

No, the 3.4.1 site has a 5 Joomla! languages and same 5 languages in VM, though the examples are not translated (all in English), tables of all languages being filled with the English demo version.
In version 3.3.6, the pop-up perfectly uses the selected language, but in 3.4.0 and 3.4.1 and even now 3.4.2dev the default language of the site is always used, not the one chosen by the visitor.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: prokops on April 20, 2015, 14:32:45 PM
My shop also have 5 joomla languages and 5 virtuemart languages. Am I correct to read that it will work for me if I downgrade to VM 3.3.6 ? And is that possible by just simply upload the 3.3.6 version ?

Cheers, prokop
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on April 20, 2015, 14:52:53 PM
I don't think you can downgrade to 3.3.6 because database as not the same schema.

There are two test sites using VM 3.0.7.4, both with french default site language:
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Studio 42 on April 20, 2015, 20:58:27 PM
RoberG
YOu are right, the setting is correct, but the link does not get the right language.
DO you have try to remove in joomla, auto set language from browser(or something so) ?
I think if the language si not set then this is set from browser.
I think at end enabling the sitelang hook in config must get the good result.

A simple test i have made:
entering the site :
i was redirected to : http://multi2.par-robertg.fr/fr/
chaged to english : http://multi2.par-robertg.fr/en/
reentered in adress bar  http://multi2.par-robertg.fr/ and got redirect to http://multi2.par-robertg.fr/fr/
but this is not logic, nothing are set in session or cookie to redirect to right language, this mean if no language is set then joomla always set the same language and don't look for the last visited page language.

A solution is to set full root url to virtuemart, as i explained some post before, to get right language root. But currently a hook is needed in Joomla or perhaps, disabling the autoset language from browser.

Another solution is to add a system plugin cheking the session, to find and set the right language, if this is missing. I think this can solve the problem for Joomla bad language switching.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on April 20, 2015, 21:29:46 PM
Désolé de le redire en français, mais le problème n'est pas au niveau de Virtuemart, mais à celui de Joomla! : tout fonctionne parfaitement sur le site en 3.3.6 (maintenant avec VM 3.0.8) et mal, à cause des modifications qui ont été faites dans la gestion multilingue de Joomla! 3.4.x, sur le site multi2, lui aussi maintenant en VM 3.0.8.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Studio 42 on April 20, 2015, 21:40:42 PM
I understand ReobergG, this come from Joomla, i only try to get you a solution to use Joomla 3.4+
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: prokops on April 22, 2015, 10:08:08 AM
Hi guys!

As I see Joomla 3.4.1 and Virtuemart 3.0.8 still have this problem present, so my solution for this is to disable the modal in VM config and wait for the Joomla team to apply a proper fix.

Did any of you solve this by hacking core, 3rd party plugins or similar ?

Cheers,
prokop
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Studio 42 on April 22, 2015, 21:36:29 PM
Quote from: prokops on April 22, 2015, 10:08:08 AM
Hi guys!

As I see Joomla 3.4.1 and Virtuemart 3.0.8 still have this problem present, so my solution for this is to disable the modal in VM config and wait for the Joomla team to apply a proper fix.

Did any of you solve this by hacking core, 3rd party plugins or similar ?

Cheers,
prokop

The problem is that perhaps this get fixed or not. I don't have lust ot search a temp solution for nothing.
Perhpas this get solved in 2 weeks or in 6 month with another change in virtuemart or Joomla.
One solution is to sef the links, or get the home of joomla per language, this can solve this problem and perhaps other in multilanguage shops. But investigate 1 hour (and perhaps more) for one person only and next Joomla or vm release fix this, is a time spend.
Sorry for the answer. But most of time, so hooks are ignored by max.

Patrick
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on May 06, 2015, 21:08:52 PM
Virtuemart 3.0.9 just tested: no change! :(
Pop-up language remains the main language and change actual language when we click on "continue shopping" or "view cart", not the one that was used in the shop.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: lindapowers on May 27, 2015, 01:40:15 AM
Im having this same issue. Had not noticed since we use a 3rd party minicart module (no popup) but in the responsive view with the default vm modal popup we get always default shop language (even being in another language) and we get redirected to default language cart.

vm 3.0.8  j 3.4.1


Edit: Did you solve it Robert cause I checked your link and for me it worked in your site with all the languages.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on May 27, 2015, 11:38:08 AM
Quote from: Studio 42 on April 22, 2015, 21:36:29 PM
Sorry for the answer. But most of time, so hooks are ignored by max.
Cause they are like your language.

The problem with the new router is that if there is no itemId given, it uses the homepage Itemid as fallback.
The popup uses the last used itemId, which works well in j2.5, but not in j3.4.1. The final solution is to write an own vm router plugin. and Patrik mentions the right thing, but blames the wrong person.
From my point of view, it is a joomla error and so it is maybe fixed. On the other hand, it is very likely that they say "It is the new behaviour" and we have to adjust our code or write a router.

If someone has an idea to get it running changing our code, yeh go ahead. But I fear the only solution is to have an own router plugin.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Studio 42 on May 27, 2015, 17:11:12 PM
Hi,
Quote from: Milbo on May 27, 2015, 11:38:08 AM
Quote from: Studio 42 on April 22, 2015, 21:36:29 PM
Sorry for the answer. But most of time, so hooks are ignored by max.
Cause they are like your language.

The problem with the new router is that if there is no itemId given, it uses the homepage Itemid as fallback.
The popup uses the last used itemId, which works well in j2.5, but not in j3.4.1. The final solution is to write an own vm router plugin. and Patrik mentions the right thing, but blames the wrong person.
From my point of view, it is a joomla error and so it is maybe fixed. On the other hand, it is very likely that they say "It is the new behaviour" and we have to adjust our code or write a router.

If someone has an idea to get it running changing our code, yeh go ahead. But I fear the only solution is to have an own router plugin.

Your  last response was, i do a new router. But i don't know the current roadmap. If you change all in 1 month, why fixing this bug, doing some test  ?
I don't think i blames the wrong person, but i reported the current state on the router evolution.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on May 30, 2015, 17:08:33 PM
is solved in svn anyway
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on June 05, 2015, 09:43:29 AM
Thanks Milbo!
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on June 11, 2015, 23:29:08 PM
fix is now here http://dev.virtuemart.net/projects/virtuemart/files vm3.0.9.4
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on June 12, 2015, 09:41:22 AM
I just installed this new version on previous test site "multi2", but it don't solve this problem.

Please see http://multi2.par-robertg.fr where french is the default language and popup strings remain in french when you are on german, english, italian or spanish shop.

For information, http://multi.par-robertg.fr is not a 3.4 but a 3.3.6 website where there are no problems with multilanguage.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on June 12, 2015, 15:10:52 PM
New info: I installed Virtuemart 3.0.9.4 on a blank multilingual site 3.4.1 and on this site, language in popup is correct, so I think it was a problem on my "multi2" test website.

Thanks for this fix!
Robert
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on June 12, 2015, 15:35:10 PM
I think the problem here is j3.3.6, but should also work on j2.5
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: RobertG on June 12, 2015, 16:50:20 PM
I had no problem on 3.3.6, only on 3.4.x websites.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Studio 42 on June 12, 2015, 17:26:08 PM
Hi,

As i explained(some post before) the link have to be set with the language, that Joomla know what to display or Joomla search for browser setting or default language.
Simply try to load a page with ajax having no language, if you look in the debug console, you see that Joomla redirect the page in most of case when you have a multilanguage site.

Now when you have router active, if you use a non SEF page( begining with index.php) then Joomla try to set the right page and use the default (french) page in your case.

I'm sorry if no one understand my explain, but the problem is here.
Now, what is the solution ?
using
jroute('index.php&option=com_virtuemart&lang='$currentlang);
as link for ajax and adding parameters in the javascript.
But this need modification in all javascript using ajax for Virtuemart.
Greets,
Patrick
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Milbo on June 12, 2015, 21:12:49 PM
Seems you missed
Quote from: Milbo on June 11, 2015, 23:29:08 PM
fix is now here http://dev.virtuemart.net/projects/virtuemart/files vm3.0.9.4
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: compaid on September 08, 2015, 14:29:04 PM
I have VM 3.0.9 and Joomla 3.4.3 and have same problem with modal popup not changing to switched user selected language.

I found in VM3 config a setting in Checkout - Language javascript fix. Tick this box and it fixes the problem. The Popup now has the language according to what flag was selected and goes to correct cart language.

Worth a try.
Title: Re: False language in popup with SEF in J! 3.4.0 and VM 3.0.6
Post by: Vlada vanek on January 07, 2016, 14:15:11 PM
i do not see any checkbox for this set-up, but i solve this problem easily with change virtuemart language variabel to joomla
Quoteecho '<a class="continue" href="' . $this->continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
echo '<a class="showcart floatright" href="' . $this->cart_link . '">' . JText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';
if($this->products){
   foreach($this->products as $product){
      echo '<h4>'.JText::sprintf('COM_VIRTUEMART_CART_PRODUCT_ADDED',$product->product_name,$product->quantity).'</h4>';
   }
}