OpenMage / magento-lts

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
https://www.openmage.org
Open Software License 3.0
865 stars 436 forks source link

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

Open tmotyl opened 4 years ago

tmotyl commented 4 years ago

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

rvelhote commented 4 years ago

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.

tmotyl commented 4 years ago

@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.

damien-biasotto commented 4 years ago

@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.

tmotyl commented 4 years ago

thanks @damien-biasotto I will take a look

leissbua commented 8 months ago

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.

kiatng commented 8 months ago

@leissbua Have you checkout this draft PR #3267?