I'm trying to migrate a website but hitting a volumne check failed error at url rewrites. Apart from the duplicates issue it seems there's an issue with multistore installations when pages are set up like this
Normally this works perfectly fine for Magento 1 but in Magento 2, although the pages get migrated correctly with the respective stores selected, the rewrites cannot be created.
Moreover in the backend if you try to save the page with "All Store Views" selected you will get a warning that it conflicts with the rest of the pages.
Expected result
The rewrites get created for this use case.
Actual result
In my example the page with "All Store Views" (ID: 240) got a rewrite created with store_id = 1
and a problem was detected for url rewrite at page cms/page/view/page_id/246 - amphomepage which belongs to store_id 1 in the Magento 1 instance
Moreover if you try to edit them in the backend you cannot. If you edit page 246 and save you will get a message that it will create a duplicate rewrite so cannot be saved and to change the url key. If you edit page 240 you will get a message that it conflicts with all the other pages and that you need to change the url key.
I'm not sure why this is happening though. I can see that other pages that were setup with the same key on All store views but without a copy for store_id = 1 do not cause this issue.
Any ideas what the bug is here?
PS: it was hard to detect which was the missing url rewrite inside 700000 url rewrites. I think the migration tool should actually log these issues when they come around when the volume check fails.
I had to add some code to it in order to detect the missing link at \Migration\Step\UrlRewrite\Version191to2000::data
I'm just assuming here that in Magento 2 when you select the "All Store Views" option it's actually trying to create rewrites for all store views even if page copies exist to cover these store views so it might be a core bug as well. So if I would have
Page ID 240 -> All Store Views
Page ID 241 -> store_id = 1
Page ID 242 -> store_id = 4
all with the same url key
When saving the Page ID 240 -> All Store Views it should create a rewrite for store_id 2 and 3 and not try to create for 1 and 4 as well where it will throw an error.
Preconditions
Steps to reproduce
I'm trying to migrate a website but hitting a volumne check failed error at url rewrites. Apart from the duplicates issue it seems there's an issue with multistore installations when pages are set up like this
Normally this works perfectly fine for Magento 1 but in Magento 2, although the pages get migrated correctly with the respective stores selected, the rewrites cannot be created.
Moreover in the backend if you try to save the page with "All Store Views" selected you will get a warning that it conflicts with the rest of the pages.
Expected result
The rewrites get created for this use case.
Actual result
In my example the page with "All Store Views" (ID: 240) got a rewrite created with store_id = 1 and a problem was detected for url rewrite at page cms/page/view/page_id/246 - amphomepage which belongs to store_id 1 in the Magento 1 instance
Moreover if you try to edit them in the backend you cannot. If you edit page 246 and save you will get a message that it will create a duplicate rewrite so cannot be saved and to change the url key. If you edit page 240 you will get a message that it conflicts with all the other pages and that you need to change the url key. I'm not sure why this is happening though. I can see that other pages that were setup with the same key on
All store views
but without a copy for store_id = 1 do not cause this issue.Any ideas what the bug is here?
PS: it was hard to detect which was the missing url rewrite inside 700000 url rewrites. I think the migration tool should actually log these issues when they come around when the volume check fails.
I had to add some code to it in order to detect the missing link at
\Migration\Step\UrlRewrite\Version191to2000::data
Additional Notes
I'm just assuming here that in Magento 2 when you select the "All Store Views" option it's actually trying to create rewrites for all store views even if page copies exist to cover these store views so it might be a core bug as well. So if I would have
Page ID 240 -> All Store Views Page ID 241 -> store_id = 1 Page ID 242 -> store_id = 4 all with the same url key
When saving the Page ID 240 -> All Store Views it should create a rewrite for store_id 2 and 3 and not try to create for 1 and 4 as well where it will throw an error.