I am using the latest stable Drupal 8 version: 8.4.4. If I select the "Delete selected entities" action, I am getting the following error:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getPlugin() on null in Drupal\system\Plugin\views\field\BulkForm->viewsFormSubmit() (line 360 of core/modules/system/src/Plugin/views/field/BulkForm.php).
Drupal\system\Plugin\views\field\BulkForm->viewsFormSubmit(Array, Object) (Line: 132)
Drupal\views\Form\ViewsFormMainForm->submitForm(Array, Object) (Line: 187)
Drupal\views\Form\ViewsForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('views_form_account_credentials_page_1', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('views_form_account_credentials_page_1', Object) (Line: 212)
Drupal\Core\Form\FormBuilder->getForm(Object, Object, Array) (Line: 2207)
Drupal\views\Plugin\views\display\DisplayPluginBase->elementPreRender(Array)
call_user_func(Array, Array) (Line: 378)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 108)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 158)
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: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 657)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I have been investigating a bit. The provided form action key from $form_state->getValue('action') does not match the key in the

$this->actions

property.

There are no issues currently, which are referring to the same problem. Have I missed anything here? Is any specific setting required? The "Demote selected content from front page" action works as expected. I have also been checking the views settings and I have not found anything what could change the form item key.

If I change the key manually in core at Drupal\system\Plugin\views\field\BulkForm, the delete bulk operation works.

CommentFileSizeAuthor
content.png63.99 KBPeter Majmesku
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Peter Majmesku created an issue. See original summary.

Peter Majmesku’s picture

Status: Active » Fixed

It was my fault. I had still the basic Drupal core action "Node operations bulk form" in my views fields settings. There must be only the "Views bulk operations" field.

Graber’s picture

Status: Fixed » Closed (works as designed)

Yes, unfortunately the core field causes a bit struggle, but we can't disable / replace it globally because it may still be in use on some projects and views.

undersound3’s picture

Sorry to comment on a closed issue but this one came up as most relevant when searching for this error.
Is it perhaps possible to return a meaningful message to the end user when there is a "Node operations bulk form" present?

Something like:

It seems you still have a drupal core action field enabled on this view. Please disable this to continue.

mlncn’s picture

Version: 8.x-2.0-rc4 » 8.x-3.x-dev
Component: Actions » Documentation
Category: Bug report » Task
Priority: Major » Normal
Status: Closed (works as designed) » Active

If not in the module itself, this gotcha needs to be clearly documented on the module page, README, and/or other documentation.

mlncn’s picture

Is there any usage documentation for Drupal 8?

For the linked documentation:

https://www.drupal.org/docs/contributed-modules/views-bulk-operations-vbo is only developer documentation

And http://drupal.org/node/1591342 is Drupal 7 and Drupal 6.

Graber’s picture

I don't think so, something that could be done I guess.

Graber’s picture

Status: Active » Closed (works as designed)

Closing this, if additional usage documentation is needed, we should create a new issue, this one is clearly about something else that should be closed and I don't think that changing an issue title and keeping irrelevant information there is a good way to go.

cweiske’s picture

I had the same error with drupal 8.7 and views_bulk_operations 2.6.
My view did not have the "Node operations bulk form" filter, but the "Draggableviews: Taxonomy term" (draggableviews 1.2) field.
After removing the Draggableviews field the error was gone.