- 🇺🇸United States Amber Himes Matz Portland, OR USA
We triaged this issue as part of the Bug Smash Initiative in the #bugsmash Drupal Slack channel.
I think I reproduced the issue with the following steps:
- Install Drupal 10.1.x with Umami profile (Demo: Umami Food Magazine (Experimental))
- From the Manage menu, navigate to Content, search for "pasta" in the Title field filter.
- Edit the node with the title "Pasta vegetariana al horno súper fácil". (es/node/3/edit)
- For the field, Resumen, update the Formato de texto) to HTML completo. Click the blue Continuar button when the Change text format pop-up warning displays.
- On the Resumen field, in the CKEditor toolbar, click Origen to edit the HTML.
- Added the following inside the
<p></p>
tags:<span lang="en">Pasta is delicious!</span> <span xml:lang="en">XML Pasta is tasty!</span>
so that the contents of the field are now:<p> Una pasta al horno es la comida más fácil y saludable. Este delicioso plato es súper rápido de preparar y una comida ideal entre semana para toda la familia. <span lang="en">Pasta is delicious!</span> <span xml:lang="en">XML Pasta is tasty!</span> </p>
- Save the changes (at the bottom of the Edit (Editar) form, click the blue button Guardar (esta traducción).)
- Return to the site and ensure that you're on the Español version (which should be the case since you just edited a Spanish language node).
- Use the search field (Buscar) to search for the text "pasta".
- In the search result snippet for "Pasta vegetariana al horno súper fácil" (the 2nd result), the search result snippet displays: "Pasta vegetariana al horno súper fácil Una pasta al horno es la comida más fácil y saludable. Este … y una comida ideal entre semana para toda la familia. Pasta is delicious! XML Pasta is tasty! …"
- Inspect the HTML for this snippet. Notice that both
<span>
tags have been stripped.
Note to re-rollers! The code that the last patch modifies still exists in core/modules/search/search.module, but that file has been massively refactored, so I would be very surprised if a regular re-roll would work. I think what probably needs to happen is someone needs to take the latest patch's changes and manually apply them to core/modules/search/search.module and create a new patch.
Tests will also be needed.
I updated the issue summary with my steps to reproduce and also added remaining tasks.