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

Assets browser in a refresh loop when running `dev` and having CP js/css

Đang mở
#13,158 16 bình luận 0 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php, vite
Lĩnh vực
tooling

Hướng nghiên cứu

Start by reproducing the reported steps on Statamic 6 a17 with the Stache Watcher enabled, first using npm run dev and then comparing with a build. The issue names no source files or tests, so trace what changes when visiting Assets and saving an Entry, including the reported user-saved event and watched CP resources. Done means the Assets page no longer refreshes repeatedly in the dev setup while still loading CP assets correctly.

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

Mô tả

can't recreate
Bug description

Content warning: flickering in video

Oh another fun one that is odd to replicate.

When running rpm run dev on a site which has CP assets (i.e. a Bard addon, CP css, etc), when you visit Assets, you can be stuck in a refresh loop.

https://github.com/user-attachments/assets/ba374f05-b5ef-4097-96e3-4f2725776f1f

If you run npm run build, the issue is not present.

If you browse the Assets (after build), and then re-run dev, the issue is not present.

If you re-run dev, then save an Entry, the issue comes back.

It is like something is updating something else that is being watched which is triggering the refresh on loop - perhaps the Stache and asset metadata or something of the like?

I've got two Statamic 6 sites set up, one exhibits the behaviour with these steps reliably, the other doesn't.

For the one that doesn't, I've got our "Logger" addon installed, and can see that when I load Assets, every time, I get an event that the User is saved. Could it be that Assets loads, saves the user, but then the file watcher sees the user change so Vite causes a refresh?

How to reproduce
  1. Statamic 6 a17
  2. Add some CP resources (such as a Bard addon, CP css, etc)
  3. Run npm run dev and ensure the CP is loading correctly
  4. Add some Assets to your container
  5. Create an Entry, and Save
  6. Go to Assets in the side nav

This can start the refresh loop.

Logs

Environment
Statamic 6 a17

Of note:
Stache Watcher: Enabled (auto)
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 7 giờ
Pull request đã merge (30 ngày)
103

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.