Captured slideshow pass overwrites the route path, aborting compose with a rebind() TypeError
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu trong CapturedDialogProjector.php tại lượt xử lý trình chiếu đã được ghi lại, đặc biệt là các vòng lặp bên trong dùng lại $path và các lời gọi sau đó tới $retired[$path] và $bindings->rebind($files, $path). Đổi tên các biến bên trong để đường dẫn route được giữ nguyên trong mỗi lần lặp trang. Hoàn tất khi media bị thiếu vẫn được xử lý theo hành vi $missing hiện có và compose hoàn tất mà không gặp TypeError của rebind() hoặc ghi nhận sai khóa tệp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
In CapturedDialogProjector's captured-slideshow pass (added in #3811), the outer loop variable $path holds the route's HTML file path. Two inner loops reuse the same name and overwrite it:
$path = $assets[$media['asset'] ?? ''] ?? null;sets it tonullwhen a frame's media asset was not captured.foreach (array_slice($paths, $used) as $path)sets it to a relative image path.
After the page changes, the pass calls $retired[$path] = … and $bindings->rebind($files, $path) with the overwritten value:
nullaborts the whole compose:TypeError: ScriptOccurrenceBindings::rebind(): Argument #2 ($sourcePath) must be of type string, null given(CapturedDialogProjector.php:218).- An image path silently rebinds scripts and records retired runtimes under the wrong file key.
Reproduction
A real Square Online store (an import from www.braveyogimedicinals.com) fails with the TypeError above on php-transformer v0.45.312 (SSI v1.33.426, DLA v0.33.168). Any page with a captured carousel/slideshow component whose frame references a media asset that is missing from the asset map, alongside a frame that still gets materialized, reproduces the bug.
Expected
The route file path stays fixed for the whole page iteration. A frame with an uncaptured asset is reported as missing (existing $missing behavior), and compose completes.
Fix
Rename the inner variables (for example $assetPath and $extraPath) so the outer $path is never reassigned.
AI disclosure: Claude Opus via Pi (Franklin agent) traced this from the failing import and wrote the issue.
- Ngôn ngữ chính
- PHP
- Star
- 25
- Fork
- 3
- Merge trung bình
- 2 giờ 20 phút
- Pull request đã merge (30 ngày)
- 934
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 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
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
Automattic/blocks-engine#5170 ·
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ự
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
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 68/100
-
Plugin directory: block icon SVG loses elements other than <path> in the Blocks sectionCó thể đã có người làm @obenland đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
WordPress/wordpress.org#1209 ·
Maintainer thường phản hồi trong vòng 1 ngày