- First commit to issue fork.
I have a migrate script routine that sets file references for several nodes. I was finding that the paths to these files were not matching up with the path settings that I had configured on the file field. It turned out to be an issue with the call to file_prepare_directory(). In my case, the destination directory had already existed, but I was receiving this error:
[notice] The file public://private/press_release/additional/5-steps-cert-dev-exam_0_0.pdf could not be moved to the destination of public://private/press_release/additional/5-steps-cert-dev-exam_0_0.pdf. Ensure your permissions are set correctly.
Note: The log message doesn't display the destination directory -- a patch has been submitted for that here: Logger does not record new file destination on failed move →
I don't think this is an issue with my system's file permissions, because files were being placed in the expected directory when I was attaching files manually (via the node form).
Needs work
1.0
Code
The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.