View Config Error

Created on 5 December 2024, 16 days ago

Problem/Motivation

View export yaml causes error.

Steps to reproduce

Drupal 10.3.10
PHP 8.3

  1. Create a block view with all default values selected.
  2. Edit view and change Format to Table.
  3. Save view.
  4. Export config and save to file.
  5. Put yaml in default config directory.
  6. Navigate to /admin/config/development/configuration
  7. 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.

πŸ› Bug report
Status

Active

Version

10.3 ✨

Component

views.module

Created by

πŸ‡ΊπŸ‡ΈUnited States mizage@gmail.com

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

Comments & Activities

Production build 0.71.5 2024