non core block: layout-shell@a[data-testid][href][target]

クローズ
#4,888 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #4904 @chubes4 による — マージ済み

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
46/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php, wordpress
領域
backend

調査の方向性

Start with the reduced HTML and reproduce the finding using the provided predicate command from the specified static-site-importer and blocks-engine checkouts. Trace how the PHP transformer handles the generated link inside the logo wrapper and why it emits a non-core block. Done means the content uses core blocks, renders as before, and passes the importer's pixel parity gate; the issue does not identify specific transformer files or tests.

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

説明

Finding

editability/non_core_block on layout-shell@a[data-testid][href][target], seen in 2 route/width cell(s) of an imported site:

route width evidence
/about/ 1440 {"route":"/about/","count":1,"of":129}
/ 1440 {"route":"/","count":1,"of":339}

Reduced page (425 bytes)

Reduced from 448939 bytes in 159 predicate calls.

<!DOCTYPE html><html><head><style>#main_MF :where(.comp-dla5b7368da_r_comp-mmc8u23k) { min-height: 0px; }</style></head><body><div id="main_MF"><div class="logo-wrapper _logo_ackza_1 builder-root builder-root comp-dla5b7368da_r_comp-mmc8u23k"><a data-testid="linkElement" href="/index.html" target="_self"><wow-image><img src="/media/c837a6_1f682fef9fae4fe6974f26e1d8173148-mv2.png"></wow-image></a></div></div></body></html>

Reproduce

The predicate exits 0 while the defect reproduces (checked against blocks-engine trunk a06112e4). Run it from a static-site-importer checkout at 8b698851, with the reduced page saved as reduced.html:

PREDICATE_TARGET='{"subject":"layout-shell@a[data-testid][href][target]","route":"/about/","width":1440,"evidence":{"route":"/about/","count":1,"of":129}}' \
  WORDPRESS_PATH=<wordpress with static-site-importer active> WP_CLI='studio wp' \
  node tools/import-loop/predicates/non_core_block.mjs <blocks-engine>/php-transformer reduced.html
predicates/non_core_block.mjs
// Exit 0 while the Blocks Engine output of a page still emits the generated
// block <prefix>/<subject>, a block outside WordPress core. An editor can only
// change its structure through the importer's own block, not with core tools.
// The defect is gone when the same content is built from core blocks and the
// page renders exactly as before; the acceptance gate holds the whole import to
// pixel parity (see emits.mjs, gates/collateral.mjs).
import { exitWhileEmitted } from './emits.mjs';
exitWhileEmitted();

Loop signature: 9022a2491a6e


AI disclosure: filed by the static-site import findings loop (Homeboy workflow on the Lab). The finding, reduction, and body are generated by deterministic scripts; Claude (Anthropic) wrote those scripts with Chris Huber.

主要言語
PHP
スター
25
フォーク
3
平均マージ
2時間 20分
マージ済み PR(30日)
934

環境構築

はじめの一歩

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

Automattic/blocks-engine のほかの issue

Automattic/blocks-engine の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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