Closed toropok closed 8 months ago
Hi Leonid, does this cause a problem, so that it does not work?
I guess the issue is related to the functionality that preserves some of the filter/sorting criteria as request parameter and reads it out again here:
https://github.com/senaite/senaite.app.listing/blob/2.x/src/senaite/app/listing/view.py#L702-L709
The magic that does this is located here:
https://github.com/senaite/senaite.app.listing/blob/2.x/webpack/app/listing.coffee#L272-L283
Hope that helps for the beginning.
Well, it might also be related to this part that causes the encoding:
https://github.com/senaite/senaite.app.listing/blob/2.x/webpack/app/listing.coffee#L117
where the get_url_parameter
is here:
https://github.com/senaite/senaite.app.listing/blob/2.x/webpack/app/api.coffee#L44-L60
Aha, well initially we noticed that "Show more" button in the senaite.app.listing
component doesn't work at all if filter parameter set as non-latin string.
our investigation led us to the fact that string encodes by browser and this causes this condition assert as true: https://github.com/senaite/senaite.app.listing/blob/2dcccb044cb3f497c64ee96ab7b98ff3816e77af/webpack/app/listing.coffee#L2164
In this code statement encoded value assigns to State and leads to reload.
We'll add PR to fix that.
btw same happens to German or Spanish letter as well like in: Übel or bebé
Thanks for fixing the übel bug!😄
Hi,
Due that there is no "issue" section in
senaite.app.listing
project I'll post it here.I've encountered with some unexpected behaviour.
When user types into the search-box component of
app.listing
Cyrillic string and submit search request. The string has being encoded to UTF-8 suddenly.Further the Python part encodes it again and return as the response.
Seems that response change the state of the component and it's re-renders and resubmit request with non-encoded text (and search performs fine).
Because non-cyrillic text always perform just on request.
We're failed to figure out where the encoding in CoffeeScript happened :) please help where to look that mystical thing