Skip to main content
2 of 3
added 4 characters in body

Magento 2 - Magento 1 migration : all product links are error 404

I am busy with another migration of Magento 1 to Magento 2.3.5,

I have managed to get my categories working, all categories show products associated to them (used Iazel_RegenProductUrl module for this.

However, every single product (simple/configurable/etc) returns with an error 404 page of Magento 2.

I am aware that indexer:reindex _in Magento 2 does not recreate URL rewrites` according to other resources found here on StackOverflow, there were also suggestions to run a 3rd party url rewrite regen module.

I have used the following modules:

Iazel_RegenProductUrl
OlegKoval_RegenerateUrlRewrites

First off, I decided to drop OlegKoval_RegenerateUrlRewrites as an option. 22000 products would take hours with this module. It takes around 15 minutes on my dev machine to generate 1500 product SKUs and their URLs, so that is absolutely no solution to attempt further.

Running bin/magento regenerate:product:url command that was added by Iazel_RegenProductUrl takes around 5 minutes to generate ~103000 rewrites (around 4+ each per product, based on categories).

One product example:

SELECT * FROM url_rewrite ur 
INNER JOIN catalog_url_rewrite_product_category curpc 
ON ur.url_rewrite_id = curpc.url_rewrite_id
WHERE entity_type NOT IN ('category')
AND entity_id = 409398;

Product with entity ID 409398

I need some assistance with someone that can compare data with their database, or advise which queries to run to verify data consistency.

  • The store_id here is ID 1, I also have a store id 0 inside store table (and store website). I don't know how to make sure they are configures correctly ---- this is from the Migration Tool import result.

Does the store_id here have an impact on why the products are showing error 404?

This reason I am asking: it does not make sense when I take the working category URLs into account:

SELECT DISTINCT(store_id) FROM url_rewrite ur;

Only returns 1. The whole url_rewrite table only has store_id 1.

Please help me to assist in resolving / compare database tables.