Joomla 3.4 Update: Two language parameters in URL

  • Posts: 43
  • Thank you received: 3
9 years 1 month ago #192120

-- 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.

  • Posts: 43
  • Thank you received: 0
9 years 1 month ago #192232

I've got the same problem!

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
9 years 1 month ago #192251

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:

if(!in_array($name,array('option','Itemid','start','format','limitstart'))){
to:
if(!in_array($name,array('option','Itemid','start','format','limitstart','lang'))){
in the file components/com_hikashop/router.php

Last edit: 9 years 3 weeks 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.

  • Posts: 43
  • Thank you received: 3
9 years 3 weeks ago #192818

Thanks. That fixed it!

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

  • Posts: 8
  • Thank you received: 0
9 years 3 weeks ago #192917

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.

  • Posts: 6
  • Thank you received: 0
  • Hikashop Essential
9 years 3 weeks ago #192919

i have the same problem.

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 3 weeks ago #192923

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

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 6
  • Thank you received: 0
  • Hikashop Essential
9 years 3 weeks ago #192951

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.

  • Posts: 8
  • Thank you received: 0
9 years 3 weeks ago #192956

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.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 3 weeks ago #192961

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 8
  • Thank you received: 0
9 years 3 weeks ago #193016

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.

  • Posts: 13201
  • Thank you received: 2322
9 years 3 weeks ago #193074

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.

  • Posts: 8
  • Thank you received: 0
9 years 3 weeks ago #193139

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.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 3 weeks ago #193147

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

if(!in_array($name, array('option', 'Itemid', 'start'))) {
With the new content
if(!in_array($name, array('option', 'Itemid', 'start', 'format', 'limitstart', 'lang'))) {

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 8
  • Thank you received: 0
9 years 3 weeks ago #193151

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.121 seconds
Powered by Kunena Forum