Captured slideshow pass overwrites the route path, aborting compose with a rebind() TypeError
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in CapturedDialogProjector.php at the captured-slideshow pass, especially the inner loops that reuse $path and the later $retired[$path] and $bindings->rebind($files, $path) calls. Rename the inner variables so the route path remains fixed for each page iteration. Done when missing media stays handled by the existing $missing behavior and compose completes without the rebind() TypeError or recording the wrong file key.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- PHP
- Stars
- 25
- Forks
- 3
- Avg merge
- 2h 23m
- Merged PRs (30d)
- 942
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/blocks-engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#4943 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#4942 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/blocks-engine#4921 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Automattic/blocks-engine#775 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Automattic/blocks-engine#5013 ·
Maintainers usually reply within 1 day
All issues in Automattic/blocks-engine
Similar issues
-
from-cloud mythic tracked
Difficulty 1/5 Under an hour Newbie friendliness 86/100
MythicalLTD/FeatherPanel#459 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: PostgreSQL backend: Queue.remove() / Job.remove() never emit the QueueEvents "removed" eventPossibly taken @1AbdullahButt claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
taskforcesh/bullmq#5085 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
shukiv/jabali-panel#2423 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
customer-reported enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MagnaCapax/PMSS#1252 ·
Maintainers usually reply within 3 days