-
Notifications
You must be signed in to change notification settings - Fork 9.4k
issue #13497 - Method getUrl in Magento\Catalog\Model\Product\Attribu… #13498
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
issue #13497 - Method getUrl in Magento\Catalog\Model\Product\Attribu… #13498
Conversation
->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) | ||
. 'catalog/product/' . $image; | ||
->getBaseUrl(UrlInterface::URL_TYPE_MEDIA) | ||
. 'catalog/product' . $image; |
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.
As $image
may come from various sources there is no guarantee it contains leading slash.
Please
- change logic to
. 'catalog/product/' . ltrim($image, '/')
instead - create a separate test case to assure there is no slash duplication
- as always, do an amend commit and force push
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.
ok, thank you
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.
@igortregub changes look good now, please squash changes into single commit and force push.
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.
@orlangur, done
…te\Frontend returns image url with double slash
@igortregub thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
Accepted Public Pull Requests: - magento#13498: issue magento#13497 - Method getUrl in Magento\Catalog\Model\Product\Attribu� (by @igortregub) - magento#13494: Fixing of Problem with updating stock item qty and stock status (by @nuzil) - magento#13132: Update the Emogrifier dependency to ^2.0.0 (by @oliverklee) Fixed store view switcher issues when changing store view on product and category pages.
Preconditions
Steps to reproduce
Fixed Issues
Expected result
Actual result