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

Abierto
#6,130 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
36/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
html, php
Área
tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
PHP
Estrellas
28
Forks
5
Merge medio
2 h 59 min
PR fusionados (30 d)
942

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Automattic/blocks-engine

Todos los issues de Automattic/blocks-engine

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.