Argument 1 passed to Drupal\commerce_timeslots\Services\CommerceTimeSlots::getTimeSlotToArray()

Created on 2 December 2022, about 2 years ago
Updated 7 March 2023, almost 2 years ago

TypeError: Argument 1 passed to Drupal\commerce_timeslots\Services\CommerceTimeSlots::getTimeSlotToArray() must be of the type int, null given, called in /var/www/sitename/modules/contrib/commerce_timeslots/src/Plugin/Commerce/CheckoutPane/TimeSlotPane.php on line 162 in Drupal\commerce_timeslots\Services\CommerceTimeSlots->getTimeSlotToArray() (line 564 of modules/contrib/commerce_timeslots/src/Services/CommerceTimeSlots.php).

๐Ÿ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia jitesh_1 Jaipur

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance orkineo

    Hello, since this bug, the module has become unusable, I tried with several versions of the core but impossible to arrive at checkout without a blank page. It's as if the data stored in the database never made it through the ordering steps. Thanks for any progress on this issue.

  • ๐Ÿ‡ฒ๐Ÿ‡ฉMoldova andrei.vesterli Chisinau

    andrei.vesterli โ†’ made their first commit to this issueโ€™s fork.

  • @andreivesterli opened merge request.
  • ๐Ÿ‡ฒ๐Ÿ‡ฉMoldova andrei.vesterli Chisinau

    Issue is now fixed

  • Status changed to Fixed almost 2 years ago
  • ๐Ÿ‡ฒ๐Ÿ‡ฉMoldova andrei.vesterli Chisinau
  • Status changed to Fixed almost 2 years ago
  • ๐Ÿ‡ฒ๐Ÿ‡ฉMoldova andrei.vesterli Chisinau
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance orkineo

    After testing the new release with a fresh install of Drupal Commerce, it seems we can't select a delay. The selection box is empty: There is no time slot available. Otherwise, I managed to display Times frames on a Kickstart version with the demo store but it does not display every time. If there is something I can test to advance the research, please let me know.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance orkineo

    For information, if you go to the next step of the ordering process without choosing a slot, an error message is displayed but you can return to the previous page, refresh then the times are displayed and you can select them. The console error is:

    TypeError : Drupal\commerce_timeslots\Services\CommerceTimeSlots::getTimeSlotToArray(): Argument #1 ($time_frame) must be of type int, string given, called in C:\xampp\htdocs\timeslotstest\web\modules\contrib\commerce_timeslots\src\Plugin\Commerce\CheckoutPane\TimeSlotPane.php on line 166 dans Drupal\commerce_timeslots\Services\CommerceTimeSlots->getTimeSlotToArray() (C:\xampp\htdocs\timeslotstest\web\modules\contrib\commerce_timeslots\src\Services\CommerceTimeSlots.php ligne 564)
    #0 C:\xampp\htdocs\timeslotstest\web\modules\contrib\commerce_timeslots\src\Plugin\Commerce\CheckoutPane\TimeSlotPane.php(166): Drupal\commerce_timeslots\Services\CommerceTimeSlots->getTimeSlotToArray('', Object(Drupal\Core\Datetime\DrupalDateTime))
    #1 C:\xampp\htdocs\timeslotstest\web\modules\contrib\commerce\modules\checkout\src\Plugin\Commerce\CheckoutPane\Review.php(28): Drupal\commerce_timeslots\Plugin\Commerce\CheckoutPane\TimeSlotPane->buildPaneSummary()
    #2 C:\xampp\htdocs\timeslotstest\web\modules\contrib\commerce\modules\checkout\src\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase.php(546): Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\Review->buildPaneForm(Array, Object(Drupal\Core\Form\FormState), Array)
    #3 [internal function]: Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase->buildForm(Array, Object(Drupal\Core\Form\FormState), 'review')
    #4 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\Form\FormBuilder.php(534): call_user_func_array(Array, Array)
    #5 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\Form\FormBuilder.php(281): Drupal\Core\Form\FormBuilder->retrieveForm('commerce_checko...', Object(Drupal\Core\Form\FormState))
    #6 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\Form\FormBuilder.php(222): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault), Object(Drupal\Core\Form\FormState))
    #7 C:\xampp\htdocs\timeslotstest\web\modules\contrib\commerce\modules\checkout\src\Controller\CheckoutController.php(143): Drupal\Core\Form\FormBuilder->getForm(Object(Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault), 'review')
    #8 [internal function]: Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object(Drupal\Core\Routing\RouteMatch))
    #9 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
    #10 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\Render\Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #11 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
    #12 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
    #13 C:\xampp\htdocs\timeslotstest\vendor\symfony\http-kernel\HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #14 C:\xampp\htdocs\timeslotstest\vendor\symfony\http-kernel\HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
    #15 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\StackMiddleware\Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #16 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #17 C:\xampp\htdocs\timeslotstest\web\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #18 C:\xampp\htdocs\timeslotstest\web\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #19 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #20 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #21 C:\xampp\htdocs\timeslotstest\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #22 C:\xampp\htdocs\timeslotstest\web\core\lib\Drupal\Core\DrupalKernel.php(713): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #23 C:\xampp\htdocs\timeslotstest\web\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #24 {main}

Production build 0.71.5 2024