Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - 404 error in public product page

I have a Magento 1.7 web width 2 stores in different languages width a direffent domain for each store.

When I enabled products for the second store, the public product pages of the second store stopped functioning. Now are 404 error, but the first store product pages continue to perform well. All other pages work correctly.

http://www.bioaigua.es/grower-abono-de-crecimiento.html - OK

http://www.bioaigua.net/rooty-enhances-the-formation-of-roots.html - 404 error

Any idea?

like image 639
Jordi Dotras Avatar asked Jul 23 '13 12:07

Jordi Dotras


2 Answers

Go to your DB and run this SQL query:

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);

P.S. check DB name prefix if you have it!

like image 120
Nerjuz Avatar answered Oct 09 '22 18:10

Nerjuz


Go to Mage\Catalog\controllers\ProductController.php and change viewAction() actions code:

from (line 140)

} else {
     Mage::logException($e);
     $this->_forward('noRoute');
}

to

} else {
    echo "<pre>";
    var_dump($e);
    Mage::logException($e);
    //$this->_forward('noRoute');
}

Then load product view, you can see the exception variable(in my case it was missing block, so I deleted it from one of layout .xml file). After finding the reason, you must restore code of viewAction().

like image 4
Yervand Abrahamyan Avatar answered Oct 09 '22 17:10

Yervand Abrahamyan