0

I have created a testing version of my website, in the same server, but using a different domain name. Frontend and backend works ok, but product pages redirect to

404 page error

I have tried:

  • clearing cache
  • reindexing data
  • re-save products
  • cleared catalog url rewrites
  • disabling all third-party modules.
  • resetting directory permissions

Nothing worked.

Am I missing something?

  • you are facing problem in magento1? – Rakesh Donga Feb 7 at 8:03
  • yes this is magento 1.9 – zekia Feb 7 at 8:05
  • you can add this code in index.php and after check what is error magento.stackexchange.com/a/259909/68695 – Rakesh Donga Feb 7 at 8:08
  • 1
    I assume you have duplicated your database since you use another domain and this is stored in the database. Did you check the url rewrite table? Do you find your requets path there? Do the direct call of the product page catalog/product/view/id/XXX work for the product? – HelgeB Feb 7 at 13:49
  • 1
    If you don't see any exception in your exception.log, that looks like your product is not available in that store (either visibility doesn't allow it or the product is not assigned to website). If you have created a new website in the same database I'm quite sure the last option is the problem – HelgeB Feb 7 at 14:38
0

It seems that issue was caused by this error found in exception log:

cannot add or update a child row: a foreign key constraint fails (db_name.report_event, CONSTRA...”

In order to solve this, I followed instructions here:

https://www.mttr.io/blog/web-development/magento-cannot-add-or-update-a-child-row-report-event/

and run this query in my database:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.