The documentation regarding the creation of a custom checkout pane is incorrect and results in an unrecoverable error.
This documentation is found in Example 1 "Example 1: Create a custom message checkout pane." here : https://docs.drupalcommerce.org/commerce2/developer-guide/checkout/creat...
Error message:
The website encountered an unexpected error. Please try again later.
TypeError: Drupal\Core\Render\Element::getVisibleChildren(): Argument #1 ($elements) must be of type array, null given, called in /var/www/drupal/public_html/modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowWithPanesBase.php on line 548 in Drupal\Core\Render\Element::getVisibleChildren() (line 130 of core/lib/Drupal/Core/Render/Element.php).
Drupal\Core\Render\Element::getVisibleChildren() (Line: 548)
Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase->buildForm()
call_user_func_array() (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 224)
Drupal\Core\Form\FormBuilder->getForm() (Line: 143)
Drupal\commerce_checkout\Controller\CheckoutController->formPage()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Install Commerce and set up a store.
Follow the instructions in the documentation in Example 1: Create a custom message checkout pane: https://docs.drupalcommerce.org/commerce2/developer-guide/checkout/creat...
Active
2.0
Documentation