Choosing português brasileiro or português europeu from the language menu in filters returns zero results

Description

Steps to reproduce

  1. Log in

  2. Post > New Work

  3. Fill in required fields and select either "Português brasileiro" or "Português europeu" from "Choose a language"

  4. Post

  5. Wait a few seconds

  6. Hi, username! > My Works

  7. In the filters, select the same language from "Language"

  8. Sort & Filter

What happens

Get zero results.

What should happen

Should get at least the work you just posted (more if you have other works in that language).

Notes

Entering language_id: ptBR or language_id: ptPT in "Search within results" does get the proper results.

Elz 10:43
it looks like we didn't set the mapping for that field to keyword
which is what you'd want for a term filter
we need to change the filter to { term: { "language_id.keyword" => "ptBR" } }
ideally we'd change the mapping if we're ever doing a reindex

Activity

Show:
Sarken
November 12, 2019, 8:39 AM

Testing credit to lydia-theda, Paula, and nimadge

lydia-theda 17 hours ago
scratches head am I doing something wrong? there's only one Portuguese language to choose from on staging. (for what little it's worth: on staging, a work in nonspecific Portuguese shows up in both filters/language ID search, while specifying the flavor does not show the generic PT work; production has the documented bug behavior still)
Also sent to the channel

sarken 10 hours ago
I was just coming here to say the same thing. That explains how the bug snuck through to production the first time!
An admin needs to add the two Portuguese languages to staging so we can post works in them. (We'll have to live with three Portugueses on staging I think, because iirc, when we made the change on production, someone went through manually to determine how each Portuguese work should be reclassified, and that would be a waste of effort to do that on staging.)
Also sent to the channel

sarken 8 hours ago
I keep getting a blank white screen when I try to add a new language /o
Also sent to the channel

sarken 5 hours ago
I've added ptBR and ptPT to staging for testing

Paula 22:39
\o/
Do you need a few works to find?

sarken 22:40
Yeah, whoever wants to test it just needs to post a work, wait a minute or two, and then check that the work turns up when choosing the language in the filters on their works page

Paula 22:41
Yeah, lemme post a work in each language and go from there

nimadge 22:46
3 files: 1. user works page with a work in ptBR and ptPT, 2. works page filtered just to show ptBR work, 3. works page filtered just to show ptPT work

nimadge 22:48
Search filters not on the works page also find it fine
2 files: 1. search for ptBR with expected result, 2. search for ptPT with desired result

Paula 22:50
Ok, works posted...

nimadge 22:50
S91112-105011.jpg showing search for ptBR works with expected results

lydia-theda 22:50
the work I made earlier that was just PT I switched to PTbr and found it just fine via filtering, as well as a new PTbr work

Paula 22:50
Lol, that would be me
Looks like I don’t have to search

lydia-theda 22:51
I mean I made a new one in addition to editing my old one
Paula 22:51
If someone wants to check the other Portuguese there should be another x-files one that comes up

nimadge 22:51
S91112-105046.jpg showing search with the work Paula mentioned

Paula 22:53
Going to a fandom and selecting the language works like you’d think
Image from iOS showing ptBR selected in the language section of the filters
Image from iOS showing 1 work in The X-Files tag in ptBR
Same with the other Portuguese
2 files showing 1. 1 work in the The X-Files tag in ptPt 2. filters showing ptPT selected in the language section of the filters

lydia-theda 22:56
I bookmarked Paula's works and the language filter works on my bookmark page

nimadge 22:56
Search of bookmarks also works

nimadge 22:57
S91112-105733.jpg showing bookmark search results for work language search for ptBR containing one bookmark of a work in ptBR

DeployedToBeta

Assignee

enigel lj

Reporter

Sarken

Roadmap

Browse
Internationalization
Search

Priority

High

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9
Configure