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

Aperta
#6,130 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
36/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
html, php
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
PHP
Stelle
28
Fork
5
Merge medio
2h 59m
PR unite (30g)
942

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Automattic/blocks-engine

Tutte le issue di Automattic/blocks-engine

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.