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

Weird URL behavior in sample data ’configurable products’
 
stellar678
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2008-07-29
San Francisco, CA
 

Hi all - I pulled this out from another post I created earlier, because the topic has in fact changed.

I recently installed 1.1.3 along with the sample data and I’m getting some buggy-seeming behavior with the URLs of the sample products on the front end.

Every ‘configurable product’ ends up having a dash and a number added to the end of its URL Key. (e.g. “product-name-1.html” instead of “product-name.html") To test what was going on, I decided to play around with the URL Key for one of these products and see what the result was. In Admin->Catalog->Manage Products->CN Clogs Beach/Garden Clog->URL Key I tried the following settings:

URL Key set in Admin             Result in front end
---------------------------------------------------------
boop                             boop.html
cn
-clogs-beach-garden-clog       cn-clogs-beach-garden-clog-1.html
cn
-clogs-beach-garden-clog-1     cn-clogs-beach-garden-clog-1.html
cn
-clogs-beach-garden-clog-2     cn-clogs-beach-garden-clog-11.html (not a typo)
cn-clogs-beach-garden-clog-5     cn-clogs-beach-garden-clog-11.html
cn
-clogs-beach-garden-clog-200   cn-clogs-beach-garden-clog-200.html

One plausible explanation was that there was another product with the same URL key, but I eliminated that possibility by noting that “cn-clogs-beach-garden-clog.html” returns a 404 not found error on the front end. Also, some of the results from above wouldn’t make much sense as a solution to having multiple products with the same URL key. (-2 or -5 converted to -11?)

Any ideas what’s going on? Has anyone else experienced this issue?

Thanks for any insight you can offer…

 
Magento Community Magento Community
Magento Community
Magento Community
 
stellar678
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2008-07-29
San Francisco, CA
 

Update:

I halfway discovered the solution to this problem:

If you look at any configurable product in the sample data, and at each of the standard products that make up that configurable product - they all have the same URL key set. It appears that the products with a lower-numbered product id (Which I presume this means they were added earlier.) are claiming the URL, and the ones with higher numbers are getting stuck with URL + -1, -2, etc…

This behavior seems a little bizarre for products that are set to not be visible (why would they get to claim URL space?) but perhaps in another scope somewhere else in Magento it makes sense.

So does this derive from a mistake I made installing the sample data? Is it a known bug in the data? Any ideas why it’s not possible to simply delete the URL keys on the non-visible products?

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

Does Magento save some URL key history? I know Wordpress saves old URLs so it can redirect them to the new one.
Maybe it is affected by the cache too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
afmaury
Sr. Member
 
Total Posts:  100
Joined:  2008-01-05
 

I see that this thread is very old, but does anyone have a solution. When I export product urls for the simple products that are part of a configurable product, the urls are not found.

 
Magento Community Magento Community
Magento Community
Magento Community
 
grazzt
Sr. Member
 
Total Posts:  106
Joined:  2010-02-28
 

I need this too. I have to export non visible associated simple products with the same url with the configurable. It seems to be a database issue, something that doesn’t let duplicate urls to be created.

 
Magento Community Magento Community
Magento Community
Magento Community
 
afmaury
Sr. Member
 
Total Posts:  100
Joined:  2008-01-05
 

@grazzt - Check out this thread on redirecting the simple products to the configurable products. I posted one method, but there’s a better one a little ways down the thread.

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