303.473.4400 / Toll Free: 888.772.0777
Select Page

Magento Enterprise Home Page Error 404 Bug Solved - Magento Consulting - Customer ParadigmFrom the (Linux) Desktop of a Certified Magento Developer:

Magento Enterprise Error 404 for Home Page (Solved!)

Are you having difficulty with a Magento Enterprise site’s home page showing a 404 error? We recently were doing an upgrade, and found a (bug) in the Magento Enterprise code base.

We hesitate to say that it’s a serious bug, because if a Magento Enterprise site is set up correctly, then this shouldn’t happen. But out in the wild, with real customer data that might have been automatically imported (or carried through during an upgrade), we found this crazy issue.

Here’s the scoop:

Since Magento Enterprise 1.13.0.0, if a product is in the database with no name (an empty string or NULL in the value column of catalog_product_entity_url_key),
it can create a 404 homepage bug when Product URL Rewrites reindexes. This happens even if the product’s status is Disabled.

When you reindex the Product URL Rewrites, it puts a row in enterprise_url_rewrite table in which the request_path is an empty string.

Magento Enterprise doesn’t seem to like this, and then throws an error 404 for the home page in versions 1.13.0.0 – 1.14.1.0.

How to check:

select * from enterprise_url_rewrite WHERE request_path = ”;
| url_rewrite_id | request_path | target_path                  |
| 32165          |              | catalog/product/view/id/1234 |

| is_system | guid   | identifier | inc | value_id | store_id | entity_type |
| 1         | 32b5ce |            | 1   | 91012    | 0        |           3 |

The short fix is to log in to the mysql db and run this command:

DELETE FROM enterprise_url_rewrite WHERE request_path = ”;

But if the product remains in the db, the next time you reindex, you’ll have the same problem. You need to track down the product, give it a name, description and price, and re-save it.

Here’s how to track it down in the db:

select * from catalog_product_entity_url_key where value = ”;
+———-+—————-+————–+———-+———–+——-+
| value_id | entity_type_id | attribute_id | store_id | entity_id | value |
+———-+—————-+————–+———-+———–+——-+
| 91012    | 4              | 86           | 0        | 1234      |       |
+———-+—————-+————–+———-+———–+——-+

Then:

  • Use the entity_id from above to get the sku
  • Then, find the sku in the Magento Admin->Catalog->Manage Products, and give it a name, description and price, and re-save it.

select * from catalog_product_entity where entity_id = 3965;
+———–+—————-+——————+———+————+————-+——————+———————+———————+
| entity_id | entity_type_id | attribute_set_id | type_id | sku | has_options | required_options | created_at | updated_at |
+———–+—————-+——————+———+————+————-+——————+———————+———————+
| 1234      | 4              | 38               | virtual | 15BEDQ1    | 0           | 0                | 2012-03-01 15:22:54    | 2014-06-21 00:10:02 |
+———–+—————-+——————+———+————+————-+——————+———————+———————+

 

Need Help With Magento Enterprise? We Can Help!

Are you looking for a company who can help you fix your Magento eCommerce shopping cart system? If you need reliable programmers with experience, Customer Paradigm’s team of expert Magento programmers may be a great fit. Try us out! Or Call 303.473.4400 today!

 

Free, No Obligation Consultation About Magento Programming:

Call Today! 303.473.4400 Toll Free 888.772.0777 Or Click Here To Have A Real Person Contact You Now >>

 

Pin It on Pinterest

Share This