-
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
Remove Environment emulation for better performance on sitemap generation #21542
Remove Environment emulation for better performance on sitemap generation #21542
Conversation
Hi @Nazar65. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
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.
Seems to be a reworked version of #16813 and https://github.com/magento/magento2/pull/19598/files. Could you please remove unneeded dependencies then?
@sidolov @sivaschenko would be really nice if you change the logic as you reviewed older PR.
@orlangur Thanks, for some reason i forgot for this. |
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 @Nazar65 thanks for the pull request. The functionality looks fine, however, I don't think we can remove the arguments from construction at this time for backward compatibility purpose. Can you please preserve constructor signatures
@sivaschenko not really. We cannot change released class signature (@Nazar65 please revert those) but we are free to change the 2.3.2 targeted PR. |
Hi @sivaschenko, thank you for the review. |
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.
@Nazar65 unneeded dependency introduced in https://github.com/magento/magento2/pull/19598/files must be removed.
Please squash into single commit after change.
@orlangur ok |
@orlangur done ✔️ |
@orlangur I see what you mean, yes, those changes are not included in 2.3.1 👍 |
Hi @orlangur, thank you for the review. |
Judging by the manual testing steps this is currently using English as a language only. Emulation also sets different locales, reloads translations and switches the area. This all seems to be removed in this PR. |
@magento-engcom-team give me test instance |
Hi @Nazar65. Thank you for your request. I'm working on Magento instance for you |
Hi @Nazar65, here is your new Magento instance. |
@fooman No, everything works as expected from manual steps, and this works perfect on 2.2.7 without emulation. |
✔️ QA Passed |
@sidolov Yes, initial case not reproducing with provided changes |
Hi @Nazar65, thank you for your contribution! |
…itemap generation #21542
Description (*)
We dont need to use Environment emulation we just need to add in
magento2/app/code/Magento/Sitemap/Model/ResourceModel/Catalog/Product.php
Line 390 in a5330a7
$this->_storeManager->setCurrentStore($storeId);
Fixed Issues (if relevant)
Manual testing scenarios (*)
Website URL 1: https://my_website.com
Website URL 2: https://my_website.co.uk
Got to Stores->Configuration->Catalog->XML Sitemap->General Settings:
2.Set to Enable, Start Time, Frequency Daily etc...
TIP: I've set to a few minutes before checking!
Website 1 should have images url referencing Website 1 domain = https://my_website.com
1.2 - Same steps for manual generating sitemap
Contribution checklist (*)