White screen when trying to bulk unpublish

Created on 29 September 2023, over 1 year ago

Get this error TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 1026 of /home/public_html/live/website.co/modules/views_bulk_operations/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php)

When trying to bulk unpublish/publish on the content page of the admin area.

🐛 Bug report
Status

Active

Version

4.2

Component

Core

Created by

🇬🇧United Kingdom effortDee

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

Comments & Activities

  • Issue created by @effortDee
  • Status changed to Postponed: needs info over 1 year ago
  • 🇵🇱Poland Graber

    This normally does not happen. Please start from a clean Drupal instance with VBO and provide steps to reproduce.

  • Status changed to Active over 1 year ago
  • 🇦🇺Australia mstrelan

    Steps to reproduce:

    • Install Drupal 10.2.x with standard profile
    • Install VBO module
    • Edit content view at /admin/structure/views/view/content
    • Add views bulk operations to the table
    • Create one node
    • Attempt to delete the node via vbo
  • 🇦🇺Australia mstrelan

    FWIW the issue seems to be that we need to delete the default "Node bulk operation form" from core. This could be "works as designed" but maybe we could detect the problem and prevent the WSOD?

  • 🇵🇱Poland Graber

    Well it doesn't make any sense to have both fields on any view.
    We could add a warning message and disallow saving the view as already done in core in case of some other configurations.

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    15 pass
  • 🇵🇱Poland ad0z

    @Graber I've attached patch which adds validate function to views_bulk_operations_bulk_form ViewsField. It prevents view to be saved when VBO's and core's operations are added in the same view display, it shows this error message when one of them is added, and another one is there already as well.

    • graber committed ef8f419f on 4.3.x
      Issue #3390613 by ad0z, mstrelan, graber, effortdee: Notify when both...
  • 🇵🇱Poland Graber

    Pushed, Thank you!

Production build 0.71.5 2024