Footer containing a form is not extracted as a shared template part in device-split captures (shell retained: incomplete)

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php, wordpress
領域
backend, web-dev

調査の方向性

Start in ShellExtraction.php near line 1737, where an empty footer cluster list produces the incomplete diagnostic. Compare how the reduced fixture’s footer candidates are filtered with and without the form, checking route specific form actions and per device control IDs as the issue suggests. Confirm which detail disqualifies the candidates, then verify equivalent device split footers with forms produce one referenced footer part across the templates.

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

説明

Summary

A shared footer that contains a form is not extracted as the footer template part when the capture carries desktop and mobile device documents. Extraction reports wordpress_site_plan_shell_retained_incomplete ("footer shell candidates do not establish a dominant semantic cluster", reason incomplete, empty sources). A footer-content part is written but no template references it, so the theme's shared shell fails and each page keeps its own footer. The same two routes without the form extract parts/footer.html and every template references it.

Seen on a real two-device import with a newsletter form in the footer: no footer part, and 13 pages each carry a full copy of the footer in post content (300–870 KB per page). That import's report gave responsive_variant_retained for the footer, the same class of failure.

Reduced fixture

Two routes, index.html and about/index.html, identical except for <title>. Each has a desktop and a mobile device document with the same header and footer:

<!doctype html><html lang="en"><head><meta charset="utf-8"><style data-blocks-engine-capture-device-visibility="">/* standard capture device-visibility stylesheet */</style><title>Home</title><style>body{margin:0;background:#111;color:#fff}header,footer{padding:20px;background:#333}</style></head><body><div class="data-blocks-engine-capture-desktop-document" data-blocks-engine-capture-device-document="desktop" data-blocks-engine-capture-document-scope=""><header id="SITE_HEADER"><nav><a href="/">Home</a> <a href="/about/">About</a></nav></header><main><span id="anchors-ltgwp8xp4" data-blocks-engine-capture-anchor-target="anchors-ltgwp8xp4" data-blocks-engine-capture-anchor-source-id="comp-ltgwp8xo" aria-hidden="true" style="position: absolute;overflow: hidden;pointer-events: none;width: 0px;height: 0px" data-blocks-engine-capture-device-inline="{&quot;tablet&quot;:&quot;position: absolute;overflow: hidden;pointer-events: none;scroll-margin-top: 192px;width: 0px;height: 0px&quot;}"></span><h1>Page</h1><p>Body text.</p></main><footer id="SITE_FOOTER"><p>© 2026 Example Co.</p><form action="/subscribe" method="post"><label for="ed">Email</label><input id="ed" type="email" name="email"><button type="submit">Subscribe</button></form></footer></div><div class="device-mobile-optimized data-blocks-engine-capture-mobile-document" data-blocks-engine-capture-device-document="mobile" data-blocks-engine-capture-document-scope=""><header id="SITE_HEADER--m"><nav><a href="/">Home</a> <a href="/about/">About</a></nav></header><main><h1>Page</h1><p>Body text.</p></main><footer id="SITE_FOOTER--m"><p>© 2026 Example Co.</p><form action="/subscribe" method="post"><label for="em">Email</label><input id="em" type="email" name="email"><button type="submit">Subscribe</button></form></footer></div></body></html>

The control is the same two files with the <form>…</form> removed from both footers.

Observed (studio create --from <dir>, SSI 1.34.104)

parts/ templates reference footer shell diagnostic
Footer with form header.html, footer-content.html (unreferenced) none of 404, index, page, single footer retained / incomplete
Control (no form) header.html, footer.html all footer extracted

block_theme_scorecard.shared_shell: templates_missing_shell: [404, index, page, single], unreferenced_parts: [footer-content].

Root cause (pointer)

ShellExtraction.php (~L1737) finds no footer clusters (array() === $clusters ⇒ incomplete) once a form is present. That means the footer candidates are dropped before clustering, not split by a comparison. Likely suspects: route-specific form identity (the rendered form action follows the current route), or per-device control ids (ed/em) entering the footer fingerprint. Confirm which one disqualifies the candidates.

Expected

Footers that are equivalent across routes and device documents, form included, extract as one footer part that every template references, the same as the control.

Owning stage: WordPress materialization (Blocks Engine shell extraction). Generic; any device-split capture with a footer form hits it.

Reduced and filed with AI assistance (Claude, via coding agent).

主要言語
PHP
スター
28
フォーク
5
平均マージ
2時間 59分
マージ済み PR(30日)
942

環境構築

はじめの一歩

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

Automattic/blocks-engine のほかの issue

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

似ている issue

PHP の issue をもっと見る

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

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