Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Duplicate Product Seo Names Rate Topic   - - - - -

 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 30 July 2016 - 01:54 PM #1

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?



 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3752 posts

Posted 31 July 2016 - 12:30 AM #2

http://forum.cs-cart...uplicate-names/

 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 10 August 2016 - 02:18 AM #3

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 



 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3752 posts

Posted 10 August 2016 - 03:53 AM #4

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.



 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 10 August 2016 - 02:05 PM #5

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..



 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 03 September 2016 - 12:15 AM #6

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) {



 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3752 posts

Posted 03 September 2016 - 05:04 AM #7

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????



 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 03 September 2016 - 12:35 PM #8

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 



 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3752 posts

Posted 06 September 2016 - 10:38 PM #9

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.