Strange error - 'en' added on seo urls for pages

I am getting a strange error when I add a page using the content tab. When I add the SEO url and save, the letters ‘en’ are being added automatically at the end of the URLs as shown in the attachment.



I have the ‘Use single URL for all languages’ option enabled in the SEO settings. The database that I have is an upgaraded one all the way from 1.3.5-SP4 till 2.1.2. It surely looks like even after deleting the pages, the SEO urls are not being deleted and hence the ‘en’ is being added onto the URL by CS-cart to avoid duplicate urls. Is there a way I can come over this problem. May be something like deleting the pages from the database so that no trace remains of the URLs. Please let me know your opinions on solving this issue.

seo-en.jpg

That can happen when you already have a page named the same as the one that it added the “en” to. Check to make sure another page isn’t already named the same.

i had the same problem…and i still have it.

script adds a “-en” when it finds a dublicate product/page/etc…

even that i had erased that dublicated product, it still adds a “-en” at seo name



for example:

1.create product with seo name “cs-bugs-found.html”

2.delete that product

3.create same product again. the script will add a “-en” on the last thinking that the previous product is still there, (like order id): “cs-bugs-found-en.html”



p.s. i believe you disable the “add language to the seo name…” at the seo addon??

untick the “show languages in the url” box in …addons… seo



be aware when doing this of how many pages google will give a 404 for if it crawled them

JOhn

I had the “show languages in the url” unticked by default but still the bug remains.



Yes, the reason is when you already have a page named the same as the one then “en” is added. But how do I delete the pages from the database so that no trace remains of them?? :confused: :confused: Also I see this bug only in upgraded databases and not fresh databases.

There should be a fn_set_hook() in the fn_delete_page() function in core/fn.cms.php.



The SEO addon should then catch that hook and delete the entry.



That’s the “why”.



So it takes 2 changes.

  1. to add an fn_set_hook(‘delete_page’, $page_id) in fn_delete_page()
  2. Add a hook for delete_page in the SEO addon.



    Suggest you report it as a bug via bugtracker. You can include my description if you like.

this seems to be a bug so i opened i bug ticket here



[url]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=2444[/url]

[quote name=‘elk’]this seems to be a bug so i opened i bug ticket here



[url]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=2444[/url][/QUOTE]



Thanks a ton.:stuck_out_tongue: :stuck_out_tongue:

Don't know if this issue ticket was solved because link is not working.



I'm was in same situation, about one year after this post was created.



What I did:

I have disabled seo add-on. In edit I have Use single URL for all languages.

In sql I have emptied table cscart_seo_names. Content is filled automatic.

Enabled seo add-on. And thing with one seo name per language is working.

After that you will have only one language in cscart_seo_names, lang_code column.



Maybe this will be useful for somebody.

[font=verdana, geneva, sans-serif]I believe we require an add-on that can handle “products” / “categories” / “content” changes in names and automatically create a 301 redirect when a page's SEO name changes. It would also have to stop adding hundred's of suffixes to categories (/category-en-1-2-3-4-5-6/)![/font]



[font=verdana,geneva,sans-serif]So if we change it from “page1” then next time Google comes to look for /page1/ it receives a 404! This is not good![/font]



[font=verdana,geneva,sans-serif]We need something the links “page1” with the new SEO name (no matter how many time changed) >> “products-services”).[/font]



[font=verdana,geneva,sans-serif]So it then forwards all queries to http://domain.com/page1/ >> http://domain.com/products-services/[/font]



[font=verdana,geneva,sans-serif]But an add-on that could manage and retain a history of hundreds of changes (during numerous CSV imports etc) could become quite heavy if not coded correctly. Also if a new page was created that has the SEO name for an existing 301 redirect >> other page, then it should cancel that 301 Redirect (for that incoming URL) and then point to the new resource (&page_id=10)…[/font]



[font=verdana,geneva,sans-serif]Is anyone aware of something that can do this, or modifications to CS-Cart that can achieve a “logical” and “methodical” approach to SEO?[/font]



[font=verdana,geneva,sans-serif]Cheers![/font]