Dedicated cart page: commerce_cart binding claims <main> and overlaps the checkout commerce_cart_link binding

Đang mở
#7,573 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
backend

Hướng nghiên cứu

Start by tracing how the commerce_cart and commerce_cart_link bindings are produced for dedicated cart pages, then read the related fixes in #6302 and #6532. Reproduce with the ranges in website/cart/index.html and inspect the binding preflight mentioned in the issue. Done means the cart page imports without overlapping bindings, with the conflict resolved where the bindings are produced.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

On a Shopify store's dedicated /cart page, the commerce_cart binding claims the whole <main id="MainContent">. The checkout button inside it also gets its own commerce_cart_link binding. SSI's runtime binding preflight rejects the overlap, and the whole import fails:

static_site_importer_runtime_binding_claim_conflict: Provider entity bindings claim overlapping canonical source-page ranges.

This follows on from #6302 / #6532. That fix stops the cart scope before containers of page landmarks. On a dedicated cart page, the scope still lands on the <main> landmark itself, which contains the cart-link anchor.

Reproduction

  • https://neurodivergentle.com/, a Shopify store, imported on SSI 1.39.38. It also failed in production on 2026-11-29 (SSI 1.39.2x).
  • website/cart/index.html:
    • carts / commerce_cart binding: range 68187–85525, the wp:group MainContent <main>.
    • cart_links / commerce_cart_link binding: range 78516–79941, wp:button anchor:"checkout" (type:"submit"), selector main > … > button. This is inside the cart range.
  • The binding ranges were captured by temporary logging in Static_Site_Importer_Runtime_Entity_Binding_Validation::preflight_runtime_entity_binding_anchors().

Expected

Bindings from one source page never overlap, and the cart page imports. Pick whichever of these is cleaner at the owning layer:

  • A cart-link anchor inside a resolved cart scope belongs to that cart, because the native cart block renders its own checkout. Don't emit it as a separate binding.
  • Or narrow the cart scope so it excludes independently bound controls.

Overlapping provider bindings should be resolved where they are produced, not left for the SSI preflight to reject the entire import.

Ngôn ngữ chính
PHP
Star
31
Fork
7
Merge trung bình
7 giờ 50 phút
Pull request đã merge (30 ngày)
822

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Automattic/blocks-engine

Tất cả issue của Automattic/blocks-engine

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.