Closed
Description
I see this problem from version 1.4.0.2. (This problem is present at least 5 years.)
When creating new Category and input Name with non-English symbols and save then system auto-generate URL like 'doed-n-d-d-d-d-n-d-d-n-d-d-d-n-d-n.html' instead of 'moja-novaja-kategorija.html'
For Product auto-generating URL works fine - 'moja-novaja-kategorija.html'.
I fixing this bug in class Mage_Catalog_Model_Category by changing formatUrlKey function - calling formatUrlKey from Mage_Catalog_Model_Product_Url.
public function formatUrlKey($str)
{
return Mage::getSingleton('catalog/product_url')->formatUrlKey($str);
}
instead of native function
public function formatUrlKey($str)
{
$str = Mage::helper('Mage_Core_Helper_Data')->removeAccents($str);
$urlKey = preg_replace('#[^0-9a-z]+#i', '-', $str);
$urlKey = strtolower($urlKey);
$urlKey = trim($urlKey, '-');
return $urlKey;
}