Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento "catalog/product/view" url returns 404

I'm supporting a magento web site. The problem is that product view urls e.g. [link] http://localhost/magento/catalog/product/view/id/23 always return 404.

The category view url e.g. [link] http://localhost/magento/catalog/category/view/id/4 is working fine.

Should I investigate something in code? or in database?

Thanks

like image 496
Kostas Papakonstantinou Avatar asked Apr 18 '11 01:04

Kostas Papakonstantinou


2 Answers

1) Try re-indexing data:-

  • Login to admin panel
  • Go to System -> Index Management
  • Select All
  • Reindex

2) Edit the product and see if the following settings are done:-

  • General -> Status = Enabled
  • General -> Visibility = "Catalog, Search" or "Catalog"
  • Inventory -> Stock Availability = In Stock
  • Websites -> "Main Website" is checked

3) Refresh the Cache (System -> Cache Management)

like image 142
Mukesh Chapagain Avatar answered Nov 13 '22 20:11

Mukesh Chapagain


I had a similar problem after having the "reports" tables in database emptied of their data.

I found a solution on this page, which worked for me: Magento - 404 error in public product page

The SQL that person provided, fixed the problem in my case:

INSERT INTO report_event_types(event_type_id,event_name,customer_login) VALUES 
(1, 'catalog_product_view', 1), (2, 'sendfriend_product', 1), (3, 'catalog_product_compare_add_product', 1), (4, 'checkout_cart_add_product', 1), (5, 'wishlist_add_product', 1), (6, 'wishlist_share', 1);
like image 1
Gavin G Avatar answered Nov 13 '22 19:11

Gavin G