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

ACF image field crashes when selecting an image in WordPress 7.0

未关闭
#1,003 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
领域
frontend, web-dev

调研方向

使用 WordPress 7.0 beta 3 和 ACF 6.7.1 在产品或文章编辑页面重现该故障,然后检查 acf-input.min.js 中与 customizeFilters 对应的 ACF 代码,以及堆栈跟踪中显示的媒体选择器事件。媒体选择器能够在不出现未定义属性错误的情况下打开,并允许上传或选择图像,即表示完成。

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

描述

Describe the bug
When clicking the image picker button, it throws this error on the console:

Uncaught TypeError: Cannot read properties of undefined (reading 'all')
    at n.customizeFilters (acf-input.min.js?ver=6.7.1:871:49)
    at h.Collection.<anonymous> (acf-input.min.js?ver=6.7.1:863:60)
    at p (backbone.min.js?ver=1.6.1:2:3644)
    at f (backbone.min.js?ver=1.6.1:2:3497)
    at a (backbone.min.js?ver=1.6.1:2:692)
    at e.trigger (backbone.min.js?ver=1.6.1:2:3380)
    at StateMachine.<computed> [as trigger] (media-views.js?ver=7.0-beta3:6951:25)
    at Region.trigger (media-views.js?ver=7.0-beta3:10408:21)
    at Region.mode (media-views.js?ver=7.0-beta3:10310:8)
    at Region.render (media-views.js?ver=7.0-beta3:10328:16)

To Reproduce
Steps to reproduce the behavior:

  1. Install ACF 6.7.1 on WordPress 7.0 beta 3
  2. Create a field group with an Image field assigned to post_type = product or post
  3. Open the product edit page and click the Add Image button
  4. See the error thrown immediately, and you cannot select the image

Expected behavior

  • The media picker should be shown
  • Able to upload or select an image

Screenshots or Video
X

Code

acf-export-2026-03-10.json

Version Information:

  • WordPress Version 7.0 beta 3
  • PHP Version 8.4.1
  • ACF Version ACF Free 6.7.1
  • Browser [Brave]

Additional context
X

主要语言
PHP
星标
947
派生
198
PR 合并指标
30 天内没有已合并 PR

环境准备

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

从这里开始

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

AdvancedCustomFields/acf 的其他 Issue

查看 AdvancedCustomFields/acf 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

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