Skip to content
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: Method chaining broken Module_Catalog Product Collection #24973

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

mahesh-rajawat
Copy link
Member

@mahesh-rajawat mahesh-rajawat commented Oct 11, 2019

Fixed Issue: #24964

Description (*)

Fixed issue in this PR: Method chaining broken by refactor in Module_Catalog Product Collection

Fixed Issues (if relevant)

  1. Method chaining broken by refactor in Module_Catalog Product Collection #24964

Manual testing scenarios (*)

  1. Create an instance of \Magento\Catalog\Model\ResourceModel\Product\Collection
  2. Call the method addAttributeToFilter with attribute is_saleable
  3. Chain the method addAttributeToFilter with any other attribute to chain the function.
  4. Chaining is working properly.

Questions or comments

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 are green)

@m2-assistant
Copy link

m2-assistant bot commented Oct 11, 2019

Hi @maheshWebkul721. 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

Copy link

@omegades omegades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi maheshWebkul721,

Thank you for the fix, however this does not fix my issues with Porto on 2.3.3 :)

2019/10/11 11:15:47 [error] 1567#1567: *240 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Model\ResourceModel\Product\Collection::addIsSaleableAttributeToFilter() must b$
Stack trace:
#0 /var/www/domain.com/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php(1582): Magento\Catalog\Model\ResourceModel\Product\Collection->addIsSaleableAttributeToFilter(1)
#1 /var/www/domain.com/app/code/Smartwave/Filterproducts/Block/Home/LatestList.php(56): Magento\Catalog\Model\ResourceModel\Product\Collection->addAttributeToFilter('is_saleable', 1, 'left')
#2 /var/www/domain.com/app/code/Smartwave/Filterproducts/Block/Home/LatestList.php(33): Smartwave\Filterproducts\Block\Home\LatestLis" while reading response header from upstream, client: 0.0.0.0, server: m3.$

@mahesh-rajawat
Copy link
Member Author

@omegades , That's your third party module issue. you need to call addIsSaleableAttributeToFilter with the correct parameter type.

@omegades
Copy link

@maheshWebkul721 Thank you for the feedback :)

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-6065 has been created to process this Pull Request
✳️ @ihor-sviziev, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@ihor-sviziev ihor-sviziev added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Oct 12, 2019
@magento-engcom-team magento-engcom-team merged commit 00401b9 into magento:2.3-develop Oct 15, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 15, 2019

Hi @maheshWebkul721, 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 magento-engcom-team added this to the Release: 2.3.4 milestone Oct 15, 2019
p-bystritsky added a commit to p-bystritsky/magento2 that referenced this pull request Dec 3, 2019
@VladimirZaets VladimirZaets added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests labels Dec 5, 2019
@VladimirZaets
Copy link
Contributor

Covered in the scope of #25915

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.

5 participants