Hi,
after
- patch 7 in
https://www.drupal.org/project/commerce_ups/issues/3387353
โจ
OAuth 2.0 support? (D10+)
Fixed
(in drupal 9.5.11, probably UPS was still working correctly there)
- and then Upgrade to 10.2.4
I get:
Error: Call to a member function getLength() on null in Drupal\commerce_ups\UPSSdk->getPackage() (line 281 in /modules/contrib/commerce_ups/src/UPSSdk.php)
#0 /modules/contrib/commerce_ups/src/UPSSdk.php(234): Drupal\commerce_ups\UPSSdk->getPackage('...')
#1 /modules/contrib/commerce_ups/src/UPSSdk.php(192): Drupal\commerce_ups\UPSSdk->getShipment()
#2 /modules/contrib/commerce_ups/src/UPSSdk.php(149): Drupal\commerce_ups\UPSSdk->prepareRatesRequest()
#3 /modules/contrib/commerce_ups/src/UPSRateRequest.php(59): Drupal\commerce_ups\UPSSdk->getShipmentShopRates()
#4 /modules/contrib/commerce_ups/src/Plugin/Commerce/ShippingMethod/UPS.php(275): Drupal\commerce_ups\UPSRateRequest->getRates(Object(Drupal\commerce_shipping\Entity\Shipment), Object(Drupal\commerce_conditions_plus\Entity\ShippingMethod))
#5 /modules/contrib/commerce_shipping/src/ShipmentManager.php(89): Drupal\commerce_ups\Plugin\Commerce\ShippingMethod\UPS->calculateRates(Object(Drupal\commerce_shipping\Entity\Shipment))
#6 /modules/contrib/commerce_shipping/src/Plugin/Field/FieldWidget/ShippingRateWidget.php(100): Drupal\commerce_shipping\ShipmentManager->calculateRates(Object(Drupal\commerce_shipping\Entity\Shipment))
#7 /core/lib/Drupal/Core/Field/WidgetBase.php(459): Drupal\commerce_shipping\Plugin\Field\FieldWidget\ShippingRateWidget->formElement(Object(Drupal\Core\Field\EntityReferenceFieldItemList), 0, Array, Array, Object(Drupal\Core\Form\FormState))
#8 /core/lib/Drupal/Core/Field/WidgetBase.php(219): Drupal\Core\Field\WidgetBase->formSingleElement(Object(Drupal\Core\Field\EntityReferenceFieldItemList), 0, Array, Array, Object(Drupal\Core\Form\FormState))
#9 /core/lib/Drupal/Core/Field/WidgetBase.php(120): Drupal\Core\Field\WidgetBase->formMultipleElements(Object(Drupal\Core\Field\EntityReferenceFieldItemList), Array, Object(Drupal\Core\Form\FormState))
#10 /core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php(186): Drupal\Core\Field\WidgetBase->form(Object(Drupal\Core\Field\EntityReferenceFieldItemList), Array, Object(Drupal\Core\Form\FormState))
#11 /modules/contrib/commerce_shipping/src/Plugin/Commerce/CheckoutPane/ShippingInformation.php(335): Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object(Drupal\commerce_shipping\Entity\Shipment), Array, Object(Drupal\Core\Form\FormState))
#12 /modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowWithPanesBase.php(546): Drupal\commerce_shipping\Plugin\Commerce\CheckoutPane\ShippingInformation->buildPaneForm(Array, Object(Drupal\Core\Form\FormState), Array)
#13 [internal function]: Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase->buildForm(Array, Object(Drupal\Core\Form\FormState), '...')
#14 /core/lib/Drupal/Core/Form/FormBuilder.php(536): call_user_func_array(Array, Array)
#15 /core/lib/Drupal/Core/Form/FormBuilder.php(283): Drupal\Core\Form\FormBuilder->retrieveForm('...', Object(Drupal\Core\Form\FormState))
#16 /core/lib/Drupal/Core/Form/FormBuilder.php(224): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault), Object(Drupal\Core\Form\FormState))
#17 /modules/contrib/commerce/modules/checkout/src/Controller/CheckoutController.php(143): Drupal\Core\Form\FormBuilder->getForm(Object(Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault), '...')
#18 [internal function]: Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object(Drupal\Core\Routing\RouteMatch))
#19 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#20 /core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#21 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#22 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#23 /vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#24 /vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#25 /core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#37 {main}
Thanks for any help!