problem with "Chanel® Mini " as name of product

  • Posts: 2293
  • Thank you received: 315
5 years 11 months ago #291882

-- HikaShop version -- : 3.4.0

If I have this name for product - "Chanel® Mini "
I can't get into product page - get 404 error.

The problem is with ® symbol. Hikashop don't filter it


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!

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

  • Posts: 12953
  • Thank you received: 1778
5 years 11 months ago #291883

Hello,

Providing a link to your page will probably help us to understand your issue, but directly setting a correct "Alias" through your product configuration page will probably be better.

Bien cordialement,
Mohamed Thelji.

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

  • Posts: 2293
  • Thank you received: 315
5 years 11 months ago #291912

Yes, I can change the alias for this page and it work ok.
Let's imagine I have 10 000 products or more. Do I need to find every product and change it by myself?

I talk you about that hikashop don't filter wrong characters in the name of the product - one of this character is ®

Please consider to fix the problem with filter of characters


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 11 months ago #291918

Hi,

Having that character in the alias is not necessary a problem.
It's only a problem for the SEF system of Joomla if you have the "Unicode Aliases" setting deactivated in the Joomla configuration and if you remove the ids of the products and categories in the URLs (setting from the HikaShop configuration).
With the ids in the URLs, the alias can be anything, since the SEF system will rely on the ids to identify the products/categories.

So unfortunately, we should not filter these characters. Otherwise, people wouldn't be able to use them when they want to use them. It's just a combination of settings wrongly configured on your website which lead to that error.

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

  • Posts: 2293
  • Thank you received: 315
5 years 11 months ago #291951

to use unicode characters - is a wrong decision in our country.
There are definitely problems with unicode aliases - you can't type russian characters if you don't have russian keyboard.
Also foreign spider bots can't crawl Cyrillic aliases. And so on.
SO many sites in our country don't use unicode aliases - they lead to problems.

I don't see what problem will appear if you filter this character?
All Cyrillic letters converts to Latin now and it is good. Why don't to convert this symbols to something ?


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!
Last edit: 5 years 11 months ago by progreccor.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 11 months ago #292008

Hi,

The problem that will appear is that people that want to use these characters won't be able to.
While it might not be good to do so in Russian, I've seen many websites in Chinese doing so. While I'm not familiar with SEO best practices for Chinese, even wikipedia does it so I suppose that they must have some good reasons for it.

And as I said, this happens only because of the way you configured your website.
If you deactivate the unicode aliases setting of the Joomla configuration, then HikaShop will use the language transliteration system of Joomla to generate the aliases and it should normally convert the Russian letters to latin.
It's do with this code:

function addAlias(&$element){
		if(empty($element->product_alias)){
			$element->alias = strip_tags(preg_replace('#<span class="hikashop_product_variant_subname">.*</span>#isU','',$element->product_name));
		}else{
			$element->alias = $element->product_alias;
		}
		$config = JFactory::getConfig();
		if(!$config->get('unicodeslugs')){
			$lang = JFactory::getLanguage();
			$element->alias = str_replace(',','-',$lang->transliterate($element->alias));
		}
		$app = JFactory::getApplication();
		if(method_exists($app,'stringURLSafe')){
			$element->alias = $app->stringURLSafe($element->alias);
		}elseif(method_exists('JFilterOutput','stringURLUnicodeSlug')){
			$element->alias = JFilterOutput::stringURLUnicodeSlug($element->alias);
		}else{
			$element->alias = JFilterOutput::stringURLSafe($element->alias);
		}
	}
in administrator/components/com_hikashop/classes/product.php
So if you don't get the alias in latin after saving a product with a name in cyrillic (and without an alias already set in the product) even thougth the unicode aliases setting of Joomla is deactivated, then it means that there is a problem with the transliteration system. Maybe your language is not installed properly ?

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

Time to create page: 0.074 seconds
Powered by Kunena Forum