Problem/Motivation

When Filebrowser module is installed, it creates a filebrowser:// stream. This goes to 2 problems :

- In admin/config/media/file-system it automatically adds a new option to the default download method, this option has the same name as the public:// stream, say "Public local files served by the webserver.". This make confusion for the user who does'nt know what is the difference between these two options.
- The stream filebrowser:// point towards to [d8_installation_path]/modules/contrib/filebrowser, it's not a goog idea to put public files in a module directory, it can be erased after a module update.
- There's no way to modify the base path of this stream, see Drupal\filebrowser\FilebrowserStream::basePath

Proposed resolution

- In the actual state of the Filebrowser module, I think there is no use of this stream, so it can be deleted to avoid confusion.
Or
- Add a getName() and a getDescription() method to the Drupal\filebrowser\FilebrowserStream so the user can distinguish Public stream and Filebrowser stream in the UI.
- Modify the basePath method, instead of returning drupal_get_path("module", "filebrowser"), return the value of $settings['file_filebrowser_path'] = 'foo/bar/path'; in settings.php (or whatever config option), if this entry is not present, return the default public path "sites/default/files"

Comments

EnzoFr created an issue. See original summary.

EnzoFr’s picture

Issue summary: View changes

  • clivesj committed 405fb4b on 8.x-2.x
    Issue #3090114 by EnzoFr: Remove or complete the filebrowser stream...
  • clivesj committed 869645a on 8.x-2.x
    Issue #3090114 by EnzoFr: Remove or complete the filebrowser stream...
clivesj’s picture

Status: Active » Fixed

I couldnt recall what it was used for but quickly realised when I deleted it. :)
Fixed now, Thanks

EnzoFr’s picture

Ok, thank you clivesj. Do you know when this will be integrated to a stable release ?

clivesj’s picture

I am planning for a stable release around the 3th week of November

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

lpsolit’s picture

I don't know if this issue is responsible for filebrowser to no longer work with Drupal 8.8.0, but all directories are now empty, and the following warning is thrown:

Warning : Declaration of Drupal\filebrowser\FilebrowserStream\FilebrowserStream::basePath(?SplString $site_path = NULL) should be compatible with Drupal\Core\StreamWrapper\PublicStream::basePath($site_path = NULL) in require()

Could a new version of filebrowser be released asap so that it works again with Drupal 8.8.0, please?

clivesj’s picture

LpSoli..

Does it work on Drupal 8.7.x?
I do not see any change in core that would introduce a problem, but I m not in the position now to do a thorough investigation.

The change in this issue is not yet in stable FB 8.x-2.0 so this version should not be affected.

lpsolit’s picture

OK, it looks like I misconfigured something when importing a backup, which explains why my directories were all empty. My fault, sorry!

I applied your commit 405fb4b to my system, and now the warning mentioned in comment #8 is gone. Nice job!

jcisio’s picture