Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Usage of lockPostSaving() to lock the post editor prevents dismissing the ACF Blocks V3 expanded editor modal

Đang mở
#1,006 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

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
Lĩnh vực
frontend, web-dev

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:

  1. 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.
  2. Select an ACF block and click the "Open Expanded Editor" button to expand the ACF block form modal.
  3. 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
Image

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AdvancedCustomFields/acf

Tất cả issue của AdvancedCustomFields/acf

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.