Ran in to this problem whilst ‘SEOing’ a client of mine’s OsCommerce store using the very popular Ultimate SEO URLs contribution.
I installed the mod with no problems, and initially, browsing the site seemed to be functioning fine - however, I then noticed then although the product names were being appended to the URLs properly, the category names were not showing up in the URL i.e. they looked like this store.com/-c-1.html
I couldn’t work out where to start on resolving this problem, so checked the database (all seemed fine), checked the seo.class.php file to ensure that there weren’t any typos with the get_category_name function - again, all was well.
So, I hit the support forum but after attempting to trawl through 159 pages of questions, soon gave up.
You want to know what the fix is? Turn off the ‘Add parent category to beginning of URLs’ option in the configuration section… Why? No idea, but it works and so I thought I’d share it in case other people were experiencing the same issue as me…


Hey - thanks a bunch for this. Don’t know how you worked out that was what you had to do to fix it, but it worked for me too…
Genius!
Thanks for posting this. It just fixed my problem as well. The other weird thing is that the problem started when we moved to a new server…
Thanks man , I was actually wondering what the hell was going on!
Thanks,your help is very useful.
Thank you again!
THis does fix the problem we had as well, but now the urls do not display with the parent info also which is far from ideal. This also happened when moving to a new server for us. It has to do with newer versions of mysql not accepting Joins as did older versions
in includes/classes/seo.class.php simply change the join statement around line 2180 to
$sql = “SELECT c.categories_id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName
FROM “.TABLE_CATEGORIES.” c left join
“.TABLE_CATEGORIES_DESCRIPTION.” cd using (categories_id)
LEFT JOIN “.TABLE_CATEGORIES_DESCRIPTION.” cd2
ON c.parent_id=cd2.categories_id AND cd2.language_id=’”.(int)$this->languages_id.”‘
WHERE c.categories_id=’”.(int)$single_cID.”‘
AND cd.categories_id=’”.(int)$single_cID.”‘
AND cd.language_id=’”.(int)$this->languages_id.”‘
LIMIT 1″;
Great tip - thanks rich!