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

Fixed incorrect language condition in LEFT JOIN (liaglv.id_lang instead of agl.id_lang) #1123

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

abdullacm
Copy link

Questions Answers
Description? In the current implementation of the SQL query, the language condition in the LEFT JOIN for the ps_layered_indexable_attribute_group_lang_value table is incorrectly applied to the agl (attribute group language) table. This causes the language condition to be applied to the wrong table, which leads to incorrect results in multi-language environments.
Type? bug fix
BC breaks? no
Deprecations? no
How to test? In the PrestaShop back office, set the url_name (friendly URL) for the attribute (e.g., size) in multiple languages. On the frontend, switch between languages and apply the filter. Check that the friendly URL in the filter matches the correct language-specific url_name as configured in the backend.
Screenshot 2025-01-29 at 5 37 57 PM Screenshot 2025-01-29 at 5 39 05 PM

The query is expected to return the url_name (e.g., storrelse) for language ID 3, but it is currently returning the url_name (e.g., size) for language ID 1. This results in incorrect URL names being used for filters in multi-language environments.

@ps-jarvis
Copy link

Hello @abdullacm!

This is your first pull request on ps_facetedsearch repository of the PrestaShop project.

Thank you, and welcome to this Open Source community!

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

Successfully merging this pull request may close these issues.

2 participants