When you save a file programmatically and add it to a file field with the file field path setting configured, the originale file uri doesn't get updated when the file uri is different from the file uri set in filefield_paths_filefield_paths_process_file.
I discovered this by creating a filename with a timestamp, because there was as slight difference in time between saving the file and saving the referencing entity, I think updating the file uri in filefield_paths_filefield_paths_process_file on the original file entity would solve this issue.
Issue fork filefield_paths-3477033
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #5
volegerIs this still relevant? Added a test to cover the provided scenario.