-
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
Item resolvers should be optional #30823
Conversation
Hi @thomas-kl1. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @thomas-kl1, |
Take a look on the implementation of the method:
Default case should return the item product. Then it iterates over resolvers for specific type of products. However in this case it requires that itemResolvers is an array. But if the grouped and configurable products module is not there, it's breaking the checkout.. By design the catalog module should works regardless other product type implementation |
@thomas-kl1 I see that in constructor we have defined type - array, so we shouldn't have any other options. Empty array should be by default. Could you provide more info, what exception do you have? What value are you getting in the |
I got this: Invalid argument supplied for foreach(), value is null |
Hi @thomas-kl1, Do you have some custom extension that changes this part? Could you provide full output of exception? Still not clear where do you having this issue, on some frontend page or during some CLI command run? |
The issue occurs on the checkout and cart page. What does not seems logical there? You can edit composer json and replace both module, or create your own metapackage with magento2-base and catalog modules. |
@thomas-kl1 thx for explanation, I'll check it myself and will give you my feedback a bit later. |
My bad I still had some debug trace. The actual error message was different and not that value null is used in foreach. I can post the actual exception later. Sorry |
Here the exception message: [2020-11-06 16:04:57] main.CRITICAL: Missing required argument $itemResolvers of Magento\Catalog\Model\Product\Configuration\Item\ItemResolverComposite. [] [] |
Hi @thomas-kl1, thank you for your contribution! |
Item resolvers should be optional. If we remove configurable and grouped product, checkout is broken because this argument is mandatory. Only the grouper and configurable product add item resolver.
Resolved issues:
Preconditions (*)
Steps to reproduce (*)