-
Notifications
You must be signed in to change notification settings - Fork 16
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
When searching for a query longer then 100 chars, Tweakwise gives a 400 error back. #103
Comments
@igorwulff Ithink this should be fixed with setting the query length on the magento side. I suspect that the api returns an 400 error because it doesn't want to change the request without letting the user know. But i'll discuss this internally and see what the reason is the api returns an 400 error. |
This is what we get: [2023-10-29T21:06:11.465342+00:00] report.ERROR: Client error: <error xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-i (truncated...) |
@onepack @igorwulff I've discussed this internally and were not changing this on the api side. But I'll make an change and restrict the request length on the magento side. I've added this to our backlog |
Go to a site utilizing Tweakwise Search and place the following in the query string:
https://.../catalogsearch/result/index?q=Lorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Phasellus+pretium+magna+ac+metus+placerat+pdasdasdasdas
An error report page comes up and something like the following is written to the system log:
I've looked into setting the max query length to 100. And this does resolve direct input through the input field and "fixes" the issue: catalog/search/max_query_length
However direct input through the url still causes an error to be thrown. This could be fixed by also applying this max_query_length to the Tweakwise module:
This would mean that this is an configuration detail to be followed. An alternative option is to enforce this directly.
I'm also curious if this can't be resolved in Tweakwise. I understand a limit is used, but perhaps it could be handled more gracefully.
The text was updated successfully, but these errors were encountered: