The external URLs are not shown in the display file list

Created on 24 January 2023, almost 2 years ago
Updated 14 February 2023, almost 2 years ago

Problem/Motivation

Hi @clivesj Thank you for revising the 3254557 patch and adding it into 3.1.x branch.

There is a logic condition bug in /src/File/DisplayFileList.php. So the external url of the Ad hoc public path is not shown up.

Steps to reproduce

Proposed resolution

diff --git a/src/File/DisplayFileList.php b/src/File/DisplayFileList.php
index b004904..1abf0ed 100644
--- a/src/File/DisplayFileList.php
+++ b/src/File/DisplayFileList.php
@@ -362,7 +362,7 @@ class DisplayFileList extends ControllerBase {
     }
     else {
       $settings = $this->filebrowser;
-      if ($settings->downloadManager == 'server') {
+      if ($settings->downloadManager == 'public') {
         $file_uri = $this->filebrowser->folderPath . $file->relativePath;
         $stream_wrapper = \Drupal::service('stream_wrapper_manager')
           ->getViaUri($file_uri);

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.1

Component

Directory Listing Pages

Created by

🇨🇦Canada jamesyao

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

Comments & Activities

Production build 0.71.5 2024