Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Assets field: Discard and use existing file issue

オープン
#15,556 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
laravel, php
領域
backend

調査の方向性

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 の本文から書いたものです。

説明

assets fieldtypes
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:
Image

After choosing 'Discard and use existing file' this happens (note the generic icon and strange path / usually a PDF icon is shown):
Image

Then when clicking 'Save & Publish' this happens:
Image

How to reproduce
  1. Set up an assets field
  2. Update a file that already exists.
  3. Choose discard and use existing file
  4. 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日 19時間
マージ済み PR(30日)
108

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

statamic/cms のほかの issue

statamic/cms の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。