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

Infinite loop in Checkout process causes Segmentaion Fault. #15

Closed
gorillagroup opened this issue Nov 3, 2016 · 3 comments
Closed

Infinite loop in Checkout process causes Segmentaion Fault. #15

gorillagroup opened this issue Nov 3, 2016 · 3 comments

Comments

@gorillagroup
Copy link

gorillagroup commented Nov 3, 2016

Hi,

There is an issue with the implementation of the \ShipperHQ\Shipper\Model\Carrier\Shipper::setRequest method. It uses the \ShipperHQ\Shipper\Helper\Data helper to get quote, which in turn uses Checkout session.

This possesses the problem for a use-case when "collectTotals" process (a part of which \ShipperHQ\Shipper\Model\Carrier\Shipper::setRequest is) is triggered by the \Magento\Quote\Model\Quote::_afterLoad - see https://github.com/magento/magento2/blob/2.1.2/app/code/Magento/Quote/Model/Quote.php#L2350. As can be seen from the link this happens when "trigger_recollect" flag is set to quote. That flag is being set if product in customer's quote is updated or price rule applied.
In that case application falls into infinite loop, as Quote is loaded over and over again when requested in \ShipperHQ\Shipper\Helper\Data::getQuote.

One of the possible solutions would be to explicitly set Quote to the helper somewhere here: https://github.com/shipperhq/module-shipper/blob/master/src/Model/Carrier/Shipper.php#L290. Please also note that on L289 you're checking object for being a Magento 1 class instance - that needs to be fixed.

@wsagen
Copy link
Contributor

wsagen commented Nov 5, 2016

Acknowledged, thanks for the input. Will update when we have a release to resolve this.

@gorillagroup
Copy link
Author

Any updates or ETA?

@wsagen
Copy link
Contributor

wsagen commented Nov 10, 2016

Fix released in version 20.1.2

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

No branches or pull requests

3 participants