Steps to reproduce:

  1. Create a table view including VBO that lists some entities containing a date field
  2. Add and expose a filter on this date field, greater than/equal to, and add a default value (You need to set a date that will leave out some older entries, but still show some upcoming dates)
  3. Save the view and navigate to its page
  4. Filter for a date older than the default value or just filter with an empty date field
  5. Process an action on a row that was not inside the initial load with the default value
  6. The action can be selected and processes as expected, but no changes are saved

If you leave the default value of the exposed filter empty in its settings, then everything works fine. It seems like the values of the older dates are not in reach of the action, if they are not contained within the initial results.

To mention - I can only confirm this for modifying field values with view_bulk_edit, not regular actions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ABaier created an issue. See original summary.

Graber’s picture

Nice find! Right in time, otherwise we'd have a cleanup to perform (see the related issue).

Patch attached, please check.

Graber’s picture

Status: Active » Needs review
ABaier’s picture

Thanks Graber, the patch applied cleanly against rc3 and it seems to have fixed the problem.

Before saving my view again (had an empty value for the date) I got the following, which did not interfere with the functionality though. After saving the view one time with the default inside and switching back to empty, the notices were gone.

Notice: Undefined index: exposed_input in Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm->updateTempstoreData() (line 243 of modules/views_bulk_operations/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php).
Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm->updateTempstoreData() (Line: 528)
Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm->viewsForm(Array, Object) (Line: 60)
Drupal\views\Form\ViewsFormMainForm->buildForm(Array, Object, Object, Array) (Line: 169)
Drupal\views\Form\ViewsForm->buildForm(Array, Object, Object, Array)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder->retrieveForm('views_form_event_paragraphs_admin_page_1', Object) (Line: 271)
Drupal\Core\Form\FormBuilder->buildForm('views_form_event_paragraphs_admin_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)

Warning: array_diff(): Argument #2 is not an array in Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm->updateTempstoreData() (line 243 of modules/views_bulk_operations/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php).
Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm->updateTempstoreData() (Line: 528)
Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm->viewsForm(Array, Object) (Line: 60)
Drupal\views\Form\ViewsFormMainForm->buildForm(Array, Object, Object, Array) (Line: 169)
Drupal\views\Form\ViewsForm->buildForm(Array, Object, Object, Array)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder->retrieveForm('views_form_event_paragraphs_admin_page_1', Object) (Line: 271)
Drupal\Core\Form\FormBuilder->buildForm('views_form_event_paragraphs_admin_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)
Graber’s picture

Yes, just noticed.

The patch to #2941405: Incorrect selection behavior using grouped rows output Has solution of this issue included along with the notice fix.

Sorry for making a bit of a mess but dividing patches to those 2 different functionalities' fixes would be a bit troublesome when working on both issues and one codebase simultaneously.

ABaier’s picture

Status: Needs review » Reviewed & tested by the community

  • Graber committed cd44af9 on 8.x-2.x
    Fixed issues: #2941552, #2941405 and #2941602 by ABaier, skitten and...
Graber’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.