Task #3880
closedSearch doesn’t work in non-English versions of the website
0%
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.
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.
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.
Updated by Beluga Beluga 4 days ago
· Edited
- Status changed from New to Closed
Yay, the search links work now as well!