Error on export when the File module is disabled

Created on 28 September 2021, about 3 years ago
Updated 22 March 2023, almost 2 years ago

At first; thank you for this awesome module! It saves me a lot of time when I have to create CSV exports.

Problem/Motivation

I ran into an error when I tried to export a bunch of entities to a CSV file without the File module enabled:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=6&op=do_nojs&op=do
StatusText: OK
ResponseText: Error: Call to undefined function Drupal\vbo_export\Plugin\Action\file_save_data() in Drupal\vbo_export\Plugin\Action\VboExportBase->sendToFile() (line 170 of /var/www/......./web/modules/contrib/vbo_export/src/Plugin/Action/VboExportBase.php).

The VboExportBase.php uses the file_save_data function from the File module. If the File module is disabled, this function is undefined.

Steps to reproduce

Export a random view result without the File module enabled.

Proposed resolution

Require the File module as a dependency.

Remaining tasks

Add the File module to the list of dependencies.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇳🇱Netherlands Ewout Goosmann

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024