QuestionQ35

VerifiedTroubleshoot to identify the root cause of issues with Adobe Commerce

Since the most recent production deployment, customers cannot finish checkout.

The error logs repeatedly show this message:

main.CRITICAL: Report ID: webapi-61b9fe83f0c3e; Message: Infinite loop detected, review the trace for the looping path

The Architect identifies a deployed feature intended to restrict delivery for certain postcodes. The Architect finds the following code deployed in etc/webapi_rest/di.xml and etc/frontend/di.xml:

Question Image

LimitRates.php:

Question Image

Which action should the Architect take to resolve the issue?

Explanation

Magento\Checkout\Model\Session::getQuote() guards against re-entrant quote loading and can collect quote totals while loading a quote. Because shipping-rate retrieval is part of totals collection, calling getQuote() from a plugin on Magento\Shipping\Model\Rate\Result::getAllRates() recursively re-enters the same rate-collection path. Loading the cart with CartRepositoryInterface::get($this->session->getQuoteId()) uses the known quote ID without calling getQuote(), so it prevents that recursion. Adobe documents that an after plugin is appropriate for modifying a method result; replacing it with an around plugin is neither required nor a cure for this recursive dependency.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!