Skip to content

TypeError when loading UPS shipping rates if no allowed shipping methods selected #34411

Closed
@NicholasRoge

Description

@NicholasRoge

Preconditions (*)

  1. Magento version 2.4.3
  2. Admin - Stores - Configuration - Sales - Shipping Methods - UPS shipping method is set up with no "Allowed Methods" selected
  3. cache clear
  4. Front end - Login as customer - Add a product to Cart
  5. Proceed to checkout - Enter Shipping Address
    Issue: No other shipping methods are displayed and error is displayed on UI. Unable to proceed with payment.

Steps to reproduce (*)

  1. Add test simple product to cart
  2. Proceed to checkout
  3. Enter shipping address

Expected result (*)

My expectation is that the exception should never occur in the first place and the carrier should return no rates if there are no allowed shipping methods

Actual result (*)

Actual result is that all rates fail to load and no error is logged to indicate that there is an issue.

If you attempt to load rates an RMA request however, the following error which is caused by the issue in question is logged:

[2021-10-22 20:57:42] report.CRITICAL: Type Error occurred when creating object: Magento\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shipping\Methods, explode() expects parameter 2 to be string, null given [] []
[2021-10-22 20:57:42] report.CRITICAL: Type Error occurred when creating object: Magento\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shipping\Methods, explode() expects parameter 2 to be string, null given [] []
[2021-10-22 20:57:42] report.CRITICAL: Error: Call to a member function toHtml() on bool in /var/www/html/vendor/magento/module-rma/Controller/Adminhtml/Rma/ShowShippingMethods.php:52
Stack trace:
#0 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods->execute()
#1 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->___callParent()
#2 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->Magento\Framework\Interception\{closure}()
#3 /var/www/html/generated/code/Magento/Rma/Controller/Adminhtml/Rma/ShowShippingMethods/Interceptor.php(23): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->___callPlugins()
#4 /var/www/html/vendor/magento/framework/App/Action/Action.php(111): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->execute()
#5 /var/www/html/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch()
#6 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch()
#7 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->___callParent()
#8 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->Magento\Framework\Interception\{closure}()
#9 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch()
#10 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->Magento\Framework\Interception\{closure}()
#11 /var/www/html/generated/code/Magento/Rma/Controller/Adminhtml/Rma/ShowShippingMethods/Interceptor.php(32): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->___callPlugins()
#12 /var/www/html/vendor/magento/framework/App/FrontController.php(245): Magento\Rma\Controller\Adminhtml\Rma\ShowShippingMethods\Interceptor->dispatch()
#13 /var/www/html/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#14 /var/www/html/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#15 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#16 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#17 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#18 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#19 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#20 /var/www/html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#21 /var/www/html/pub/index.php(29): Magento\Framework\App\Bootstrap->run()
#22 {main} [] []

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: ShippingComponent: UpsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.3Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions