I just found a bug concerning the url_key and reported it (http://www.magentocommerce.com/bug-tracking/issue/?issue=2983).
Maybe got the same problems and maybe my fix is fine for you too!
The text is the same as in the bug report
Imagine 2 products in the same category with the title “cellphone”. If you just save the products in the admin section, both will get the url_key “cellphone”. Same if you import products via MagentoConnect!
If you browse the shop, one product will get the url “cellphone.html” and one “cellphone-1.html” which is nearly perfect. The bug is that the field url_key of the product doesn’t get updated and so the url key is just wrong!
Problems because of that bug
- I try to export all my products and want to use the url_key field to create a navigation to the products but I can’t because I can’t trust the field!
- $_product->getUrlPath() will deliver also a not valid value (yes not the best way to create a navigation but still).
My bugfix is now to get the entity_id with SELECT entity_id FROM catalog_product_entity WHERE sku= $product[$sku] and after that the real url with SELECT value FROM catalog_product_entity_varchar WHERE $entity_id AND attribute_id=570
It is really important to fix this to be able to create links from an csv