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

Hash ids error when using "in" operator #717

Open
mmo7amed2010 opened this issue Jun 12, 2023 · 2 comments
Open

Hash ids error when using "in" operator #717

mmo7amed2010 opened this issue Jun 12, 2023 · 2 comments
Assignees
Labels

Comments

@mmo7amed2010
Copy link

Description:

When utilizing the "in" operator at searchableFields within the L5-Repository and separating hash IDs with commas, an error related to hash IDs is encountered in Apiato. This issue arises specifically when working with hash IDs, as the hash ID is decoded as a single word instead of being separated by commas. As a result, the example hash IDs "SAdjsaidASDX,OIDnjkqewC" are treated as a single hash ID, whereas they should be treated as two distinct hash IDs. This problem does not occur when using other data types, but only when dealing with hash IDs.

Expected Behavior:

when using the "in" operator at searchableFields in Apiato with hash IDs and separating them with commas is that each hash ID should be treated as an individual entity. They should not be decoded as a single word without the commas. For example, if you have the hash IDs "SAdjsaidASDX" and "OIDnjkqewC" separated by a comma, the expected behavior is that they are treated as two separate hash IDs, allowing you to perform operations or checks on each individual hash ID independently

Versions:

  • Apiato Version: 12.0.0
  • PHP Version: 8.2.6

Steps To Reproduce:

  1. Create a code segment where you use the "in" operator as a searchable fields to check if a hash ID exists within the DB.

  2. Generate two or more hash IDs, such as "SAdjsaidASDX" and "OIDnjkqewC".

  3. Concatenate the hash IDs into a single string within the search query parameter, separated by commas. For example: "search=id:SAdjsaidASDX,OIDnjkqewC".

  4. Run the code segment and observe the result.

@Mohammad-Alavi
Copy link
Member

Thanks for the detailed issue! This kind of issues are a sight for the sore eyes 😍

@Mohammad-Alavi Mohammad-Alavi self-assigned this Jun 12, 2023
@Mohammad-Alavi Mohammad-Alavi changed the title Apiato gives hash ids error when using "in" operator as searchable field while separating hash ids with comma Hash ids error when using "in" operator Jul 10, 2023
@galliroberto
Copy link

galliroberto commented Jan 3, 2024

L5 repository has too many bug, please consider move to lyften repository

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

No branches or pull requests

3 participants