commerce_cart binding anchors the whole app root when the cart drawer is a sibling of main, overlapping other bindings
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 53/100
Hướng nghiên cứu
Start by tracing Static_Site_Importer_Runtime_Entity_Binding_Validation::preflight_runtime_entity_binding_anchors() and the binding logic that resolves the commerce_cart region. Use the reduced fixture with #cart-drawer as a regression case and check the existing cases related to #4131, #6173, and #6202. Done means the cart binding selects its own region or is declined with a diagnostic, and the regression confirms binding ranges do not overlap.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
A single-page storefront whose cart drawer sits as a direct child of the app root fails materialization:
static_site_importer_runtime_binding_claim_conflict: Provider entity bindings claim overlapping canonical source-page ranges.
The commerce_cart binding resolves to the entire app root group: <div id="app">, about 85 KB, which is the whole page body. It does not resolve to the cart drawer. That range overlaps another provider binding on the same page (bytes 32234–62258), so Static_Site_Importer_Runtime_Entity_Binding_Validation::preflight_runtime_entity_binding_anchors() correctly rejects the import.
This is the same family as #4131 (a header cart link becoming a page-wide region) and #6173 (bindings moving onto a neighbouring block). It still reproduces on SSI 1.34.102, which vendors php-transformer v0.48.13 and includes the #6202 fix.
Evidence
Instrumented SSI validation on the failing binding:
role: commerce_cart,occurrence: 1,position: {block_index: 0, offset: 0, length: 84700}projected_anchor.source_block_length: 78136,source_position.block_index: 0search_block_markupstarts with<!-- wp:group {"anchor":"app", …} --><div id="app" …>, which is the outermost page group.
Source shape, reduced:
<body>
<div id="app">
<div class="announcement">…</div>
<header>… <button aria-label="Open bag">Bag (0)</button> …</header>
<main>… product cards with "Add to bag" buttons … <form id="newsletter">…</form></main>
<footer>…</footer>
<div class="cart-drawer" id="cart-drawer" aria-label="Shopping bag">
<div class="drawer-head"><h3>Your bag <span id="drawer-count">(0)</span></h3><button id="close-cart" aria-label="Close bag">×</button></div>
<div id="cart-items"></div>
<div class="drawer-foot"><p>Subtotal <strong id="subtotal">$0.00</strong></p><button class="primary-btn" id="checkout">Continue to checkout →</button></div>
</div>
<div class="scrim" id="scrim"></div>
</div>
</body>
Expected
- The cart binding anchors the cart region's own block (
#cart-drawer) or its opener. - If no block narrower than a page-wide ancestor carries the cart identity, the binding is declined with a diagnostic and the page still imports.
- A binding range never spans the entire document root while other bindings sit inside it.
- Add a regression test on the reduced fixture above, asserting that the cart binding's markup contains
id="cart-drawer"and that no two binding ranges overlap.
AI assistance: diagnosed by Claude (Claude Code), with local instrumented reproduction, under operator direction.
- Ngôn ngữ chính
- PHP
- Star
- 28
- Fork
- 5
- Merge trung bình
- 2 giờ 59 phút
- Pull request đã merge (30 ngày)
- 942
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Automattic/blocks-engine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Automattic/blocks-engine#6318 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/blocks-engine#4943 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/blocks-engine#4942 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Automattic/blocks-engine#4921 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Automattic/blocks-engine#775 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Automattic/blocks-engine
Issue tương tự
-
15.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
PHP 8.6: is_integer() deprecation in Decorator\StyleCó thể đã có người làm @ElGigi đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
thephpleague/climate#220 ·
-
[BUG] Add asset to project adds all assets of $type instead of the ones in the search result.Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 73/100
ppy/osu-web#13514 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stable/10 Publish fails: semantic-release requires Node >= 22.14, workflow sets up Node 20Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
camunda/orchestration-cluster-api-php#162 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày