magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

Magento produces product category rewrites even if "Use Categories Path for Product URLs" is disabled

Open tmotyl opened this issue 4 years ago • 6 comments

Despite configuration "Use Categories Path for Product URLs" (catalog/seo/product_use_categories) is disabled Magento adds all urls of product in categories to the url rewirte table, making it unnecessary big and making indexing slower.

https://magento.stackexchange.com/questions/62999/prevent-automatic-url-rewrites-created-that-include-category-url-key-in-product

tmotyl avatar Apr 22 '20 12:04 tmotyl

We have 98 store views and our core_url_rewrite table has 7.8 million records. As you can imagine reindexing is one of the major pain points we have with Magento.

I've always wanted to try the module referenced in that StackExchange post however there are incompatibilities with a MageWorx SEO module we are currently using that also overrides some of the indexing classes.

rvelhote avatar Apr 27 '20 11:04 rvelhote

@rvelhote want to join forces? I'm working on the solution and have a prof of concept already. Are you on OpenMage discord? if not, please join https://discord.gg/vvZW5Q and we can talk I have checked the dnd module, but it did not solve the issue in all cases and have some compatibility and quality issues.

tmotyl avatar Apr 27 '20 12:04 tmotyl

@tmotyl @rvelhote When I was using Magento (4-5 years ago) I was using the following plugin to address this issue: https://github.com/mklooss/Loewenstark_UrlIndexer.

damien-biasotto avatar May 12 '20 01:05 damien-biasotto

thanks @damien-biasotto I will take a look

tmotyl avatar May 12 '20 05:05 tmotyl

Please skip Loewenstark_UrlIndexer in favor of DnD_PatchIndexUrl, it has core quality and could directly be integrated. We use that since years for nearly every Magento1 project that we have.

leissbua avatar Jan 18 '24 15:01 leissbua

@leissbua Have you checkout this draft PR #3267?

kiatng avatar Jan 19 '24 01:01 kiatng