Tested latest .dev at simplytest.me.

There is a warning in log after checkout is done:

Location
https://d2k1d.ply.st/checkout

Referrer
https://d2k1d.ply.st/checkout

Message
Warning: Missing argument 3 for basic_cart_order_submit() in basic_cart_order_submit() (line 337 of /home/d2k1d/www/sites/default/modules/basic_cart/basic_cart.module) #0 /home/d2k1d/www/core/includes/bootstrap.inc(566): _drupal_error_handler_real(2, 'Missing argumen...', '/home/d2k1d/www...', 337, Array) #1 /home/d2k1d/www/sites/default/modules/basic_cart/basic_cart.module(337): _drupal_error_handler(2, 'Missing argumen...', '/home/d2k1d/www...', 337, Array) #2 [internal function]: basic_cart_order_submit(Array, Object(Drupal\Core\Form\FormState)) #3 /home/d2k1d/www/core/lib/Drupal/Core/Form/FormSubmitter.php(111): call_user_func_array('basic_cart_orde...', Array) #4 /home/d2k1d/www/core/lib/Drupal/Core/Form/FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #5 /home/d2k1d/www/core/lib/Drupal/Core/Form/FormBuilder.php(585): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #6 /home/d2k1d/www/core/lib/Drupal/Core/Form/FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('node_basic_cart...', Array, Object(Drupal\Core\Form\FormState)) #7 /home/d2k1d/www/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(48): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\node\NodeForm), Object(Drupal\Core\Form\FormState)) #8 /home/d2k1d/www/sites/default/modules/basic_cart/src/Controller/CartController.php(112): Drupal\Core\Entity\EntityFormBuilder->getForm(Object(Drupal\node\Entity\Node)) #9 [internal function]: Drupal\basic_cart\Controller\CartController->checkout() #10 /home/d2k1d/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #11 /home/d2k1d/www/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #12 /home/d2k1d/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #13 /home/d2k1d/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #14 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #15 /home/d2k1d/www/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #16 /home/d2k1d/www/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #17 /home/d2k1d/www/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /home/d2k1d/www/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /home/d2k1d/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /home/d2k1d/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /home/d2k1d/www/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /home/d2k1d/www/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /home/d2k1d/www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /home/d2k1d/www/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /home/d2k1d/www/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #26 {main}.

CommentFileSizeAuthor
#4 missing_argument_2907893.patch471 bytesjalpesh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

devad created an issue. See original summary.

jalpesh’s picture

Can you please share a steps to reproduce it?

devad’s picture

To reproduce: Install latest Basic Cart .dev, adjust Basic Card settings to target Article content type (or any other content type), create article, add article to cart, checkout, and check log afterwards.

I have done all of these in simplytest.me instance here:

https://d2kqk.ply.st/user

admin/admin

This link will be active next 5 days.

You can use this temporary simplytest.me instance to create more products or orders, instal Devel and/or other modules and debug error... feel free to do whatever you need.

jalpesh’s picture

Status: Active » Needs review
FileSize
471 bytes

The issue is because of unnecessary $form_id argument pass in basic_cart_order_submit function. I have remove it and attach a patch.

Can you please verify it by applying patch. Thanks.

devad’s picture

Status: Needs review » Reviewed & tested by the community

I have applied patch #4 to latest .dev and it works.

No more warnings in logs. Commit would be nice.

Thanx @jalpesh

karthikeyan-manivasagam’s picture

karthikeyan-manivasagam’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.