- 🇵🇱Poland grzegorz@paniw.eu
I also struggled with this same problem, after upgrading from drupal 7 to drupal 9.52. Any idea how to solve this problem?
- Status changed to Postponed: needs info
almost 2 years ago 12:29pm 27 January 2023 - 🇵🇱Poland grzegorz@paniw.eu
Thanks for response, the extended information is:
Drupal\Core\File\Exception\InvalidStreamWrapperException: private://logo.png in Drupal\Core\File\FileUrlGenerator->doGenerateString() (line 112 of core/lib/Drupal/Core/File/FileUrlGenerator.php).
- 🇺🇸United States JGReidy
I was having this problem. Solved by properly setting up the private file system in settings.php with
$settings['file_private_path'] = '../someplace';
Details that may be related: I was moving a site and setting up s3fs at the same time. I had moved all the private:// stuff to S3. As with grzegorz the $uri causing the exception was private://bla_bla_bla. Once I made a private_files directory and pointed to it in settings.php, and cleared the caches, I got these messages:
* Warning: file_exists(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in Drupal\Component\FileSecurity\FileSecurity::writeFile() (line 155 of core/lib/Drupal/Component/FileSecurity/FileSecurity.php).
* Warning: file_exists(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in system_requirements() (line 714 of core/modules/system/system.install).
They appeared once. When I went to /admin/config/media/file-system I saw the 'Private file system path' I had set up, and these exceptions had cleared, and the S3 private files were working.
- Status changed to Closed: outdated
over 1 year ago 3:05am 14 July 2023 - 🇮🇳India Kaustab_Roy
I faced the same issue I Fixed it by adding this on settings.php
$settings['file_private_path'] = '../private/files';
Similar to #20 comment