[go: nahoru, domu]

Page MenuHomePhabricator

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.

Screen Shot 2017-11-17 at 6.10.59 PM.png (459×941 px, 78 KB)

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>

Event Timeline

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.

Screen Shot 2017-11-20 at 1.42.36 PM.png (315×418 px, 25 KB)

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

Screen Shot 2017-11-20 at 1.42.49 PM.png (362×435 px, 27 KB)

Petar.petkovic subscribed.

@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.

Screen Shot 2017-11-20 at 1.42.36 PM.png (315×418 px, 25 KB)

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

Screen Shot 2017-11-20 at 1.42.49 PM.png (362×435 px, 27 KB)

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

@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.