-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix URL generation for new store when it created with setup:config:import #30023
Fix URL generation for new store when it created with setup:config:import #30023
Conversation
Hi @ihor-sviziev. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, 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, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
@magento create issue |
e1e67b1
to
9e7568b
Compare
@magento run all tests |
0843a14
to
4dae97d
Compare
@magento run Static Tests |
There some failures during setup:instal... need to fix it. |
@magento run all tests |
@sidolov is there any instructions how to run & debug setup-integration tests? Also I checked - installing magento via |
Ok... For now just updated test with some debug code in order to see what exact message error was there. @magento run Integration Tests |
9b45e3c
to
4f49bba
Compare
@magento run Integration Tests |
4f49bba
to
d1ceaf9
Compare
@magento run Integration Tests |
@ihor-sviziev do not forget about the extensions like MSI and ASI since the tests build contains them. |
@sidolov as we discussed - it's not clear why this test fails, it fails for me even on 2.4-develop, also no instructions how to build them. I'll keep this PR open only for internal investigation, I don't want to spend more time on fixing it, till we'll have some working instruction. Waiting for 2 hours for integration test results on CI is time wasting. |
Hey, @ihor-sviziev. Nice that you decided to fix it. Thanks. |
@Stepa4man basically right now in the admin area declared plugins for generating url rewrites, so we have 2 options:
magento2/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/di.xml Lines 9 to 14 in a31f4a3
I went with 1st option because it was already used in some other cli commands and it seemed to me easier, also adding not needed plugin to the front end, web api, etc will just a bit slow down them due to additional inheritance and running additional code for managing plugins, etc. If you have any other idea - let me know. TBH I first time see that setup integration tests are failing at al. I found that we don’t have any instruction how to run them locally, tried to do similar to integration - they’re failing for me even on 2.4-develop branch. Running these tests on magento CI takes almost 2 hours (last run 1 h 55m), it’s crazy long time and not suitable for fixing the reason why it fails |
@magento run Integration Tests |
1 similar comment
@magento run Integration Tests |
65e47a1
to
0d6c7bc
Compare
Failing functional looks not related to changes from my PR. All other failures I already fixed |
Emulate adminhtml area where url rewrites are created
ddab995
to
075ddb4
Compare
@magento run all tests |
Hi @Stepa4man, thank you for the review.
|
Hi @lbajsarowicz, thank you for the review. |
✔️ QA Passed Manual testing scenario:
Before: ✖️ On second store view URL rewrites were generated only on dev env (it was created via admin), but they weren't generated on production env. After: ✔️ On second store view on dev and production environments were generated URL rewrites for categories and products. |
…tup:config:import #30023
Hi @ihor-sviziev, thank you for your contribution! |
Description (*)
Emulate adminhtml area where url rewrites are created
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
php bin/magento setup:upgrade --keep-generated
on production env)php bin/magento setup:upgrade --keep-generated
on production env)Expected result:
On second store view on dev and production environments were generated URL rewrites for categories and products.
Actual result:
On second store view URL rewrites were generated only on dev env (it was created via admin), but they weren't generated on production env (it was created during
setup:upgrade
command)Questions or comments
My investigation shown that only in adminhtml area URL rewrites are generated when store view is created:
magento2/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/di.xml
Lines 9 to 14 in a31f4a3
Contribution checklist (*)
Resolved issues: