TypeError: base64_decode(): Argument #1 ($string) must be of type string, array given in base64_decode() (line 521 of /var/www/html/web/core/modules/views/src/Plugin/views/field/BulkForm.php)

Created on 10 December 2023, 12 months ago
Updated 28 December 2023, 11 months ago

Problem/Motivation

The problem is described in this issue: VBO and Draggable views πŸ› VBO and Draggable views Closed: won't fix .

The reason for the problem is that both modules extend Drupal\views\Plugin\views\field\BulkForm class.
So, when the user hits the submit button for VBO operation, it uses Drupal\views\Form\ViewsFormMainForm
::submitForm() method that applies Drupal\views\Plugin\views\field\BulkForm::viewsFormSubmit() which produced an error in the case of Draggable views.

The error happens because VBO encodes data about the updated entity by base64, but the Draggable views module doesn't do. Hence, Drupal\views\Plugin\views\field\BulkForm::loadEntityFromBulkFormKey gets an array instead of a string.

Proposed resolution

I believe that the best way to fix the problem is to override the viewsFormSubmit
method in Drupal\draggableviews\Plugin\views\field\DraggableViewsField class.

πŸ› Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine _tarik_ Lutsk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024