POST site search forms (e.g. CMS search blocks) are not core/search; on /giving pages they classify as donation and fail the import
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Read SearchBlockConverter::searchBlockFromForm() and FormRuntimeRequirementAnalyzer::intent(), then compare their search signals with SearchBlockConversionContext::hasSearchFormSignal(). Trace the existing tests for POST search forms and donation detection. Done means qualifying POST searches become core/search, including on giving pages, while real donation forms remain classified as donations.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
A site search form that submits with method="post" is not recognized as search. This is common with CMS search blocks such as Drupal's search-block-form. On a page whose action path looks like a donation URL (/giving, /donate), the same form is classified as a donation form.
Results:
- On most pages,
FormRuntimeRequirementAnalyzer::intent()returnsunknown, and the single text field counts as contact evidence. SSI then materializes the header search as a Jetpack contact form, so a visitor's search becomes a feedback submission. - On
/giving/the intent isdonation,jetpack/donationsrefuses it (donation_amounts_unrecognized), and the form stays acore/htmlfallback. That fails the import quality gate, so the whole import fails.
Production: https://physics.uci.edu/ (static_site_capture_build_failed). After working around https://github.com/Automattic/static-site-importer/issues/3097 locally, the import fails with static_site_importer_quality_failed: 1 unsupported_html_fallback, which is the header search on /giving/.
Reduced reproduction (neutral)
index.html and giving/index.html both have this in <header>, with action set to the page's own path:
<form action="/giving" method="post" id="search-block-form" accept-charset="UTF-8"><div class="container-inline">
<h2 class="element-invisible">Search form</h2>
<div class="form-item"><label class="element-invisible" for="edit-search">Search </label>
<input title="Enter the terms you wish to search for." type="text" id="edit-search" name="search_block_form" value="" size="15" maxlength="128" class="form-text"></div>
<div class="form-actions"><input type="submit" id="edit-submit" name="op" value="Search" class="form-submit"></div>
<input type="hidden" name="form_build_id" value="form-abc123"><input type="hidden" name="form_id" value="search_block_form">
</div></form>
studio create --from <dir> (SSI 1.34.137) fails with static_site_importer_quality_failed: 1 unsupported_html_fallback, 1 core_html_block. The home page content holds jetpack/contact-form + jetpack/field-text + two jetpack/field-hidden.
Root cause
SearchBlockConverter::searchBlockFromForm()returns null for any non-GET method, even thoughcore/searchreplaces the source's search handler entirely. The source method has no bearing on the WordPress result.FormRuntimeRequirementAnalyzer::intent()checks$donate(set from the path regexgive|giving|donat…) before search. Its search signal is also narrower thanSearchBlockConversionContext::hasSearchFormSignal(): it only accepts the form'srole=search, an input withtype=search, or namesq/s/search/query, and only for GET.
Expected
A form with one free-text input, one submit, and only hidden server tokens besides those becomes core/search regardless of method, provided hasSearchFormSignal() holds (here id="search-block-form" and the "Search" submit). The intent analyzer should agree, reporting search ahead of the path-only donation rule. A real donation form (amount choices, or a Donate/Give submit) must still be classified as donation.
- Lenguaje dominante
- PHP
- Estrellas
- 28
- Forks
- 5
- Merge medio
- 2 h 53 min
- PR fusionados (30 d)
- 938
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Automattic/blocks-engine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4943 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4942 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Automattic/blocks-engine#4921 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Automattic/blocks-engine#775 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Automattic/blocks-engine#6499 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Automattic/blocks-engine
Issues similares
-
not confirmed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Bug (unconfirmed) Documentation :books:
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
FreshRSS/FreshRSS#9577 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
vigetlabs/wordpress-site-starter#331 ·
Los mantenedores suelen responder en 17 días
-
Site Kit emails are rejected when the administration email's domain has a strict DMARC policyAbiertoP1 Team S Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
google/site-kit-wp#14189 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día