[3.x]: Files are lost (deleted) after moving a folder in Assets
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
We have Assets connected to an S3 bucket. When we move a folder with a large number of files (approx 2000), not all the files are relocated. Instead, some "go missing" (i.e. are deleted) once the process is complete. This does not happen when the folder has a smaller number of files (i.e. 10).
Steps to reproduce
- Start with a folder which contains 2000 files
- Move the folder somewhere else (i.e. into another folder)
- Look at how many files are left; it should be less than 2000
Expected behavior
No files are lost after moving the folder.
Actual behavior
Files are lost (i.e deleted) after moving the folder.
Craft CMS version
3.8.16
PHP version
8.0.30
Operating system and version
Linux 4.4.0-1128-aws
Database type and version
MySQL 8.0.28
Image driver and version
GD 8.0.30
Installed plugins and versions
Amazon S3 1.3.2
Asset Usage 2.3.1
Chunked File Uploads 1.1.1
CP Field Inspect 1.4.4
Embedded Assets 2.11.4
Environment Label 3.2.0
Feed Me 4.7.0
ImageOptimize 1.6.51
Queue Manager 1.2.0
Redactor 2.10.12
Restrict Asset Delete 2.0.0
Retcon 2.7.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the move in Assets with an S3 bucket and about 2,000 files, comparing the result with a smaller folder. Trace the asset-folder move and S3 integration paths, then verify that every file remains available at its new location without deletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, php
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100