Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Category URL gets unwanted -1 suffix - duplicate URLs
 
Tizzalicious
Member
 
Avatar
Total Posts:  42
Joined:  2011-05-28
 

Some of my categories get the suffix -1 added to their URLs. I have figured out when it happens, it\’s when another category previously used that same url (I played around with my categories a bit, so I made and deleted some).

I wanted to remove the old url rewrites, as I thought that would be the problem, but I got an error when going to the URL rewrite management. (See this problem here: http://www.magentocommerce.com/boards/viewthread/262905/) . That problem hasn\’t been solved yet, but I did manage to delete the rewrites in my database.

However, the problem is still there.

I deleted the categories that had the problem before I removed the url rewrites, but when I recreate them, I still get the name with -1 added. (My jewelry category URL gets called jewelry-1, even though in manage categories I only put \"jewelry\".)

I assume the old urls are still stored somewhere, and there can\’t be duplicate ones? Does anyone know how to fix this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Damian Culotta
Enthusiast
 
Total Posts:  878
Joined:  2008-12-10
Argentina
 

Check into System -> Index Managment.
There you’ll see an option called “Catalog URL Rewrites”.
Try to recreate that index (if you have too many products this process can take much time).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tizzalicious
Member
 
Avatar
Total Posts:  42
Joined:  2011-05-28
 

I tried the reindex before, unfortunately it didn’t help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Damian Culotta
Enthusiast
 
Total Posts:  878
Joined:  2008-12-10
Argentina
 

But if you execute the reindex process you get a successful message?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tizzalicious
Member
 
Avatar
Total Posts:  42
Joined:  2011-05-28
 

Yes, it says it was successful, but the category url on frontend still says jewelry-1.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brtsos
Jr. Member
 
Total Posts:  5
Joined:  2011-04-13
 

Hi !

I found solution on Yireo page.

Sometimes when you make changes to your products, or enable a certain extension, Magento might start to rewrite all your URLs to include a suffix “-1” or some other number. Within the URL Rewrites, Magento differentiates between System URLs and Custom URLs. If the System URLs are broken like this, you should not fix this by adding new Custom URLs.

Instead, open up phpMyAdmin, create a backup of your Magento database, and flush the Magento table core_url_rewrite (so that it becomes totally empty). Immediately afterwards, refresh the Catalog Url Rewrites under Index Management. This will regenerate all System URLs.

regards
Bartosz Sosna

 
Magento Community Magento Community
Magento Community
Magento Community
 
MattStephens
Sr. Member
 
Avatar
Total Posts:  152
Joined:  2011-07-12
United Kingdom
 

This also happens when you move categories to another location in your structure if they had already been moved.

Flushing the Core URL rewrite table isn’t really a solution as it will mean any URLs indexed in Search Engines will no longer work. Does anyone have another work around for this issue?

Cheers
Mattt

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top