Letters s and f changes in prod alias translations

  • Posts: 50
  • Thank you received: 1
11 years 4 months ago #154668

-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.3.0

Hi.
I have a multilingual site. English and Swedish. The links of product name alias get changed in swedish "mode". The letter s becomes r and letter f becomes ph. (Maybe other characters gets changed as well, I don't know). Even the category names gets changed. This appears in both category and product listing. I think this was due to an update. I just recently noticed the problem. I had no problem with this before.

Eg.

In english (correct)
(domain.com)/en/sheet-music/product/1-blues-for-r-duo-as-as

In swedish (wrong)
(domain.com)/sv/noter/product/1-bluer-phor-r-duo-ar-ar

The product name is in english and I don´t want the names to change in swedish translation.

I have tried to put the correct alias in the translation field. Both via hikashop and in Falang. Clearing cache done. Still having the same problem.

Any ideas?


Regards

Mathias

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #154720

Hi,

Do you have set this translation anywhere ?
Can you try to change the product name ? I guess that for the sef urls the name can be used instead of the alias.

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

  • Posts: 50
  • Thank you received: 1
11 years 4 months ago #154779

No I have not set any translation.

I tried:
1. Changed the product name to "SFBlues for R -duo as/as".
2.Turned off atomatic alias filling in sef settings.
3. Cleared the alias field in product edit and in falang.

Result is:
English (correct):
(domain.com)/en/sheet-music/product/1-sfblues-for-r-duo-as-as

Swedish (wrong)
(domain.com)/sv/noter/product/1-rphbluer-phor-r-duo-ar-ar

Ahrrg!!

I'm stuck here. Maybe you can take a look in my admin?

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

  • Posts: 84293
  • Thank you received: 13694
  • MODERATOR
11 years 4 months ago #154796

Please make sure that you turn off all the caching of your website (joomla configuration, template configuration, joomla system cache plugin) or you won't see the new links.

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

  • Posts: 50
  • Thank you received: 1
11 years 4 months ago #154867

My template don't have cache handling. Joomla config cache is turned off. System cache plugin is disabled.

I do see the new links, it's just that links when in swedish language mode changes the letter s to r and the letter f becomes ph. See prev post for example. The links works when clicked on. Strange!

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

  • Posts: 50
  • Thank you received: 1
11 years 3 months ago #154997

Still having this problem.

It's not only swedish link to products that gets vierd and altered. It's the category names as well.

I have a category named "Saxofon" and a child category named "Saxofonduo".

The links appears as:
/sv/kategorier/21-raxophon (s is replaced by r and the f is replaced by ph)

and

/sv/kategorier/12-raxophonduo (s is replaced by r and the f is replaced by ph)

I really need help with this.

Mathias

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

  • Posts: 50
  • Thank you received: 1
11 years 3 months ago #155406

Problem remains...

Turned off Joomla sef.

Link product listing:

index.php?option=com_hikashop&ctrl=product&task=show&cid=1&name=rphbluer-phor-r-duo-ar-ar&Itemid=491&lang=sv

the product link name should be: sfblues-for-r-duo-as-as

Link category listing:
index.php?option=com_hikashop&ctrl=category&task=listing&cid=21&name=raxophon&Itemid=490&lang=sv

the category name should be: saxofon

The system somehow replaces s with r, and f with ph.

As mentioned in prev post the links works. It's the names that are wrong. (In english language everything is good.)

Regards

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

  • Posts: 26272
  • Thank you received: 4044
  • MODERATOR
11 years 3 months ago #155420

Hi,

The product name you got in the url is the "product alias".
This alias is generated in the function "addAlias" for the product class ( administrator/components/com_hikashop/classes/product.php ) and more precisely, this code:

		$config = JFactory::getConfig();
		if(!$config->get('unicodeslugs')){
			$lang = JFactory::getLanguage();
			$element->alias = $lang->transliterate($element->alias);
		}
		$app = JFactory::getApplication();
		if(method_exists($app,'stringURLSafe')){
			$element->alias = $app->stringURLSafe($element->alias);
		}else{
			$element->alias = JFilterOutput::stringURLSafe($element->alias);
		}
The goal of the code is to :
1 - Make a transliteration when the Joomla option "unicodeslugs" is not activated.
2 - Call the Joomla url safe function for the security.

I think that your problem is with the transliteration.
As you can see in the code, this function is a Joomla function of the Joomla language system.
You can see to put some debug traces in the class to display the "$element->alias" before and after the call of the transliterate function, to see that this function make the modification or not.
But I really think that the Joomla transliteration for the swedish language, made these modifications.
If so, you can see to change the Joomla option "unicodeslugs" to not use the transliteration.

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.
The following user(s) said Thank You: matback

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

  • Posts: 50
  • Thank you received: 1
11 years 3 months ago #155466

Yeeah!!! I got it working :cheer: :cheer:

Thanks Jerome, you were spot on. I found sereral errors in the the function transliterate(), sv-SE.localise.php for the swedish language. Actually that file is badly maintained, I will mail the language guys and give them the correct values of that function.

Many thanks for guiding me in the right direction :cheer: .

Best regards
Mathias

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

Time to create page: 0.083 seconds
Powered by Kunena Forum