S3FS Compatability fixes

Created on 18 June 2024, 7 months ago
Updated 6 July 2024, 7 months ago

Problem/Motivation

When using s3fs for a file system, this error occurs.

ValueError: Path cannot be empty in fopen() (line 405 of /app/web/modules/contrib/csvfile_formatter/src/Plugin/Field/FieldFormatter/CSVFileFormatter.php).

Proposed resolution

I think this error is occuring because realpath does not work with s3fs. realpath is also generally discouraged per comments in realpath method call.

replace

$file_name = $this->getFileSystem()->realpath($file->get('uri')->value);

with

$file_name = $file->getFileUri();
πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States thhafner Chicago, IL

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