Body-level runtime scaffolds after the footer stay in post content and block native archive query loops

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
40/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php, wordpress
領域
backend, web-dev

調査の方向性

Start with ShellExtraction, the template-part shell path, and the code that decides post content; inspect existing shell-extraction, listing, query-loop, and runtime-island tests. Add a generic case for a hidden body-level scaffold after the footer part, verifying it is omitted from post content, rendered once on the page, and allows the archive to materialize as a query loop.

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

説明

Problem

On the real adamadam.blog capture (90 files including website/parts/, compiled with #3401), every category and author archive is proven. Only 4 of the 13 categories materialize, though. The other 8 categories and both authors are declined with wordpress_site_plan_{taxonomy,author}_archive_query_unproven, and their archive pages stay frozen.

Every one of these is declined by the same gate in WordPressSitePlan::materializeListingQueryLoops(): $postChromeSettled && … && $this->postsRepeatListingChrome($sourceListingMarkup, $posts). The repeated "chrome" is the same block in each case, in each declining archive's member posts:

<!-- wp:group {"anchor":"jp-carousel-loading-overlay", …} --><div id="jp-carousel-loading-overlay" …><!-- wp:custom/layout-shell …

Source evidence

  • The source is <div id="jp-carousel-loading-overlay" style="display: none;">…spinner svg…</div>.
  • It is a direct child of <body>, after the footer template part, and sits outside the main content.
  • It is a script-owned scaffold: Jetpack Carousel shows it while it opens a lightbox.
  • It appears on 43 of 85 pages (the ones that enqueue the carousel) and in no shared part (website/parts/header-*, footer-*).
  • Compiled, it stays inside each post's canonical_block_markup, so the post owns it as content. A query loop that renders post-content would repeat it once per card. The guard is correct to refuse; the problem is the block's placement.

Expected

Document-level body chrome that sits outside a document's content region must not be persisted as post_content. This covers runtime scaffolds such as this hidden overlay that appear as <body> children after the footer part.

Find the owning layer where the compiled document's content is separated from its shell (ShellExtraction / the template-part shell path, or where post content is decided). Then move or settle such body-level trailing nodes there, so they render once per page (in the template, or as page-level runtime markup) rather than inside the post.

  • Generic only: no jp-, Jetpack or id special case.
  • Decide whether display:none matters, or whether position (body child outside the content region, after the footer part) is the right signal. Justify it from what other tests already protect.

Acceptance

  • A unit or contract test that fails on trunk: a post and a category archive both end with a hidden body-level scaffold after the footer part. After the fix, the post's content omits it, the scaffold still renders once on the page, and the archive materializes as a query loop.
  • On the real capture, the archives formerly declined by this gate materialize as native query loops.
  • Existing listing, query-loop, shell-extraction and runtime-island tests pass.

AI disclosure: diagnosed by Claude (Anthropic) running in the Pi coding agent by instrumenting the real compile; reviewed by @chubes4.

主要言語
PHP
スター
22
フォーク
3
平均マージ
6時間 26分
マージ済み PR(30日)
879

環境構築

はじめの一歩

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

Automattic/blocks-engine のほかの issue

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

似ている issue

PHP の issue をもっと見る

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

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