-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix Url Rewrite not generated for stores that have different url key and adds the deprecated message to CategoryBasedProductRewriteGenerator class #36360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.4-develop
Are you sure you want to change the base?
Conversation
…since commit #c7d6324
Hi @Viper9x. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento give me test instance |
Hi @Viper9x. Thank you for your request. I'm working on Magento instance for you. |
Hi @Viper9x, here is your Magento Instance: https://4c5ba85ec3150f4b40231166a53b3890.instances.magento-community.engineering |
@magento give me 2.4-develop instance |
Hi @Viper9x. Thank you for your request. I'm working on Magento instance for you. |
Hi @Viper9x, here is your Magento Instance: https://fa2076dcece38eafa08dd73ecbc9f2e4.instances.magento-community.engineering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Viper9x. Thanks for you work.
Removing of the class is backward incomparable change and should be approved by architects. I believe that use of @deprecate
message more useful for fast delivery.
You mentioned c7d6324 that replace object manager usage with injection to constructor of \Magento\CatalogUrlRewrite\Model\CategoryProductUrlPathGenerator
. It's not \Magento\CatalogUrlRewrite\Model\CategoryBasedProductRewriteGenerator
…dundant since commit #c7d6324" This reverts commit d84fded.
Hi @Den4ik. Do you think adding Thanks for your support. |
…res-that-have-different-url-key
Magento\CatalogUrlRewrite\Model\CategoryBasedProductRewriteGenerator is no longer used after the change in commit c7d6324
@Viper9x: it looks like a commit made it in the 2.4-develop branch recently by the core team: e46f719 I have the feeling it might solve the same issue you are trying to solve, could you investigate that? Thanks! 🙂 |
@hostep: Thanks for let me know about the update related to my PR. I've investigated and tested for sure. The commit e46f719 resolve related issue but not the issue I'm trying to solve. Detail:
I have been updated my PR with the lastest changes from Thanks Pieter Hoste |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@Viper9x Thanks for update. Could you please check failed Unit and Static tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Integration Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
…res-that-have-different-url-key
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
…te-not-generated-for-stores-that-have-different-url-key
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
2 similar comments
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run WebAPI Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
I have magento 2.4.5 and magento 2.4.6. When I update the url key of a category that has subcategories the url key is not updated in the frontend, although it is saved in the category settings. Also in url rewrites the new url is not visible at all. Could this be related to the issue you try to solve here? |
@cptX I don't have time to check that issue, could you apply the patch for this pull request to see if it resolves your issue?
|
@Viper9x I have the setting "Use Categories Path for Product URLs" to "No". My problem is only with the category url rewrites. Will this patch help this? I see that the above modifications affect product url rewrites not categories. |
@Viper9x Unfortunately this patch didn't solve my problem. I'm still unable to access my second store view categories. Rewrite URL is visible in the configuration (it is indeed generated) but not working. Browser says "The page isn’t redirecting properly". As I said I have the setting "Use Categories Path for Product URLs" to "No". UPDATE: my issue was caused by the module https://github.com/alex-79/magento2-hide-default-store-code-from-url |
Hello @TuVanDev , Thanks for the contributions! Please resolve the conflict so we can proceed with this PR. Thanks. |
Closing this PR since it has not been updated in a while. Please feel free to reopen if needed. |
Hey @engcom-Dash, |
Hi @TuVanDev. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@TuVanDev PR reopened. Please resolve conflict. |
…res-that-have-different-url-key
@Den4ik @engcom-Dash I have resolved the merge conflict. Please review the changes. |
Description (*)
This pull request includes fixes for #36295 and adds the deprecated message to
Magento\CatalogUrlRewrite\Model\CategoryBasedProductRewriteGenerator
class due to it is no longer used anywhere after the change in commit c7d6324 (Magento 2.2.0) which\Magento\CatalogUrlRewrite\Model\CategoryProductUrlPathGenerator
was introduced to replaceMagento\CatalogUrlRewrite\Model\CategoryBasedProductRewriteGenerator
.Fixes Url rewrite not generated for newly assigned category #36295
Fix another related issue to Url rewrite not generated for newly assigned category #36295: URL Rewrite not generated for stores that have different URL key when updating category products/product in the
store
scope (changing product's categories under another store)Add the @deprecated tag to the
Magento\CatalogUrlRewrite\Model\CategoryBasedProductRewriteGenerator
class and indicate that theMagento\CatalogUrlRewrite\Model\CategoryProductUrlPathGenerator
class should be used.Assumption:
Behavior:
Updating (add/remove) product categories for product A in one of the below scopes:
Expected result: Url rewrite regenerate for both store view 1 and store view 2.
Actually result: Url rewrite only generates for store view 1 but does not regenerate for store view 2.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)