Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset removed if you replace with same file and "Delete Original" is on, which is the default #11229

Open
edalzell opened this issue Dec 6, 2024 · 0 comments
Labels

Comments

@edalzell
Copy link
Contributor

edalzell commented Dec 6, 2024

Bug description

If you try to replace an asset with a file with the exact same name and the Delete Original Asset is on, which is the default, the image is actually removed.

CleanShot 2024-12-06 at 13 35 33@2x

How to reproduce

  1. Install fresh Statamic site with super user
  2. Open Asset listing
  3. Upload a file
  4. Click on the asset and choose Replace
  5. Upload the same file
  6. Click 'Fix...'
  7. Choose Overwrite Existing File
  8. Note the error toasts you see
  9. Click Replace Asset
  10. Notice there's now no assets in the container.

I would expect the file to be there.

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 11.34.2
PHP Version: 8.3.14
Composer Version: 2.8.3
Environment: local
Debug Mode: ENABLED
URL: asset-replacing.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.42.0 Solo

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants