Assets field: Discard and use existing file issue
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #15716 来自 @mynetx —— 已合并
评估
调研方向
Start at the assets field's upload/update handling and trace what happens when choosing “Discard and use existing file.” Reproduce the issue with an existing file and the reported assets-field setup, then inspect the related tests. Done means the existing file is shown correctly and the entry saves without the reported error.
由索引模型根据 Issue 内容生成。
描述
Bug description
I've noticed this problem on multiple projects recently.
If I have an assets field and try to upload an existing file then a message is displayed as expected:
After choosing 'Discard and use existing file' this happens (note the generic icon and strange path / usually a PDF icon is shown):
Then when clicking 'Save & Publish' this happens:
How to reproduce
- Set up an assets field
- Update a file that already exists.
- Choose discard and use existing file
- Save the entry.
Logs
Environment
Environment
Laravel Version: 13.33.0
PHP Version: 8.4.24
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: Europe/Dublin
Locale: en_IE
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: database
Session: file
Storage
J:\webdev\herd\mywebsite\public\storage: NOT LINKED
Livewire
Livewire: v4.4.6
Statamic
Addons: 4
License Key: Not set
Sites: 2 (mywebsite.ie, mywebsite.co.uk)
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.34.1 PRO
Statamic Addons
alt-design/alt-cookies: 1.3.1-alpha
marcorieser/statamic-livewire: 5.3.4
spatie/statamic-responsive-images: 6.2.0
stuartcusackie/statamic-cache-requester: 1.3.2
Installation
Existing Laravel app
Additional details
Based on the error message, my best guess is that the root of the filesystem is not being handled correctly by the assets field, i.e. 'root' => 'public_downloads'
- 主要语言
- PHP
- 星标
- 4.9k
- 派生
- 647
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 148
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
statamic/cms 的其他 Issue
-
modifiers
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
accessibility
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
[7.x] Reintroduce parser error for mixed pipe/shorthand modifier syntax可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭antlers
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 78/100
PrestaShopCorp/ps_accounts#677 ·
-
bug webbackend
难度 2/5 1-3 小时 新手友好度 74/100
DOMjudge/domjudge#3886 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
opensourcepos/opensourcepos#4794 ·
维护者通常 1 天内回复
-
repo:cms
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复