Page MenuHomePhabricator

Can't add categories in content translation tool - Categories for the language to translate not shown
Closed, ResolvedPublicBUG REPORT

Description

When I use the ContentTranslation Tool, in the section to add categories, if I type a category to add to the destination wiki, the "related categories" not shown.

Impact

User can't add category in ContentTranslation with this bug (either existance or user defined)

Console error

(with guwiki)

jQuery.Deferred exception: (query.pages || []).forEach is not a function TypeError: (query.pages || []).forEach is not a function
    at CategoryInputWidget.ve.ui.MWCategoryInputWidget.getLookupCacheDataFromResponse (<anonymous>:304:119)
    at CategoryInputWidget.mw.cx.ui.CategoryInputWidget.getLookupCacheDataFromResponse (<anonymous>:288:535)
    at CategoryInputWidget.OO.ui.mixin.LookupElement.getRequestCacheDataFromResponse (https://gu.wikipedia.org/w/load.php?lang=gu&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=tjfue:342:749)
    at https://gu.wikipedia.org/w/load.php?lang=gu&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=tjfue:337:768
    at fire (https://gu.wikipedia.org/w/load.php?lang=gu&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=tjfue:46:209)
    at fireWith (https://gu.wikipedia.org/w/load.php?lang=gu&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=tjfue:47:402)
    at mightThrow (https://gu.wikipedia.org/w/load.php?lang=gu&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=tjfue:49:751)
    at process (https://gu.wikipedia.org/w/load.php?lang=gu&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=tjfue:49:808)
    at https://gu.wikipedia.org/w/load.php?lang=gu&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=tjfue:50:37
    at mightThrow (https://gu.wikipedia.org/w/load.php?lang=gu&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=tjfue:49:149) undefined

Screenshot example

image.png (768×1 px, 198 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This seems regression. Updated description with console error(s).

With this bug, i only can add categories defined by me. (New category)
Con este problema, solamente puedo añadir categorías definidas por mi. (Categoría nueva).

image.png (768×1 px, 138 KB)

image.png (768×1 px, 139 KB)

Y cuando trato de guardar una categoría aunque no se muestre la lista de "Categorías relacionadas", los bordes de la barra donde se buscan las categorías para añadir a la wikipedia de destino se torna de color rojo.
And when I try to save a category even though the "Related categories" list is not displayed, the borders of the bar where i search the categories to add it to the destination wikipedia turns of red.

image.png (768×1 px, 136 KB)

image.png (768×1 px, 135 KB)

Me originó este problema al comenzar a traducir el artículo:
"Assara odontosema"
(https://en.wikipedia.org/wiki/Assara_odontosema) de enwiki a eswiki (https://es.wikipedia.org/wiki/Assara_odontosema), y luego al comenzar a trabajar en mis siguientes traducciones con Content Translation:
"Turn Down for What" enwiki (https://en.wikipedia.org/wiki/Turn_Down_for_What) a eswiki
"Ashita, Mama ga Inai" enwiki (https://en.wikipedia.org/wiki/Ashita,_Mama_ga_Inai) a eswiki

Change 623914 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] mw.cx.ui.CategoryInputWidget: Fix broken search

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

Change 623914 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] mw.cx.ui.CategoryInputWidget: Fix broken search

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

Pginer-WMF added a subscriber: Pginer-WMF.