Problem/Motivation
View export yaml causes error.
Steps to reproduce
Drupal 10.3.10
PHP 8.3
- Create a block view with all default values selected.
- Edit view and change Format to Table.
- Save view.
- Export config and save to file.
- Put yaml in default config directory.
- Navigate to /admin/config/development/configuration
- Page throws the following error:
The website encountered an unexpected error. Try again later.
Drupal\Core\Config\UnsupportedDataTypeConfigException: Invalid data type in config views.view.test, found in file ../config/default/views.view.test.yml: You cannot define a mapping item when in a sequence at line 5 (near "row_class: ''"). in Drupal\Core\Config\FileStorage->read() (line 118 of core\lib\Drupal\Core\Config\FileStorage.php).
Drupal\Core\Config\ImportStorageTransformer::replaceStorageContents(Object, Object) (Line: 117)
Drupal\Core\Config\ImportStorageTransformer->transform(Object) (Line: 223)
Drupal\config\Form\ConfigSync->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('config_admin_import_form', Object) (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
See attached yaml.