Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Block without Editable Fields and without edit mode disabled still has Edit icon in toolbar when using Block API v3

オープン
#1,002 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
php, wordpress
領域
frontend, web-dev

調査の方向性

field groups がなく、acf.mode が preview に設定され、supports.mode が false に設定されたブロックで、まず問題を再現します。次に Block API v3 toolbar と v2 を比較し、fix が完了したときに v3 toolbar に Edit icon が表示されないことを確認します。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug
A block without editable fields, and told to always be in preview mode, still has the Edit icon in its Block Toolbar when using Block API v3 (but not v2)

To Reproduce
Steps to reproduce the behavior:

  1. Create a block without any field groups assigned to it
  2. In its block.json, set acf:mode = preview, and set supports:mode = false
  3. Insert the block on a Post
  4. See that its toolbar has an Edit icon when using V3 of the Block API (but not if using V2)

Expected behavior
No Edit icon is present in the block toolbar.

Screenshots or Video
Image

Code
`{
"name": "acf/ext-social-share-links",
"title": "Social Share Links",
"description": "Social Sharing Links",
"style": "file:./css/ext-social-share.css",
"icon": "share-alt2",
"category": "widgets",
"keywords": ["social", "share", "twitter", "facebook"],
"acf": {
"mode": "preview",
"renderTemplate": "block_template.php"
},
"supports": {

    "align": false,
    "alignText": true,
    "color": {
        "background": true,
        "text": true,
        "link": true
    },
    "jsx": false,
    "mode": false,
    "spacing": {
        "blockGap": false,
        "margin": [
            "top",
            "bottom"
        ],
        "padding": true
    }
},
"example": {
    "attributes": {
        "mode": "preview",
        "data": {
            "ext_acf_block_preview": 1
        }
    }
}

}`

Version Information:

  • WordPress Version 6.9.1
  • PHP Version 8.3.30
  • ACF Version 6.7.1
  • Browser Chrome 145.0.7632.160
主要言語
PHP
スター
948
フォーク
198
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AdvancedCustomFields/acf のほかの issue

AdvancedCustomFields/acf の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。