Automattic / Automattic/blocks-engine
Keep author-layout image URLs editor-valid after WordPress materialization
- Dominant language
- PHP
- Stars
- 14
- Forks
- 2
- Avg merge
- 2h 10m
- Merged PRs (30d)
- 561
Description
## Problem
Fixture 37 materializes `blocks-engine/author-layout` with a nested image whose saved block markup retains the relative source `website/assets/materialized-svg/inline-svg-453b87c087581ebd.svg`. WordPress resolves the editor DOM value to an absolute theme URL, so `wp.blocks.validateBlock` reports an attribute mismatch and marks the block invalid.
## Evidence
- SSI PR: Automattic/static-site-importer#760 at `00cfb164`
- Blocks Engine: `74fec9e9`
- Homeboy run: `b280bf88-2257-4915-9d80-f4c52ff6a538`
- Fixture: `37-art-gallery-exhibition`
- Block: `blocks-engine/author-layout`
- Mismatch: relative `src=website/assets/materialized-svg/inline-svg-453b87c087581ebd.svg` vs absolute runtime theme URL
Reproduction:
```sh
node tools/run-fixture-matrix.mjs --static-site-importer /path/to/static-site-importer --blocks-engine /path/to/blocks-engine --local --target-fixture 37-art-gallery-exhibition --surface-coverage 6
```
## Acceptance
- Author-layout nested image serialization remains valid after WordPress resolves materialized asset URLs.
- The generic fix applies to URL-bearing nested content without fixture-specific selectors or paths.
- Fixture 37 editor validation reports no `author-layout` attribute mismatch.
## AI Assistance
OpenAI GPT-5.6 Sol via OpenCode ran the seven-surface matrix, analyzed the editor validation evidence, and drafted this report. Chris Huber reviewed the evidence and remains responsible for the issue.
Contributor guide
Research direction
Start by running the provided tools/run-fixture-matrix.mjs command against fixture 37-art-gallery-exhibition and inspect the blocks-engine/author-layout nested image serialization. Compare the relative materialized SVG source with the absolute URL WordPress uses during editor validation. Done means the generic URL-bearing nested-content handling passes validation without fixture-specific selectors or paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100