Come for the code, stay for the community

File (Field) Paths

Warning when uploading photos

When creating a photo via the photos listing, and error is thrown.

Warning: file_upload_options_filefield_paths_process_file(): Argument #3 ($settings) must be passed by reference, value given in Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (line 416 of core/lib/Drupal/Core/Extension/ModuleHandler.php).

This doesn't break anything, but causes confusion.

The patch in the issue doesn't fix it, neither does running the update code.

Make collection images private

Uploaded images can be viewed by anyone, despite using Shield to protect the site.

How to use private files for images, and move existing images?

Analysis

I incorrectly had File FIeld Paths as private://2025-11

Resolution

Reset path to 2025-11.

Set Upload destination field property to private.

Use retroactive setting to fix file paths.

Removed anonymous permission to view all media revisions for Photo, which seemed to be related.