-
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
GD2 not working in WYSIWYG #246
Comments
After almost 2 weeks I can confirm the errors stopped and the WYSIWYG is working as expected (it wasn't before this fix) I can go ahead and convert this into a pull request but it feels way too hacky for me. Maybe I could add a check for allow_url_fopen ? Is there any valid case that I am not considering where the image won't be available in the local filesystem and therefore it would make sense work around allow_url_fopen using cURL? |
@barbazul , since we usually consider images as those stored on the server, are you talking about images stored somewhere on external resources? We are trying to understand the case that would require handling images in the way you suggest. Could you please provide a real life example? |
@verklov The code is handling images as external resources even when that is not the case. That is my point, it usually isn't the case. The most logical way to handle local files is to open them using the filesystem and not an external URL, that's why I am replacing the BaseUrl for the BaseDir. |
@barbazul , the team will investigate on this issue. We will update you once the analysis is complete. |
I had to apply this fix to get the wysiwyg working. It is now working as expected. |
@barbazul, the team reported that this issue refers to Magento 1.x rather than Magento 2. If this is true, please report this issue to the Magento 1.x bug tracker (http://www.magentocommerce.com/bug-tracking). Make sure you are logged in to magentocommerce.com prior to following the URL in brackets. |
We are closing this issue as not relevant for Magento 2. Please report the issue you have found to the Magento 1 bug tracker. |
[FearlessKiwis] Added Bundle Product to Catalog Product Data Object
Hi @barbazul. Thank you for your report.
The fix will be available with the upcoming 2.4.1 release. |
I am getting hundreds of daily emails from different websites I manage with the error "
Unsupported image format."
The error is triggered every time a CMS page or block is edited in the admin
The root of the problem is the Gd2 adapter calling getimagesize() on an "http://" wrapper in an environment where allow_url_fopen is false (as it is for most shared hostings).
getimagesize() logs an error and returns false, then _fileType does not get set which leads to an exception in line 150 of Varien/Image/Adapter/Gd2.php
A possible solution mentioned in the forums is to download the image using cURL. But I don't think accessing the image via http:// makes sense for most cases, since the images are usually located in the media/wysiwyg/ directory within the server.
I tried changing
Mage_Adminhtml_Cms_WysiwygController
to remove the URL part and it seems to work fine, but I'd have to make more tests.The text was updated successfully, but these errors were encountered: