There are no checkboxes when the views_selective_filters filter is added.

Created on 23 August 2024, 3 months ago
Updated 27 August 2024, 3 months ago

Problem/Motivation

Hi!
After adding exposed filter by using views_selective_filters, the checkboxes are gone away.
I've found old issue β†’ , but it can be different bug. There are no errors in logs. I've debugged code and found that after adding the exposed selective filter, the $entity_data = $this->viewData->getViewEntityData(); is empty in ViewsBulkOperationsBulkForm::viewsForm().

Any ideas how to fix that?

Thanks!

πŸ› Bug report
Status

Active

Version

4.2

Component

Core

Created by

πŸ‡ΊπŸ‡¦Ukraine khiminrm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @khiminrm
  • πŸ‡ΊπŸ‡¦Ukraine khiminrm

    I think I've found some draft solution on local test site. Improve condition in ViewsBulkOperationsBulkForm::init():

        // Don't initialize if view has been built from VBO action processor.
        if (!empty($this->view->views_bulk_operations_processor_built) || !empty($this->view->selective_handler_signature)) {
          return;
        }

    So we need somehow remove VBO field from $view_copy before executing it in Drupal\views_selective_filters\Plugin\views\filter\Selective::getOids().

    Any ideas how it would be better to do?

    Thanks!

  • πŸ‡ΊπŸ‡¦Ukraine khiminrm

    I see that VBO field is already deleted before executing $view_copy.
    Maybe we can introduce some new view property e.g. do_not_init_vbo_form so other modules like views_selective_filters can use it?

    and we could have condition like?

       // Don't initialize if view has been built from VBO action processor or other modules which do need to init VBO form.
        if (!empty($this->view->views_bulk_operations_processor_built) || !empty($this->view->do_not_init_vbo_form)) {
          return;
        }
    
    
  • I can confirm the same issue.

    Adding a exposed filter using views_selective_filters β†’ module the checkboxes are not shown.

    Did you found a solution yet?

Production build 0.71.5 2024