#15588 Fixed incorrect image urls in multistore xml sitemap#15689
#15588 Fixed incorrect image urls in multistore xml sitemap#15689magento-engcom-team merged 7 commits intomagento:2.2-developfrom
Conversation
Added the appEmulation to get the correct image Url for the generated sitemaps. Context had incorrect Url data.
48 | ERROR | [x] Opening parenthesis of a multi-line function call must be the last content on the line
Change for travisCI
|
Might be smart to wrap this in a |
|
@StevenGuapaBV thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
| true | ||
| ); | ||
| $sitemap->generateXml(); | ||
| $this->appEmulation->stopEnvironmentEmulation(); |
There was a problem hiding this comment.
As mentioned by @JeroenVanLeusden I think it would be a good idea to make sure we are stopping this emulation in all cases including exception cases. #15689 (comment)
placed the stop Emulation in a finally. Now it will always be executed.
|
Hi @dmanners and @JeroenVanLeusden. I changed the logic and put the stop in a finally. Is that okay as well? Seems to make more sense than a try catch in a try catch block. A finally will always be executed and the stop emulation does not throw an exception of its own. |
|
Hi @StevenGuapaBV. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
|
I made the forwardport for the 2.3 release line via the porting tool. This should be done now. |
Description
Added the appEmulation to get the correct image Url for the generated sitemaps. This was needed because the catalog image helper context had incorrect Url data.
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist