Page MenuHomePhabricator

TemplateWizard: Template not found on Wikimedia Commons
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

A user reported this behavior on Wikimedia Commons:

  • I am using the classic wikitext editor.
  • I open the TemplateWizard to insert a template.
  • I type "Kulturdenkmal". I get an exhaustive list of template names. This list doesn't include the template "Kulturdenkmal Sachsen".

vorlage bild 1.png (882×1 px, 140 KB)

  • I keep typing, "Kulturdenkmal S". Now the list is empty.
  • Expected behavior: The templates "Kulturdenkmal Sachsen" and "Kulturdenkmal Sachsen-Anhalt" should have been displayed.

vorlage bild 2.png (888×1 px, 75 KB)

  • Even if I insert the full template name, the template often doesn't appear in the list.
  • When I gradually delete characters from my search, the template appears.

Event Timeline

I could reproduce it and made a screencast.

Peek 2022-03-10 16-12.gif (852×1 px, 516 KB)
I looks like there is a gap between "Kulturdenkmal_S" and "Kulturdenkmal_Sac".

We also have the issue in visual editor.

Peek 2022-03-10 17-05.gif (963×1 px, 329 KB)
In this example the result list is not empty but the result set is changing completly.

Change 770503 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/TemplateWizard@master] Fix copy-paste mistake in template search widget

https://gerrit.wikimedia.org/r/770503

Change 770503 merged by jenkins-bot:

[mediawiki/extensions/TemplateWizard@master] Fix copy-paste mistake in template search widget

https://gerrit.wikimedia.org/r/770503

Change 770057 had a related patch set uploaded (by WMDE-Fisch; author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/TemplateWizard@wmf/1.38.0-wmf.25] Fix copy-paste mistake in template search widget

https://gerrit.wikimedia.org/r/770057

Change 770057 merged by jenkins-bot:

[mediawiki/extensions/TemplateWizard@wmf/1.38.0-wmf.25] Fix copy-paste mistake in template search widget

https://gerrit.wikimedia.org/r/770057

Mentioned in SAL (#wikimedia-operations) [2022-03-15T13:15:07Z] <awight@deploy1002> Synchronized php-1.38.0-wmf.25/extensions/TemplateWizard/resources/ext.TemplateWizard.SearchField.js: Backport: [[gerrit:770057|Fix copy-paste mistake in template search widget (T303524)]] (duration: 00m 49s)

The user checked if the issue still occurred after the deployment:

Translation:

the behavior has not changed. But there is this change: when I enter "Kulturdenkmal S", a template "Kulturdenkmal Sachsen/en" appears for selection - but only this English template documentation. only with further letters also the "main template" for "Kulturdenkmal Sachsen" appears as well as further language versions and also the template "Kulturdenkmal Sachsen-Anhalt" with the language versions.
the offered templates are "wildly mixed up" there is no logical sorting for me. the display of the offered templates is still almost the same as in the screenshots sent yesterday.

original comment: https://de.wikipedia.org/wiki/Wikipedia_Diskussion:Technische_W%C3%BCnsche/Topw%C3%BCnsche/Vorlagen_suchen_und_einf%C3%BCgen#Auf_Commons_geht_es_langsamer_bzw_nicht_sofort_alle_vorlagen

awight subscribed.

Verified not fixed, the desired page should have shown up after "Kulturdenkmal S". As I remember we were also trying to filter out subpages.

We discovered that the most annoying use case, where only one result is returned and it's not the right one, mainly happens when the search API returns no results. In this case, we show the first prefix search result and nothing else. Our provisional suggestion is that in this case we should show all of the prefix search results, basically falling back to the previous behavior before our changes.

It looks like this is an issue that is already known for a while: https://phabricator.wikimedia.org/T85770.

Change 772405 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/TemplateWizard@master] Fill template search results with prefix matches when Cirrus fails

https://gerrit.wikimedia.org/r/772405

Change 772409 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Template dialog: Fall back to prefix search when Cirrus fails

https://gerrit.wikimedia.org/r/772409

Change 772409 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Fill template search results with prefix matches when Cirrus fails

https://gerrit.wikimedia.org/r/772409

Change 772405 merged by jenkins-bot:

[mediawiki/extensions/TemplateWizard@master] Fill template search results with prefix matches when Cirrus fails

https://gerrit.wikimedia.org/r/772405

Partly demoed today. Missing:

  • Fallback to 10 results is not yet visible on Wikimedia Commons. To be demoed later.
  • One of the 2 implementations is not 100% complete. A last patch is still missing.
    • The TemplateWizard was already changed from an adaptive approach to "always query 10 prefixsearch results".
    • The VisualEditor patch was not so easy to update. We merged the adaptive approach as an intermediate step. It's already better in all situations, just not "perfect".
thiemowmde set the point value for this task to 2.Apr 13 2022, 12:56 PM

Change 784253 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Drop assumption that all template search index start at 1

https://gerrit.wikimedia.org/r/784253

Change 784260 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Update template search fallback to max out at 10

https://gerrit.wikimedia.org/r/784260

Change 784261 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Disable useless "showMissing" option in TemplateTitleInputWidget

https://gerrit.wikimedia.org/r/784261

Change 784268 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/TemplateWizard@master] Fix random template search result order in prefixsearch fallback

https://gerrit.wikimedia.org/r/784268

Change 784261 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Disable useless "showMissing" option in TemplateTitleInputWidget

https://gerrit.wikimedia.org/r/784261

Change 784253 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Drop assumption that all template search index start at 1

https://gerrit.wikimedia.org/r/784253

Change 784260 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update template search fallback to max out at 10

https://gerrit.wikimedia.org/r/784260

Change 784268 merged by jenkins-bot:

[mediawiki/extensions/TemplateWizard@master] Fix random template search result order in prefixsearch fallback

https://gerrit.wikimedia.org/r/784268

Lena_WMDE moved this task from Demo to Done on the WMDE-TechWish-Sprint-2022-04-13 board.
Lena_WMDE subscribed.

@JStrodt_WMDE FYI this should be fixed and live on Commons