ACF image field crashes when selecting an image in WordPress 7.0
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, php, wordpress
调研方向
使用 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:
- Install ACF 6.7.1 on WordPress 7.0 beta 3
- Create a field group with an Image field assigned to post_type = product or post
- Open the product edit page and click the
Add Imagebutton - 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
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,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AdvancedCustomFields/acf 的其他 Issue
-
PHP 8.5: "Using null as an array offset" deprecation in ACF_Data::is() when rendering a block with empty data (local-meta.php is_request)可能已有人在做 @faisalahammad 于 15 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
AdvancedCustomFields/acf#1044 ·
-
is_preview was called incorrectly notice on every early get_field() since 6.8.10 (acf_revisions::acf_validate_post_id)可能已有人在做 @faisalahammad 于 15 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
AdvancedCustomFields/acf#1041 · 1 条评论 ·
-
True / False ACF control bug on RTL layouts可能已有人在做 @elicohenator 于 37 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
AdvancedCustomFields/acf#1038 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
AdvancedCustomFields/acf#1034 · 3 条评论 ·
-
Bug: class-acf-field-icon_picker.php calls wp_get_attachment_image_url() with string Dashicon slug, causing fatal TypeError on PHP 8+可能已有人在做 @antwonw 于 49 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
AdvancedCustomFields/acf#1032 · 1 条评论 ·
查看 AdvancedCustomFields/acf 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
MagnaCapax/PMSS#1206 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
backdrop-contrib/print#58 ·
-
Bug Status: Needs Triage
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复