Fields array getting unset if just one field has a private uri_scheme

Created on 5 May 2023, over 1 year ago
Updated 7 May 2023, over 1 year ago

When checking to see if a file should be moved to public storage, an array of fields is being created on line 394 of HandlerService.php, the array loops through and checks each fields uri_scheme. If just one of those fields has a private uri_scheme then the whole array is being unset preventing the fields from proceeding through the method.

For example, on a current project, my when publishing a document media entity, there are two fields being set in that array. A thumbnail field and the actual file field. The thumbnail field has a private uri_scheme and the actual file field has a public uri_scheme. The thumbnail field causes the fields array to become unset so the actual file field never gets processed and the file doesn't move to the public directory as I would expect.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jecunningham2281

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

Production build 0.71.5 2024