Link fieldtype allows multiple assets per drag and drop
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Reproduce the issue in a fresh Statamic installation by adding a link fieldtype to a blueprint and dropping multiple images into its upload area. Compare its behavior and save-time validation with an asset fieldtype configured with max_items set to 1. Done means the link field handles multiple dropped assets consistently with the asset fieldtype; the issue does not specify which behavior should be preferred.
索引モデルが issue の本文から書いたものです。
説明
Bug description
When adding multiple assets per drag and drop to a link field, it keeps all three instead of just one. After saving there's only one left. The asset fieldtype (with max_items set to 1) also allows that, but throws a validaton error on save, so editors have a little more control over which assets they need to delete.
There are kind of two minor bugs in this issue: The behaviour of being able to upload multiple assets into the asset fields and the different behaviour of validation of the asset fieldtype component and the link asset component. Both are confusing for editors, but I think having the same validation with both components would already help a lot. I can open another issue if that's better.
Here's a screen recording of the behaviour of the link asset component:
https://github.com/user-attachments/assets/a736b359-f369-428d-97eb-c0261dc3f8b2
How to reproduce
- Set up a fresh Statamic
- Add a link fieldtype to any blueprint
- Drag and drop multiple images into the upload area
Logs
Environment
Environment
Application Name: Statamic
Laravel Version: 12.21.0
PHP Version: 8.3.13
Composer Version: 2.8.4
Environment: local
Debug Mode: ENABLED
URL: testsystem-2025-08.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
Storage
public/storage: NOT LINKED
Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.63.0 PRO
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
- 主要言語
- PHP
- スター
- 4.9k
- フォーク
- 647
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 102
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
statamic/cms のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
assets
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
accessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
antlers
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
backend bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
smarty-php/smarty#1215 ·