Could not normalize object of type ViewExecutable, no supporting normalizer found.

Created on 1 July 2018, over 6 years ago
Updated 12 January 2024, 10 months ago

No matter the settings I use for the data export format, I couldn't export my view.
I have tried with a simple column of node titles and with a simple column of boolean value.
Here is the error:

Symfony\Component\Serializer\Exception\NotNormalizableValueException: Could not normalize object of type Drupal\views\ViewExecutable, no supporting normalizer found. in Symfony\Component\Serializer\Serializer->normalize() (line 164 of vendor/symfony/serializer/Serializer.php).
Symfony\Component\Serializer\Serializer->normalize(Array, 'xlsx', Array) (Line: 153)
Symfony\Component\Serializer\Serializer->normalize(Array, 'xlsx', Array) (Line: 116)
Symfony\Component\Serializer\Serializer->serialize(Array, 'xlsx', Array) (Line: 142)
Drupal\rest\Plugin\views\style\Serializer->render() (Line: 449)
Drupal\rest\Plugin\views\display\RestExport->Drupal\rest\Plugin\views\display\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 450)
Drupal\rest\Plugin\views\display\RestExport->render() (Line: 67)
Drupal\views_data_export\Plugin\views\display\DataExport->render() (Line: 1533)
Drupal\views\ViewExecutable->render() (Line: 440)
Drupal\rest\Plugin\views\display\RestExport->execute() (Line: 1630)
Drupal\views\ViewExecutable->executeDisplay('data_export_1', Array) (Line: 77)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func(Array, Array) (Line: 378)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 139)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 140)
Drupal\Core\Render\Renderer->renderRoot(Array) (Line: 46)
Drupal\views_data_export\Plugin\views\display\DataExport::buildResponse('recette', 'data_export_1', Array) (Line: 52)
Drupal\views\Routing\ViewPageController->handle('recette', 'data_export_1', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 666)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium DuneBL

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.

  • 🇮🇳India josedsilva Goa

    Thanks @bwong. Your solution saved my day.
    Comment #6 is correct. It happens when you duplicate the current display to a data export display

  • 🇩🇪Germany sascha_meissner Planet earth

    Thanks to @bwong for the solution :)

    Looking at the Readme->Configuration->Nr.5 where it states "If none are selected all formats will be allowed" seems to be incompatible with Readme->Configuration->Nr.8 "Ensure that the 'path' for the data export is a file, with an extension
    matching the format. ie: /export/foo.csv"

Production build 0.71.5 2024