Full stack trace:
Warning: Undefined property: Drupal\commerce_printful\Service\OrderIntegrator::$priceExchangerCalculator in Drupal\commerce_printful\Service\OrderIntegrator->getRequestData() (line 93 of /home/site/tu/web/modules/contrib/commerce_printful/src/OrderItemsTrait.php)
#0 /home/site/tu/web/core/includes/bootstrap.inc(346): _drupal_error_handler_real(2, 'Undefined prope...', '/home/site/tu/...', 93)
#1 /home/site/tu/web/modules/contrib/commerce_printful/src/OrderItemsTrait.php(93): _drupal_error_handler(2, 'Undefined prope...', '/home/site/tu/...', 93)
#2 /home/site/tu/web/modules/contrib/commerce_printful/src/Service/OrderIntegrator.php(84): Drupal\commerce_printful\Service\OrderIntegrator->getRequestData(Object(Drupal\commerce_shipping\Entity\Shipment), true)
#3 /home/site/tu/web/modules/contrib/commerce_printful/src/EventSubscriber/OrderEventSubscriber.php(49): Drupal\commerce_printful\Service\OrderIntegrator->createPrintfulOrder(Object(Drupal\commerce_order\Entity\Order))
#4 [internal function]: Drupal\commerce_printful\EventSubscriber\OrderEventSubscriber->sendToPrintful(Object(Drupal\commerce_order\Event\OrderEvent), 'commerce_order....', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#5 /home/site/tu/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Drupal\commerce_order\Event\OrderEvent), 'commerce_order....', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#6 /home/site/tu/web/modules/contrib/commerce/modules/order/src/OrderStorage.php(100): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\commerce_order\Event\OrderEvent), 'commerce_order....')
#7 /home/site/tu/web/modules/contrib/commerce/modules/order/src/OrderStorage.php(61): Drupal\commerce_order\OrderStorage->doOrderPreSave(Object(Drupal\commerce_order\Entity\Order))
#8 /home/site/tu/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(567): Drupal\commerce_order\OrderStorage->invokeHook('presave', Object(Drupal\commerce_order\Entity\Order))
#9 /home/site/tu/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(756): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\commerce_order\Entity\Order))
#10 /home/site/tu/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(521): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object(Drupal\commerce_order\Entity\Order))
#11 /home/site/tu/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(802): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\commerce_order\Entity\Order))
#12 /home/site/tu/web/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\commerce_order\Entity\Order))
#13 /home/site/tu/web/modules/contrib/commerce/modules/payment/src/PaymentOrderUpdater.php(95): Drupal\Core\Entity\EntityBase->save()
#14 /home/site/tu/web/modules/contrib/commerce/modules/payment/src/PaymentOrderUpdater.php(59): Drupal\commerce_payment\PaymentOrderUpdater->updateOrder(Object(Drupal\commerce_order\Entity\Order), true)
#15 /home/site/tu/web/modules/contrib/commerce/modules/payment/src/PaymentOrderUpdater.php(106): Drupal\commerce_payment\PaymentOrderUpdater->updateOrders()
#16 /home/site/tu/web/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php(51): Drupal\commerce_payment\PaymentOrderUpdater->destruct()
#17 [internal function]: Drupal\Core\EventSubscriber\KernelDestructionSubscriber->onKernelTerminate(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#18 /home/site/tu/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#19 /home/site/tu/vendor/symfony/http-kernel/HttpKernel.php(100): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...')
#20 /home/site/tu/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\TrustedRedirectResponse))
#21 /home/site/tu/web/core/lib/Drupal/Core/DrupalKernel.php(686): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\TrustedRedirectResponse))
#22 /home/site/tu/web/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\TrustedRedirectResponse))
#23 {main}
Comments
Comment #3
cameron prince commentedThe OrderIntegrator service uses the OrderItemsTrait. This trait expects the PriceExchangerCalculator service to be available. This service is injected into other classes uses the trait, but wasn't available in the OrderIntegrator. I've committed a fix for this and will create a new release shortly as this bug will affect others who upgrade to PHP8.