-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix: #26973 Fatal error when Product Image size is not defined #26974
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: #26973 Fatal error when Product Image size is not defined #26974
Conversation
Hi @lbajsarowicz. Thank you for your contribution
For more details, please, review the Magento Contributor Guide 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.
Hi @lbajsarowicz, thank you for your contribution. Not sure that such fix will give us the expected result, and namely to display the image (placeholder).
The image won't be showing as it doesn't have any width and height.
Could you please correct me if I'm wrong?
Thank you.
Pull Request state was updated. Re-review required.
@eduard13 The problem I solved is related to Fatal Error when no image is available in the specified size. I verified that the only place where <span class="product-image-wrapper"
style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;"> which sounds ridiculous for me. I don't know what was the purpose of returning <image id="product_page_image_large" type="image"/> For me - I should return |
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.
I got your point, thanks.
So basically, my understanding is as far as you don't define the image sizes, you can't expect that the image would have some.
Hi @eduard13, thank you for the review.
|
✔️ QA Passed |
Hi @lbajsarowicz, thank you for your contribution! |
Description (*)
When product image parameters does not contain
image_width
andimage_height
, call togetRatio
ends up with fatal error. Fixed by fallback to0
for value not set.Related Pull Requests
N/A
Fixed Issues (if relevant)
Manual testing scenarios (*)
N/A - Covered with Unit Test
Questions or comments
Support
Solving this issue is supported by Mediotype
Contribution checklist (*)