magento2-regenerate_url_rewrites
magento2-regenerate_url_rewrites copied to clipboard
Url_Key not regenerated for child categories
Describe the bug
When running bin/magento ok:urlrewrites:regenerate --store-id=6 --category-id=15 --no-reindex
It does not regenerate child categories url_keys but just the parent category (in my case 15)
Expected behavior It should regenerate url_key for all child categories
To Reproduce
Run bin/magento ok:urlrewrites:regenerate --store-id=6 --category-id=15 --no-reindex
Additional context Here I do not understand why the level is 2 and not ['gt' => '2']
https://github.com/olegkoval/magento2-regenerate_url_rewrites/blob/master/Model/RegenerateCategoryRewrites.php#LL259C7-L259C7
I am having the same issue. It seems only the top level categories are being generated but not the child categories. I am using the latest version of the module and magento 2.4.6-p2
I agree. Also, I think there's a ->setStoreId($storeId)
missing in _getCategoriesCollection
the same for url_path it is generated only for the top-level categories it should also generate it for all children