When I send the order, a complete email is delivered with the products, but...

  • products and price is not on the order page in the administration
  • the Basic cart content and Total Price fields are empty in basic-cart-orders view
  • basic_cart_order_connect table in the MySQL database is empty
  • node__basic_cart_content table in the MySQL database is empty

The content type "Order" contains the basic_cart_content field.

When placing an order, the following notice is in the log:

Notice: Undefined index: id in function Drupal\basic_cart\CartStorage::delete() (line 94 file /DRUPAL/modules/basic_cart/src/CartStorage.php)
#0 /DRUPAL/core/includes/bootstrap.inc(600): _drupal_error_handler_real(8, 'Undefined index...', '/srv/_container...', 94, Array)
#1 /DRUPAL/modules/basic_cart/src/CartStorage.php(94): _drupal_error_handler(8, 'Undefined index...', '/srv/_container...', 94, Array)
#2 /DRUPAL/modules/basic_cart/src/CartTable.php(74): Drupal\basic_cart\CartStorage::delete(Array)
#3 /DRUPAL/modules/basic_cart/src/CartStorageSelect.php(68): Drupal\basic_cart\CartTable->emptyCart()
#4 /DRUPAL/modules/basic_cart/src/Utility.php(88): Drupal\basic_cart\CartStorageSelect->emptyCart()
#5 /DRUPAL/modules/basic_cart/basic_cart.module(73): Drupal\basic_cart\Utility::emptyCart()
#6 [internal function]: basic_cart_entity_insert(Object(Drupal\node\Entity\Node))
#7 /DRUPAL/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('basic_cart_enti...', Array)
#8 /DRUPAL/core/lib/Drupal/Core/Entity/EntityStorageBase.php(206): Drupal\Core\Extension\ModuleHandler->invokeAll('entity_insert', Array)
#9 /DRUPAL/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(843): Drupal\Core\Entity\EntityStorageBase->invokeHook('insert', Object(Drupal\node\Entity\Node))
#10 /DRUPAL/core/lib/Drupal/Core/Entity/EntityStorageBase.php(535): Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('insert', Object(Drupal\node\Entity\Node))
#11 /DRUPAL/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(728): Drupal\Core\Entity\EntityStorageBase->doPostSave(Object(Drupal\node\Entity\Node), false)
#12 /DRUPAL/core/lib/Drupal/Core/Entity/EntityStorageBase.php(460): Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object(Drupal\node\Entity\Node), false)
#13 /DRUPAL/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(837): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\node\Entity\Node))
#14 /DRUPAL/core/lib/Drupal/Core/Entity/EntityBase.php(395): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\node\Entity\Node))
#15 /DRUPAL/core/modules/node/src/NodeForm.php(294): Drupal\Core\Entity\EntityBase->save()
#16 [internal function]: Drupal\node\NodeForm->save(Array, Object(Drupal\Core\Form\FormState))
#17 /DRUPAL/core/lib/Drupal/Core/Form/FormSubmitter.php(114): call_user_func_array(Array, Array)
#18 /DRUPAL/core/lib/Drupal/Core/Form/FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState))
#19 /DRUPAL/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState))
#20 /DRUPAL/core/lib/Drupal/Core/Form/FormBuilder.php(321): Drupal\Core\Form\FormBuilder->processForm('node_basic_cart...', Array, Object(Drupal\Core\Form\FormState))
#21 /DRUPAL/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(61): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\node\NodeForm), Object(Drupal\Core\Form\FormState))
#22 /DRUPAL/modules/basic_cart/src/Controller/CartController.php(113): Drupal\Core\Entity\EntityFormBuilder->getForm(Object(Drupal\node\Entity\Node))
#23 [internal function]: Drupal\basic_cart\Controller\CartController->checkout()
#24 /DRUPAL/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#25 /DRUPAL/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#26 /DRUPAL/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#27 /DRUPAL/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#28 /DRUPAL/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#29 /DRUPAL/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#30 /DRUPAL/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /DRUPAL/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /DRUPAL/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /DRUPAL/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /DRUPAL/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /DRUPAL/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /DRUPAL/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /DRUPAL/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /DRUPAL/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#39 {main}

Comments

mandus.cz created an issue. See original summary.

Ingvar’s picture

norman.lol’s picture

Version: 8.x-6.2-beta4 » 8.x-8.x-dev
Related issues: +#3180430: Neither cart content, price or vat are stored in the newly 'order' node
norman.lol’s picture

Status: Active » Closed (duplicate)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

norman.lol’s picture