Bug description
If you upload a duplicate file into an Asset field, it will ask how you want to fix the conflict. If you select "Discard and use existing file", the field now references an incorrect text path, rather than loading in the existing asset. When you then try to save the entry, the validation fails as it can't find the asset.
How to reproduce
-
Attempt to upload a known duplicate file into an Asset field
-
Select "Discard and use existing file" from the Fix menu
- The asset is replaced with a text path, not the actual file
- Attempt to save the entry. A validation error will occur:
Asset [undefined::user.png] not found
Logs
Environment
Environment
Laravel Version: 13.16.1
PHP Version: 8.5.4
Composer Version: 2.9.8
Environment: local
Debug Mode: ENABLED
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: mysql
Logs: stack / single
Mail: log
Queue: sync
Session: file
Storage
public/storage: NOT LINKED
Statamic
Addons: 1
License Key: Not set
Sites: 2 (Statamic, Statamic 2)
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.21.0 PRO
Statamic Addons
statamic/eloquent-driver: 5.10.0
Statamic Eloquent Driver
Addon Settings: file
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: file
Collections: file
Entries: file
Fieldsets: file
Form Submissions: file
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Sites: file
Taxonomies: file
Terms: file
Tokens: file
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
Bug description
If you upload a duplicate file into an Asset field, it will ask how you want to fix the conflict. If you select "Discard and use existing file", the field now references an incorrect text path, rather than loading in the existing asset. When you then try to save the entry, the validation fails as it can't find the asset.
How to reproduce
Attempt to upload a known duplicate file into an Asset field
Select "Discard and use existing file" from the Fix menu
Asset [undefined::user.png] not foundLogs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response