Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Confusion of Tongues" - Unable to search at all in multi-language ZIM ted_mul_all_2024-07 #1159

Open
Perplexitus opened this issue Nov 7, 2024 · 0 comments

Comments

@Perplexitus
Copy link

Perplexitus commented Nov 7, 2024

Hello,

I am getting this "Confusion of Tongues" error when doing a generic search using books.name=ted_mul_all_2024-07 (All Ted Videos ZIM).

http://192.168.1.40:3000/kiwix/viewer#search?books.name=ted_mul_all_2024-07&pattern=test Invalid request The requested URL "/kiwix/search?books.name=ted_mul_all_2024-07&pattern=test&userlang=en" is not a valid request. Two or more books in different languages would participate in search, which may lead to confusing results.

It also seems to be the default response when I input a blank URL.
http://192.168.1.40:3000/kiwix/search?books.name=ted_mul_all_2024-07

--Same output as above. Two or more books... blah blah.--

Using a Different ZIM file:
What's weird is that the same exact query works properly for a different book, such as Wikipedia (but just in English):
http://192.168.1.40:3000/kiwix/viewer#search?books.name=wikipedia_en_all_maxi_2024-01&pattern=test

...provides search results as expected...

Using a blank query for the Wikipedia ZIM gives me a "No query provided" response:
http://192.168.1.40:3000/kiwix/search?books.name=wikipedia_en_all_maxi_2024-01

The requested URL "/kiwix/search?books.name=wikipedia_en_all_maxi_2024-01" is not a valid request. No query provided.

Due to this issue in the TED videos ZIM, I am unable to search for anything when using this ZIM.

ZimFileServer zfs(SERVER_PORT, ZimFileServer::DEFAULT_OPTIONS, ZIMFILES);
for ( const auto& q : testQueries ) {
{
// HTML mode
const std::string url = "/ROOT%23%3F/search?" + q;
const auto r = zfs.GET(url.c_str());
const TestContext ctx{ {"url", url} };
EXPECT_EQ(r->status, 400) << ctx;
EXPECT_EQ(r->body, expectedConfusionOfTonguesErrorHtml(url)) << ctx;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant