Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#13,158 16 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
php, vite
领域
tooling

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
PHP
星标
4.9k
派生
647
平均合并
1 天 20 小时
30 天内合并 PR
113

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

statamic/cms 的其他 Issue

查看 statamic/cms 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。