Skip to content

Fix #20229-Fatal error on product-compare page when attributes not configured #20231

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

Conversation

vivekkumarcedcoss
Copy link
Contributor

@vivekkumarcedcoss vivekkumarcedcoss commented Jan 12, 2019

Description (*)

The productAttribute expects second parameter to a string which was failed when $block->getProductAttributeValue($item, $attribute) returns object due to empty value of attribute.
Added a check of is_string since it expect second param to a string.

Update list.phtml for issue #20229

Fixed Issues (if relevant)

1.Issue: #20229
2. ...

Manual testing scenarios (*)

  1. ...
  2. ...

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jan 12, 2019

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @vivekkumarcedcoss. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@irajneeshgupta irajneeshgupta changed the title Update list.phtml for issue #20229 Fix #20229-Fatal error on product-compare page when attributes not configured Jan 12, 2019
@vivekkumarcedcoss vivekkumarcedcoss force-pushed the vivekkumarcedcoss-issue-20229 branch from 2125e79 to f18076b Compare January 14, 2019 10:09
@vivekkumarcedcoss vivekkumarcedcoss force-pushed the vivekkumarcedcoss-issue-20229 branch from f18076b to db0e8b2 Compare January 15, 2019 11:42
@irajneeshgupta irajneeshgupta requested a review from nuzil January 16, 2019 05:30
@magento-engcom-team
Copy link
Contributor

Hi @aleron75, thank you for the review.
ENGCOM-3946 has been created to process this Pull Request

@ghost
Copy link

ghost commented Jan 26, 2019

Hi @vivekkumarcedcoss, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

magento-engcom-team pushed a commit that referenced this pull request Jan 26, 2019
@magento-engcom-team
Copy link
Contributor

Hi @vivekkumarcedcoss. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

@Brengineer
Copy link

Note that this solution changes existing functionality: For non-configured attributes, instead of echoing "No" or "N/A" as it was before, the output will now simply be blank. In order to retain current functionality, instead of checking for is_string, the \Magento\Framework\Phrase object should be cast as a string. (Although this is not necessarily a problem, I thought it should be mentioned.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants