-
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
Fixed issue Unable to open URL for downloadable product #19996
Fixed issue Unable to open URL for downloadable product #19996
Conversation
Hi @shikhamis11. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant 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.
Suggestions to simplify complexity?
public function getContentType()
{
$this->_getHandle();
if ($this->_linkType === self::LINK_TYPE_FILE) {
if (function_exists('mime_content_type')
&& ($contentType = mime_content_type(
$this->_workingDirectory->getAbsolutePath($this->_resourceFile)
))
) {
return $contentType;
}
return $this->_downloadableFile->getFileType($this->_resourceFile);
}
if ($this->_linkType === self::LINK_TYPE_URL) {
return (is_array($this->_handle->stat($this->_resourceFile)['type'])
? end($this->_handle->stat($this->_resourceFile)['type'])
: $this->_handle->stat($this->_resourceFile)['type']);
}
return $this->_contentType;
}
Note: if() constructions that return boolean values based on conditions, can be simplified to return the condition instead.
Hi @davidverholen, thank you for the review. |
@magento-engcom-team give me test instance |
Hi @sivaschenko. Thank you for your request. I'm working on Magento instance for you |
Hi @sivaschenko, here is your new Magento instance. |
Hi @shikhamis11 we found an issue on the PR code base, please take a look: Manual testing scenario:
"301 Moved" page is opened |
hello @sivaschenko thanks for the update |
Hi @shikhamis11 , as I can see it is showing an error ("301 Moved") currently, on this PR code base. |
@magento-engcom-team give me test instance |
Hi @sdzhepa. Thank you for your request. I'm working on Magento instance for you |
@magento-engcom-team give me test instance |
Hi @sdzhepa. Thank you for your request. I'm working on Magento instance for you |
Hi @shikhamis11 during testing the PR we discovered that original issue cannot be reproduced on the latest 2.3-develop. Can you please recheck if the issue exists on the latest code base? |
sure |
@magento-engcom-team give me 2.3-develop instance |
Hi @shikhamis11. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @shikhamis11, here is your Magento instance. |
@sivaschenko no this is not working on current 2.3-develop instance . please check url |
Sorry for confusion @shikhamis11 and thank you for the response! I rechecked and was able to reproduce it. Continuing to process the PR. |
Hi @shikhamis11, thank you for your contribution! |
Fixed issue Unable to open URL for downloadable product #18944
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Contribution checklist (*)