问题
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?
回答1:
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!
回答2:
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()
.
回答3:
Go to catalog > URL Rewrite Management and search the url you are having problems.
delete the rule that it is generating the problem
来源:https://stackoverflow.com/questions/17809796/magento-404-error-in-public-product-page