Problem/Motivation

I have tried to add a Word export display on any content view but the website crashes. Tried on simplytest.me (D8.6.13) (returns error 500) and my website (D8.6.10): call stack below.

Call stack

( ! ) Fatal error: Class 'Drupal\rest\Plugin\views\display\RestExport' not found in /var/www/html/webroot/modules/contrib/doc_serialization/src/Plugin/views/display/WordExport.php on line 27
Call Stack
#	Time	Memory	Function	Location
1	0.0002	365808	{main}( )	.../index.php:0
2	0.0867	483560	Drupal\Core\DrupalKernel->handle( )	.../index.php:19
3	0.2780	1932712	Stack\StackedHttpKernel->handle( )	.../DrupalKernel.php:693
4	0.2780	1932712	Drupal\Core\StackMiddleware\NegotiationMiddleware->handle( )	.../StackedHttpKernel.php:23
5	0.2781	1933408	Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle( )	.../NegotiationMiddleware.php:52
6	0.2781	1933408	Drupal\shield\ShieldMiddleware->handle( )	.../ReverseProxyMiddleware.php:47
7	0.3276	2062264	Drupal\page_cache\StackMiddleware\PageCache->handle( )	.../ShieldMiddleware.php:98
8	0.3276	2062264	Drupal\page_cache\StackMiddleware\PageCache->pass( )	.../PageCache.php:78
9	0.3276	2062264	Drupal\Core\StackMiddleware\KernelPreHandle->handle( )	.../PageCache.php:99
10	0.4803	2523920	Drupal\Core\StackMiddleware\Session->handle( )	.../KernelPreHandle.php:47
11	0.4992	2634080	Symfony\Component\HttpKernel\HttpKernel->handle( )	.../Session.php:57
12	0.4992	2635136	Symfony\Component\HttpKernel\HttpKernel->handleRaw( )	.../HttpKernel.php:68
13	0.8152	5416616	Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}( )	.../HttpKernel.php:151
14	0.8152	5416616	Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext( )	.../EarlyRenderingControllerWrapperSubscriber.php:97
15	0.8163	5419152	Drupal\Core\Render\Renderer->executeInRenderContext( )	.../EarlyRenderingControllerWrapperSubscriber.php:124
16	0.8163	5419504	Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}( )	.../Renderer.php:582
17	0.8163	5419504	call_user_func_array:{/var/www/html/webroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:123} ( )	.../EarlyRenderingControllerWrapperSubscriber.php:123
18	0.8163	5419912	Drupal\views_ui\Controller\ViewsUIController->edit( )	.../EarlyRenderingControllerWrapperSubscriber.php:123
19	0.8342	5742816	Drupal\Core\Entity\EntityFormBuilder->getForm( )	.../ViewsUIController.php:226
20	0.8512	5874416	Drupal\Core\Form\FormBuilder->buildForm( )	.../EntityFormBuilder.php:48
21	1.6012	14303280	Drupal\Core\Form\FormBuilder->processForm( )	.../FormBuilder.php:318
22	1.6205	14632552	Drupal\Core\Form\FormSubmitter->doSubmitForm( )	.../FormBuilder.php:589
23	1.6205	14632552	Drupal\Core\Form\FormSubmitter->executeSubmitHandlers( )	.../FormSubmitter.php:51
24	1.6205	14633752	call_user_func_array:{/var/www/html/webroot/core/lib/Drupal/Core/Form/FormSubmitter.php:111} ( )	.../FormSubmitter.php:111
25	1.6205	14633784	Drupal\views_ui\ViewEditForm->submitDisplayAdd( )	.../FormSubmitter.php:111
26	1.6205	14634184	Drupal\views\ViewExecutable->newDisplay( )	.../ViewEditForm.php:856
27	1.6206	14634976	Drupal\views\DisplayPluginCollection->get( )	.../ViewExecutable.php:849
28	1.6206	14634976	Drupal\views\DisplayPluginCollection->get( )	.../DisplayPluginCollection.php:54
29	1.6206	14634976	Drupal\views\DisplayPluginCollection->initializePlugin( )	.../LazyPluginCollection.php:80
30	1.6206	14635000	Drupal\views\DisplayPluginCollection->initializePlugin( )	.../DisplayPluginCollection.php:77
31	1.6206	14635000	Drupal\views\Plugin\ViewsPluginManager->createInstance( )	.../DefaultLazyPluginCollection.php:81
32	1.6206	14635000	Drupal\Core\Plugin\Factory\ContainerFactory->createInstance( )	.../PluginManagerBase.php:83
33	1.6206	14635000	Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass( )	.../ContainerFactory.php:17
34	1.6206	14635320	class_exists ( )	.../DefaultFactory.php:96
35	1.6206	14635416	spl_autoload_call ( )	.../DefaultFactory.php:96
36	1.6206	14635512	Composer\Autoload\ClassLoader->loadClass( )	.../DefaultFactory.php:96
37	1.6227	14635640	Composer\Autoload\includeFile( )	.../ClassLoader.php:322
38	1.6228	14636528	include( '/var/www/html/webroot/modules/contrib/doc_serialization/src/Plugin/views/display/WordExport.php' )	.../ClassLoader.php:444

Comments

Dakwamine created an issue. See original summary.

dakwamine’s picture

To fix this issue, rest module must be enabled so it should be listed as a dependency of this module in the info.yml.

theemstra’s picture

Category: Bug report » Support request
Status: Active » Patch (to be ported)

Thanks @Dakwamine
Will add it as dependency in next release.

theemstra’s picture

Assigned: Unassigned » theemstra
Status: Patch (to be ported) » Fixed

Thanks, this fix is added in the dev release that is about to be added.

theemstra’s picture

Status: Fixed » Closed (fixed)

New dev release is available, this is one of the changes released. Please test, if there are any issues, please re-open the issue or create a new issue.