Form-less text inputs become core/html (inside span) or a fabricated 'Text' paragraph (inside div)

Open
#6,130 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
36/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
html, php
Domain
tooling

Research direction

Start by running HtmlTransformer::transform on the three fragments in the table to reproduce both outputs, then read ReadableFormControlBlockConverter (the controlText path that synthesizes "Text") and the phrasing-content check that turns the <span> wrapper into core/html. The key question is where a form-less control could be routed to the same editable-block path as controls inside a real <form>; the issue's pseudo-form idea is a candidate, not a decision, so confirm the intended approach with the maintainers before writing code. Done means both wrappers yield one empty labelled input block and the SSI generated_document_contains_core_html failure no longer fires.

Written by the indexing model from the issue text.

Description

Observed

On a Ylopo /open-house page, a text input sits outside any <form>:

<div class="input-section mls-number-wrapper">
  <span class="span-label">MLS Number:</span>
  <span class="span-input"><input id="openHouseMLS"></span>
</div>
  • Inside a <span>: the wrapper's phrasing content can't hold the <input>, so the whole wrapper becomes core/html. The SSI quality gate reports this as generated_document_contains_core_html and fails the import (core_html_block).
  • Inside a <div>: the control goes through ReadableFormControlBlockConverter::controlText and becomes <p id="openHouseMLS">Text</p>. The visible word "Text" doesn't exist in the source, which showed an empty input box.

Repro (HtmlTransformer::transform):

fragment output
<div><span>MLS Number:</span> <span><input id="m"></span></div> core/html
<div><span>MLS Number:</span> <div><input id="m"></div></div> paragraph Text
<div><input id="m"></div> paragraph Text

Expected

A form-less control renders as what the source shows, an empty labelled input box, through the same editable-block path in both wrappers. It shouldn't produce core/html or synthesized label text. One candidate is to treat the nearest control cluster (the input, the agent <select>, and the button) as a pseudo-form for provider materialization, as real <form> elements already are.

Found during the londonrealestateproperties.com import loop (lrep-rel2 quality gate: 5 core_html_block, 3 of them this element across desktop, middle and phone).


AI assistance: Franklin (Claude Fable 5.1 via Pi/Roadie) found and reduced this from the import report; Chris Huber directed the work.

Dominant language
PHP
Stars
28
Forks
5
Avg merge
2h 59m
Merged PRs (30d)
942

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/blocks-engine

All issues in Automattic/blocks-engine

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.