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)

Comments

DuneBL created an issue. See original summary.

bwong’s picture

Under Format/Show: click on Fields and then select Fields or one of the other values. Nothing is set when the data export display is created. Have not figured out where this should be set yet.

After looking at it some more, the settings are odd. Currently they are radio buttons but the description seems to indicate that all formats would be supported if nothing is checked but once I check CSV there is obviously no way to uncheck it. I am assuming that if these were check boxes and everything was checked then there would be three icons generated. That would be nice.

tce’s picture

@bwong Thanks! This fixed the issue for me. Under format/show, nothing was set. I set to fields and the export now works as expected 👍

g-brodiei’s picture

Status: Active » Closed (works as designed)

Thanks for the hint as well! Totally fixed my anxiety when I'm worrying like hell lol.
Closing this issue as fixed (work as design).

jacob.embree’s picture

Status: Closed (works as designed) » Active

I, too, found bwong's comment helpful. I believe that the user being able to generate a WSOD is a flaw in the module which should be fixed, so I'm changing the status back.

randalv’s picture

Thanks @bwong for the solution.
From my testing, this seems to only happen when you *duplicate* the current display to a data export display, NOT when you create a new data export display (with the +add button).

josedsilva’s picture

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

sascha_meissner’s picture

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"

steven jones’s picture

Status: Active » Closed (cannot reproduce)

I can't reproduce this using the latest versions of everything. Feel free to re-open if you can, with detailed steps, and maybe a config export of the view that's causing the problems.

siramsay’s picture

I just came across this issue. I had duplicated the view as @randalv stated. #6

The solution from @bwong #2 was to Under Format/Show: click on Fields and then select Fields or one of the other values.

V 8.x-1.6
Drupal 11.2.5