Project

General

Profile

Actions

Task #3880

closed

Search doesn’t work in non-English versions of the website

Added by Neil Roberts 4 days ago. Updated 4 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Tags:

Description

For example, if you go to https://es.libreoffice.org and then click on the magnifying glass to use the search feature, type something and then click on a result it will take you to the English version of the page. Also, if the locale has translations for the slugs then this tries to take you to the English page but with the translated slug URL which results in a 404 error.

I think the problem is that the permalinks aren’t being generated properly. For example if you look at the HTML source for the main page then all of the <link rel="alternate"> links for the different languages point to the same English-language page.

Actions #1

Updated by Beluga Beluga 4 days ago

Indeed, I apparently forgot to check how the recently-added <link rel="alternate"> items look like on the production site. Locally and on the preview site everything is fine.

However, there is this:

<link rel="alternate" hreflang="fi" href="https://fi.libreoffice.org/">

...which lead me to create this patch: https://gerrit.libreoffice.org/c/infra/libreofficeorg/+/205673

I had overlooked that it is relevant to set those baseURLs.

Actions #2

Updated by Beluga Beluga 4 days ago · Edited

In layouts/index.json I see .Permalink being used as well, so let's cross our fingers and toes the patch helps for search as well.

Actions #3

Updated by Beluga Beluga 4 days ago · Edited

  • Status changed from New to Closed

Yay, the search links work now as well!

Actions

Also available in: Atom PDF