Drupal 8.9.6. The status is still temporary even though the file is in use

Command icon 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

fm365pl created an issue. See original summary.

Milosavlevski’s picture

StatusFileSize
new588 bytes

Looks like a race condition, $file->save() is called within file_move() while file's status is still temporary.

fm365pl’s picture

Thank you very much. It works.

miiimooo’s picture

Version: 8.x-1.0-beta2 » 8.x-1.0-beta8
Status: Active » Reviewed & tested by the community

+1 for committing this - also see #3415187: File is renamed but is Temporary (Pantheon Live Environments)

Tested with Drupal 10.4 and filefield_paths 1.0.0-beta8

Many thanks @Milosavlevski

jstoller made their first commit to this issue’s fork.

jstoller’s picture

StatusFileSize
new622 bytes

Here's an updated patch for 8.x-1.0-beta8. The original wouldn't apply.

jstoller’s picture

Version: 8.x-1.0-beta8 » 8.x-1.x-dev

Merge request created against 8.x-1.x-dev.

voleger’s picture

Status: Reviewed & tested by the community » Fixed

Fixed, thanks. Will be added in the next release.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • jstoller committed 17221d49 on 8.x-1.x
    Issue #3175118 by Milosavlevski, miiimooo, jstoller: The status of the...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.