Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

While replacing an asset with new file meta data get lost

Đang mở
#12,047 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
laravel, php
Lĩnh vực
backend

Hướng nghiên cứu

Start by tracing the asset replacement dialog through the save action and the code that writes asset metadata in the .meta folder; the issue does not name source files or tests. Reproduce the steps with an image that has custom metadata, replace it with a differently named image, and save with removal of the old image enabled. Done means the replacement retains the existing metadata in its new .meta YAML file.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

assets
Bug description

My users are facing the following problem:
If you replace an image, by uploading a new one with a different name, the metadata gets lost.

The editorsdesk would love to use the replacement feature from time to time, because after publishing an article they often find the need to modify/crop/change/whatever an image afterwards again. But as we use several custom metadata fields in the assets blueprint, (a11y, legal, copyright, stuff...) its quite annoying to upload the modified image a second time, to than fill out all theses fields and to then search/find the image in library to change it the article.

Using an image file with the same name is also not an option as mentioned here: #11229

How to reproduce
  • Upload an image to the library
  • Add some metadata to the image
  • Save the image
  • Look into the .meta folder -> old.jpg.yaml existing
  • Replace the image by uploading a new one using the replace-dialogue (do not click save yet)
  • Look into the .meta folder -> old.jpg.yaml and new.jpg.yaml existing
  • Save the image by clicking the Save button. (toggle remove old image is on )
  • Look into the .meta folder -> new.jpg.yaml existing
  • Look into the .meta/new.jpg.yaml file -> metadata are lost
Logs

Environment
Environment
Application Name: DAV
Laravel Version: 11.45.1
PHP Version: 8.3.23
Composer Version: 2.8.10
Environment: local
Debug Mode: ENABLED
URL: dav-av.ddev.site
Maintenance Mode: OFF
Timezone: Europe/Berlin
Locale: de

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: sync
Session: file

Statamic
Addons: 6
Sites: 3 (DAV, JDAV, JUBI)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.63.0 PRO

Statamic Addons
alpenverein/nginx-utility: dev-dev
el-schneider/statamic-auto-alt-text: 0.3.2
jacksleight/statamic-bard-mutator: 3.0.4
jonassiewertsen/statamic-external-link: 1.9.0
mitydigital/sitemapamic: 3.3.0
thehome/statamic-elasticsearch: dev-es8
Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Ngôn ngữ chính
PHP
Star
4.9k
Fork
647
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
102

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của statamic/cms

Tất cả issue của statamic/cms

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.