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

Wrong pagination link for facet page on world in another language #9311

Closed
hangy opened this issue Nov 13, 2023 · 4 comments
Closed

Wrong pagination link for facet page on world in another language #9311

hangy opened this issue Nov 13, 2023 · 4 comments
Labels
brokenlinks Those are 404 errors spotted in production. 🐛 bug This is a bug, not a feature request. facets facets allow you to explore products according to various criterion. Based on MongoDB

Comments

@hangy
Copy link
Member

hangy commented Nov 13, 2023

What

Pagination link is broken for non-default language.

Steps to reproduce the behavior

1.Open a list of brands on OFF in non-default language, ie. World in German, ie. https://world-de.openfoodfacts.org/brands
2. Click on the page number 2
4. See error, because https://world-de.openfoodfacts.org/marken/brands/2 was opened

Expected behavior

The href should have pointed to https://world-de.openfoodfacts.org/brands/2 or https://world-de.openfoodfacts.org/marken/2

Why

It's currently not possible to browse a country's facets in another language, which could hinder some contributors.

@hangy hangy added the facets facets allow you to explore products according to various criterion. Based on MongoDB label Nov 13, 2023
@hangy hangy added 🐛 bug This is a bug, not a feature request. brokenlinks Those are 404 errors spotted in production. labels Nov 13, 2023
@hangy
Copy link
Member Author

hangy commented Nov 13, 2023

After some research, I think this could be a duplicate of #3850. It wasn't obvious from the get-go, because it doesn't actually seem to be a language issue, but a general issue with the face pagination.

@alexgarel
Copy link
Member

seems plausible that it's a duplicate of #3850 as the problem there is on facets that are not real tags.

@alexgarel
Copy link
Member

It's because we use groupby_tagtype in display_pagination. We should add a parameter in the request to give the right name.

@alexgarel
Copy link
Member

I will propose a PR

alexgarel added a commit that referenced this issue Dec 4, 2023
* fixing link in pagination for contributor and translated facets
* fixing pagination for contributors query

fixes:
- #9311 
- #3850
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brokenlinks Those are 404 errors spotted in production. 🐛 bug This is a bug, not a feature request. facets facets allow you to explore products according to various criterion. Based on MongoDB
Projects
Development

No branches or pull requests

2 participants