Usage of lockPostSaving() to lock the post editor prevents dismissing the ACF Blocks V3 expanded editor modal
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript, php
Hướng nghiên cứu
Tái hiện vấn đề với dispatch lockPostSaving() đã được ghi nhận và một modal trình chỉnh sửa mở rộng của ACF Blocks V3. Bắt đầu bằng cách lần theo quá trình tích hợp modal ACF Blocks V3 và cách nó xử lý khóa trình chỉnh sửa WordPress; hoàn tất khi có thể đóng modal trong khi việc lưu bài viết vẫn bị khóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
In our custom block work, we lock post saving when certain required fields are empty using lockPostSaving() like so:
dispatch('core/editor').lockPostSaving('our-theme-custom-lock-id');
This causes the ACF block V3 expanded modal to lock, preventing dismissal.
To Reproduce
Steps to reproduce the behavior:
- Add editor JS to lock the post editor using a custom lock, or try this in the browser console with the WP editor open:
window.wp.data.dispatch('core/editor').lockPostSaving('my-example-lock-id');. This should lock post saving/publishing. - Select an ACF block and click the "Open Expanded Editor" button to expand the ACF block form modal.
- Attempt to click the modal dismiss button labeled "done" or otherwise attempt to dismiss and close the modal to return to the editor.
Expected behavior
We would expect that locking post saving does not lock the ACF expanded edit modal, and that this modal is dismissible even if post saving is locked. This issue prevents users from closing the modal and addressing anything else in the editor.
Screenshots or Video
Code
Relevant example block.json below. I found that no fields need to be registered to the block. The modal cannot be dismissed regardless of the block's registered fields.
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"title": "Example Block",
"textdomain": "my-custom-domain",
"name": "myplugin/myblockname",
"icon": "feedback",
"category": "text",
"acf": {
"blockVersion": 3,
"renderTemplate": "template.php"
},
"style": "file:./style.min.css"
}
Version Information:
- WP version 6.9.4
- PHP version 8.4
- ACF Pro 6.7.1
- Ngôn ngữ chính
- PHP
- Star
- 946
- Fork
- 197
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AdvancedCustomFields/acf
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AdvancedCustomFields/acf#1041 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
AdvancedCustomFields/acf#1038 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AdvancedCustomFields/acf#1034 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
AdvancedCustomFields/acf#1032 · 1 bình luận ·
-
Drop trap, acf_after_titleĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AdvancedCustomFields/acf#1029 · 1 bình luận ·
Tất cả issue của AdvancedCustomFields/acf
Issue tương tự
-
UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ProfessionalWiki/NeoWiki#1573 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày