-
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
Upload fails in image uploader due to unrequired dependency #24455
Upload fails in image uploader due to unrequired dependency #24455
Conversation
Hi @posttechguy. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
@buskamuza I have signed the Contributor License Agreement though it says still pending, my icon is appearing in the PR, (i saw this in some of the documentation), not sure what the issue is |
Hi @posttechguy, If you’ll do everything correct - near commit message you’ll have your github account avatar and it will become clickable |
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 would suggest to fix this in 2.4 because adding an ext dependency can break deployments w/o this extension (they'll have to update the environment to perform upgrade).
This can be documented for now as a recommended extension to be installed.
The issue should not be critical as it's possible to fix it by installing corresponding extension.
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 @posttechguy. Thanks for collaboration. Please take a look comments in the review.
Actually this dependency we have in 2.3, but it’s not defined anywhere. Otherwise we wouldn’t have this issue. |
It's a soft dependency now:
Yes, files w/o extensions won't be processed correctly, but files w/ extension will be fine. |
@buskamuza, ah yes, you’re right, so let’s add it to release line 2.4 due to backward compatibility issues |
@buskamuza: no it's not a soft dependency. Most of the time in the code it is checked if the function exists, but at one occurrence it's not being checked: So either we need to add the dependency to the cms module (or framework?) in 2.3.x, or either that call should also be wrapped in a |
@hostep , good catch. |
Tnx for feedback @buskamuza! @posttechguy: are you willing to update the PR with the suggested change? |
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.
Please review comment from @buskamuza and adjust PR accordingly
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 @posttechguy,
Could you review following comment #24455 (comment) and adjust your PR accordingly?
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.
Please review
Hi @posttechguy,
Maybe you missed to push them? |
Hi @posttechguy, |
@posttechguy I am closing this PR now due to inactivity. |
Hi @posttechguy, thank you for your contribution! |
Description (*)
In lib/internal/Magento/Framework/File/Mime.php:97 fails because mime_content_type function does not exist, which php extension fileinfo adds
Thus when the temp uploaded file, i.e., '/tmp/sdfds5we23e', which has no extension, is trying to get the extension of the file via pathinfo function in getFileExtension(), it fails to verify against the validTypes array because the extension does not exist.
@magento give me 2.3-develop instance
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)