Skip to main content

Joomla 3.4 Update: Two language parameters in URL

More
11 years 7 months ago #192120 by disc
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.4.0
-- Browser(s) name and version -- : all

Hi,
since updating to Joomla 3.4 all HikaShop Links have two language paramaters in the URL.
Example:
The right URL is: mydomain.com/index.php/en/mycategory
That URL refers to the right category and displays in correctly.
After updating to Joomla 3.4 another language paramater is added to all HikoShop Links:
The URL now is: mydomain.com/index.php/en/mycategory/ lang-en-GB
The content will not be found anymore. After deleting the parameter lang-en-GB in the browser URL path manually, the related content will be displayed.
URLs that refer to other content (outside HikaShop) are not affected and do not show the second language parameter.
Anyone got a clue?

Thanks, disc

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192232 by DavidThor
I've got the same problem!

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago - 11 years 7 months ago #192251 by nicolas
Hi,

We were able to replicate the issue. It appears only with the System language filter plugin activated and only since Joomla 3.4.
The solution is to change the line:
Code:
if(!in_array($name,array('option','Itemid','start','format','limitstart'))){
to:
Code:
if(!in_array($name,array('option','Itemid','start','format','limitstart','lang'))){
in the file components/com_hikashop/router.php
Last edit: 11 years 7 months ago by Jerome. Reason: [code] is nice
The following user(s) said Thank You: DavidThor, disc

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192818 by disc
Thanks. That fixed it!

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192917 by webmaster-fc
Joomla! 3.4.0
com_hikashop_business_v2.3.5
com_hikamarket_multivendor_v1.6.0

Hello
I have the same problem
But when I change this line in components/com_hikashop/router.php
The homepage of my site is white
I also own hikamarket_multivendor
Should also modify the components/com_hikamarket/router.php file
Thanks for your help

Bonjour,
J'ai le mème problème
Mais quant je change cette ligne dans components/com_hikashop/router.php
La page d'accueil de mon site est blanche
Je possède aussi hikamarket_multivendor
Faut-il modifier aussi le fichier components/com_hikamarket/router.php
Merci pour votre aide

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192919 by Jonkerm
i have the same problem.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192923 by Jerome
Hi,

@webmaster-fc : if you also have issues in HikaMarket, yes, the best will be to also modify the HikaMarket router and use this line of code
Code:
if(!in_array($name, array('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {

@Jonkerm : please use the patch that Nicolas gave in a previous post.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192951 by Jonkerm
I did that. the double language url is then solved. But not the white pages.
That's why I put it back to original.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192956 by webmaster-fc
I modified the components/com_hikashop/router.php file
If (! in_array ($name, array ('option', 'Itemid', 'start', 'format', 'limitstart'))) {}
by
If (! in_array ($name, array ('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {}
and I added the following line in the components/com_hikamarket/router.php file
If (! in_array ($name, array ('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {}
This is normal space in ',' or set ','
and or put this line in the components/com_hikamarket/router.php file
----
I am doing a test here, but still my white home page
foreach ($segments as $name) {}
If (! in_array ($name, array ('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {}
If (isset ($vars ) & isset ($vars [task]) & $shopConfig-> get('sef_remove_id',0) & hikmarket_retrieve_url_id ($vars, $name))

Greetings


J'ai modifié le fichier components/com_hikashop/router.php
if(!in_array($name,array('option','Itemid','start','format','limitstart'))){
par
if(!in_array($name,array('option','Itemid','start','format','limitstart','lang'))){
et j'ai ajouté la ligne suivante dans le fichier components/com_hikamarket/router.php
if(!in_array($name, array('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {
c'est normal l'espace dans ', ' ou mettre ','
et ou mettre cette ligne dans le fichier components/com_hikamarket/router.php
----
j'ai fais un essai ici, mais toujours ma page d'accueil blanche
foreach($segments as $name) {
if(!in_array($name, array('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {
if(isset($vars) && isset($vars) && $shopConfig->get('sef_remove_id',0) && hikmarket_retrieve_url_id($vars, $name))

Salutations

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192961 by Jerome
Hi,

Please check your PHP error log.
Regarding the code you pasted, one time it is good (in the "French section") and another time wrong (in the "English section").
So it is difficult to know what you have really pasted in HikaMarket.
Please note that you can use the "[ code ]" tag in order to paste code.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #193016 by webmaster-fc
There is nothing in my journal error.php
For the rest, I did not fully understand your explanations and I handed over the original files in place
I'll wait a possible updating
Thank you

il n'y a rien dans mon journal error.php
Pour le reste, je n'ai pas bien compris vos explications et j'ai remis les fichiers originaux en place
Je vais attendre une mise à jour éventuelle
Merci

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #193074 by Xavier
Hi,

What Jerome was saying is that in french section of your post the code is correct, but not in the English one, in the english one you have "{}" in stead of only "{" for the foreach and the if condition.. ;)

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #193139 by webmaster-fc
Hikashop, the problem is solved I had well put {} instead of {}
But I had a problem with categories that retained the canonical url with lang-en-at the end of urls
It is now set and everything runs smoothly

Still me have the problem with HikaMarket
In the components/com_hikamarket/router.php file, I do not know or paste
If (! in_array ($name, array ('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {}

Thanks again


Hikashop, le problème est résolu j'avais bien mis {} à la place de {
Mais il me restait un problème avec les catégories qui conservaient les url canoniques avec lang-fr-FR à la fin des urls
C'est maintenant réglé et tout fonctionne bien

Il me reste le problème avec HikaMarket
Dans le fichier components/com_hikamarket/router.php , je ne sais pas ou coller
if(!in_array($name, array('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {

Encore merci

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #193147 by Jerome
Hi,

Once again, the english part contains "{}" instead of "{" ; but because you said it is working I think that the right one is the French one.
So, for HikaMarket, the file is "components/com_hikamarket/router.php" and the line to replace is
Code:
if(!in_array($name, array('option', 'Itemid', 'start'))) {
With the new content
Code:
if(!in_array($name, array('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #193151 by webmaster-fc
OK, it's good for everything
This is my Bing translator translator who added the second }
A big thanks to you
ok, c'est bon pour tout
c'est mon traducteur Bing Traducteur qui ajoutait le deuxième }
Un grand merci à vous

Please Log in or Create an account to join the conversation.

Time to create page: 0.340 seconds
Powered by Kunena Forum