Duplicate suggestion when a white space is added to the search criteria
Closed, ResolvedPublic

Description

Split up from T178126: [1.31.0-wmf.3] False 'Missing in English' label is displayed for articles existing in enwiki as a separate issue:

Steps to reproduce:

  1. In 'New translation' box type some search criteria - e.g. Robot.
  2. The correct list of suggestions will be displayed. Press the spacebar to add a white space immediately after the search term 'Robot' - a strange entry for Robot article will be displayed with "Missing in English".

The screen recording shows that for catala->English suggested translations, Robot article becomes marked with "Missing in English" after adding a white space in the text field. When I click on it, I see "The article already exists in English".


This extra article item appears with many search entries - e.g. Tor, Japan, Test. After clicking on such suggestion, you'll redirected to the article that was displayed below on the list.

The link associated with the extra item is exactly the same:

<div class="oo-ui-widget oo-ui-widget-enabled oo-ui-labelElement oo-ui-optionWidget oo-ui-iconElement oo-ui-decoratedOptionWidget oo-ui-menuOptionWidget mw-widget-titleOptionWidget mw-cx-widget-titleOptionWidget" aria-disabled="false" tabindex="-1" role="option" aria-selected="false" id="oojsui-8"><span class="oo-ui-iconElement-icon oo-ui-icon-page-existing"></span><a class="oo-ui-labelElement-label"** href="//ca.wikipedia.org/wiki/Robot_" **tabindex="-1" title="Robot">Robot</a><span class="oo-ui-indicatorElement-indicator"></span><span class="mw-cx-widget-titleOptionWidget-numOfLanguages"><span class="oo-ui-widget oo-ui-widget-enabled oo-ui-iconElement oo-ui-iconElement-icon oo-ui-icon-language oo-ui-iconWidget" aria-disabled="false" title="Number of languages"></span><label class="oo-ui-widget oo-ui-widget-enabled oo-ui-labelElement oo-ui-labelElement-label oo-ui-labelWidget" aria-disabled="false">1</label></span><span class="mw-cx-widget-titleOptionWidget-missing">Missing in English</span></div>

And for the below item, some image will be included:

<div class="oo-ui-widget oo-ui-widget-enabled oo-ui-labelElement oo-ui-optionWidget oo-ui-iconElement oo-ui-decoratedOptionWidget oo-ui-menuOptionWidget mw-widget-titleOptionWidget mw-cx-widget-titleOptionWidget" aria-disabled="false" tabindex="-1" role="option" aria-selected="false" id="oojsui-9"><span class="oo-ui-iconElement-icon oo-ui-icon-page-existing mw-widget-titleOptionWidget-hasImage" style="background-image: url(&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Paris_Air_Show_2007-06-24_n20.jpg/80px-Paris_Air_Show_2007-06-24_n20.jpg&quot;);"></span><a class="oo-ui-labelElement-label"** href="//ca.wikipedia.org/wiki/Robot" **tabindex="-1" title="Robot">Robot</a><span class="oo-ui-indicatorElement-indicator"></span><span class="mw-widget-titleOptionWidget-description" title="mechanical or virtual artificial agent">mechanical or virtual artificial agent</span><span class="mw-cx-widget-titleOptionWidget-numOfLanguages"><span class="oo-ui-widget oo-ui-widget-enabled oo-ui-iconElement oo-ui-iconElement-icon oo-ui-icon-language oo-ui-iconWidget" aria-disabled="false" title="Number of languages"></span><label class="oo-ui-widget oo-ui-widget-enabled oo-ui-labelElement oo-ui-labelElement-label oo-ui-labelWidget" aria-disabled="false">107</label></span></div>
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 20 2017, 9:47 PM
Etonkovidova renamed this task from Duplicate suggestion when a white spaces is added to Duplicate suggestion when a white space is added to the search criteria.Nov 20 2017, 9:48 PM

@Catrope suggested to check VE link inspector for the issue and he was right - the added white space to the search criteria will add a duplicate suggestion.

Add a white space to the search criteria - a duplicate suggestion appears:

Petar.petkovic added a subscriber: Petar.petkovic.

@Catrope suggested to check VE link inspector for the issue and he was right - the added white space to the search criteria will add a duplicate suggestion.

Add a white space to the search criteria - a duplicate suggestion appears:

That is because VE link inspector and CX search input field use same OOJS UI widget in inheritance chain. I have already claimed this is inherited from the widget in T178126#3773611.
Thank you @Etonkovidova for filing this ticket and thank you @Catrope for you insight.

Change 393231 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Remove duplicate suggestions in search results

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

Change 393231 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Remove duplicate suggestions in search results

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

Etonkovidova updated the task description. (Show Details)Nov 30 2017, 1:29 AM

@Petar.petkovic I still see the issue in cx-testing - should it be tested somewhere else?

@Petar.petkovic I still see the issue in cx-testing - should it be tested somewhere else?

I don't see the issue. Do you still see it? If so, what are you typing to get duplicate results?

Yes, the issue is fixed (what I saw was possibly some cached search stuff). Closing the issue.

Etonkovidova closed this task as Resolved.Dec 1 2017, 11:58 PM
Nikerabbit moved this task from QA to Done on the Language-2017-Oct-Dec board.