Error when clicking on unmanaged for multi site setup

Created on 28 September 2021, almost 3 years ago
Updated 17 April 2024, 2 months ago

when clicking on unmanaged tab:

UnexpectedValueException: RecursiveDirectoryIterator::__construct(sites/default/files): failed to open dir: No such file or directory in RecursiveDirectoryIterator->__construct() (line 243 of modules/contrib/fancy_file_delete/src/UnmanagedFilesService.php).

I am having a mutisites architecture and the files are on each sites/site/files or sites/site/private folder

it seems like the module does not look in the right place

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France matoeil

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.

  • πŸ‡¬πŸ‡§United Kingdom darren.fisher

    I've also just attempted to use this on a multi-site (multsite) setup and can confirm that this is still an issue. I will look at the code and see if there's a way to check all subfolders in the /sites directory.

  • πŸ‡¬πŸ‡§United Kingdom darren.fisher

    This issue is in src/UnmanagedFilesService.php on line 173 where:
    $public_dir = $this->state->get('file_public_path', 'sites/default/files');
    is declared. This would need to be done in a loop for all subdirectories - eg. /sites/*/files

    Alternatively there could be an admin screen that allows us to specify which files directories we want to search in that then gets saved as an array variable that can be looped through in this code.

  • πŸ‡¬πŸ‡§United Kingdom darren.fisher
Production build 0.69.0 2024