CP requests a missing font: intervariable-italic.woff2 404s (file is named intervariable-Italic.woff2)
维护者通常 1 天内回复
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- css, vite
- 领域
- build-system, frontend
调研方向
从 resources/css/core/fonts.css 开始,斜体 @font-face 的 src 指向 intervariable-italic.woff2,然后将它与实际文件 resources/fonts/inter/intervariable-Italic.woff2 进行比较。重命名文件或修改 CSS 中的引用,使名称完全一致。完成标准是:Vite 发布构建不再为斜体字体打印 'didn't resolve at build time' 警告,并且 CP 请求斜体字体时返回 200 而不是 404。
由索引模型根据 Issue 内容生成。
描述
Bug description
Every control panel page requests /vendor/statamic/cp/build/fonts/inter/intervariable-italic.woff2?v=4.1, which answers 404.
resources/css/core/fonts.css references the italic face in lowercase:
src: url("../../fonts/inter/intervariable-italic.woff2?v=4.1") format("woff2");
but the file is resources/fonts/inter/intervariable-Italic.woff2, with a capital I. The upright face (intervariable.woff2) matches and is bundled (build/assets/intervariable-DiVDrmQJ.woff2). The italic one is not: the built CSS keeps the unresolved relative URL ../fonts/inter/intervariable-italic.woff2, and no build/fonts/ folder is shipped. The CP's italic text falls back to a synthesised slant.
The release build shows it: Vite can't find the file on the case-sensitive Ubuntu runner and leaves the URL unresolved. From the v6.35.1 release run (job log, "Build release assets"), once for dist and once for dist-dev:
../fonts/inter/intervariable-italic.woff2?v=4.1 referenced in ../fonts/inter/intervariable-italic.woff2?v=4.1 didn't resolve at build time, it will remain unchanged to be resolved at runtime
The v6.30.0 release run has the same warnings, so this has been broken since at least 6.30.
Fix: rename the font to lowercase, or point the CSS at intervariable-Italic.woff2. Happy to send a PR.
How to reproduce
- Install Statamic 6.35.1 and open any CP page.
- DevTools → Network:
intervariable-italic.woff2?v=4.1answers 404. resources/dist/build/assets/app-*.csscontainsurl(../fonts/inter/intervariable-italic.woff2?v=4.1).
Logs
GET https://example.test/vendor/statamic/cp/build/fonts/inter/intervariable-italic.woff2?v=4.1 net::ERR_ABORTED 404 (Not Found)
Environment
Statamic 6.35.1 PRO
Laravel 13.35.0
PHP 8.5.10
Installation
Existing Laravel app
- 主要语言
- PHP
- 星标
- 4.9k
- 派生
- 647
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 117
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
statamic/cms 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
accessibility
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
[7.x] Reintroduce parser error for mixed pipe/shorthand modifier syntax可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭antlers
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
caching nocache
难度 3/5 1-2 天 新手友好度 42/100
维护者通常 1 天内回复
-
navigations
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 1 天内回复
相似的 Issue
-
Awaiting Triage enhancement / feature request
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
macOS
难度 2/5 1-3 小时 新手友好度 76/100
beyondcode/herd-community#1774 ·
-
Successful AUTHORISATION for a transaction already set to "failed" is marked done without paying it未关闭
难度 2/5 1-3 小时 新手友好度 76/100
Adyen/adyen-shopware6#895 ·
维护者通常 1 天内回复
-
not confirmed
难度 2/5 1-3 小时 新手友好度 63/100
维护者通常 1 天内回复