Duplicate Product Seo Names

Hi,

When I create new products, my cs-cart seems to fail and see duplicate SEO names. this only started when I upgraded to 4.3.9. In the past it would add a suffix such as "-en" to create a unique SEO name. I already disabled 3rd party addons and checked SEO settings but still no go. Any ideas?

http://forum.cs-cart.com/tracker/issue-6421-seo-duplicate-names/

Thanks The Tool. Their support fixed it by adding the following line:

$names_cache[$_object_name] = 1;

above this one:

$_object_name = fn_create_seo_name($object_id, $object_type, $object_name, $index, $dispatch, $company_id, $lang_code, $create_redirect);

in app/addons/seo/func.php

That's funny! They said they couldn't reproduce the issue in the bug tracker.?

Edit: Have you confirmed it's fixed? I will try it tomorrow and report back.

That's funny! They said they couldn't reproduce the issue in the bug tracker.?

Edit: Have you confirmed it's fixed? I will try it tomorrow and report back.

Yeah I know...I was also monitoring the bug report.

Anyway, yes it fixed the issue for me. I haven't tried adding products using import yet..

this is what ultimately fixed the issue for me (4.3.9), both when importing and adding products via admin panel

replace the following line in the app/addons/seo/func.php file:
if ($affected_rows) {
with these ones:
// cache object name only if the names cache is not empty already
if (!empty($names_cache) && $affected_rows) {

I forgot to report back but the code in post #3 didn't fix it.

Trying the code in post #6. Are we supposed to remove the changes in post #3?

It sure would be nice if CSC would post this stuff somewhere. Like maybe in the bug report that I posted????

I forgot to report back but the code in post #3 didn't fix it.

Trying the code in post #6. Are we supposed to remove the changes in post #3?

It sure would be nice if CSC would post this stuff somewhere. Like maybe in the bug report that I posted????

Yes, you'll need to take out the changes in post #3

this is what ultimately fixed the issue for me (4.3.9), both when importing and adding products via admin panel

replace the following line in the app/addons/seo/func.php file:
if ($affected_rows) {
with these ones:
// cache object name only if the names cache is not empty already
if (!empty($names_cache) && $affected_rows) {

Confirmed fix.