Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,002 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
php, wordpress
Ambito
frontend, web-dev

Direzione di ricerca

Inizia riproducendo il problema con un blocco che non ha field groups, con acf.mode impostato su preview e supports.mode impostato su false. Confronta la Block API v3 toolbar con quella della v2, quindi verifica che l’Edit icon sia assente dalla v3 toolbar quando il fix è completo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
PHP
Stelle
946
Fork
197
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AdvancedCustomFields/acf

Tutte le issue di AdvancedCustomFields/acf

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.