-
Notifications
You must be signed in to change notification settings - Fork 12
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
Umlauts in Search lead to JS-Error. #55
Comments
This results in Strange behaviour: If I try to look for an entry named However, if I type I suspect there is some encoding problem happening during typing or search submission. I wonder if @nilshoerrmann has has this problem too? :) |
No, I haven't encountered this issues yet. |
Hmpfdgnf. Danke :) |
Apparently the problem seems to be with Umlauts in the first 3 characters of a search term. |
Using a reflection field instead of a text field for the association makes me able to find the Umlaut-Entries but still throws the error. |
Hmmm. Can’t reproduce the error on a copy of the SOR site trying several versions of AI Editor and the Association field itself. Must be some other extension gretching in. |
The search is powered by Selectize that is bundled with Symphony (or at least was – I'm not sure how this is handled in the latest releases). Maybe Selectize was updated in the core resulting in compatibility issues? |
I have used an updated version of selectize in my fork-set that overrides the bundled one: https://github.com/animaux/association_ui_selector Installing those does not break the SOR-Site either … must be something else in play. |
Really beats me. I’ve copied all the extensions, symphony-folder and rebuilt the section/link-structure from a site with the error but still can’t reproduce it. ¯_(ツ)_/¯ |
Have you tried another browser? |
Not really helping because the files mentioned are identical on two sites. One has the error. One not. |
Extensions are identical too. Site structure. I’m struggling to find the difference … |
I don't think the problem is caused by the extension itself - I remember having some filtering trouble with umlauts in the publish filtering feature (which also relies on selectize) too. And as far as I can remember I was getting similar javascript-errors as the ones you're posting. I did some tests back then, compared datasource filtering with publish filtering and noticed that there are really a lot of quirks regarding filtering umlauts and special characters. Regarding selectize I even noticed differences in typing a character and using the proposed autocomplete-values. You can see the results for the basic input-field here. I submitted a PR that fixes the filtering-bugs number-field has (will be in 2.7), but didn't dig deeper into the umlaut-issues... |
Thanks Roman. |
That's a great test, Roman. |
Thank you! I got inspired by this page in the wiki and thought it would be cool to have this kind of overview for all (core) fields.
You bet I did - but I guess there are no resources left at the moment to take care of things like these. Though these documented tests would probably be of great help if someone really wanted to start fixing these bugs one by one... as proposed in the post linked above one could start to file separate issues for the separate bugs, but I didn't want to flood symphony's issue tracker with a ton of "edge case issues" that probably won't get fixed for a looong time. But I do hope to get back to these tests some day, update them and maybe try fixing some of the more problematic issues myself. I also think it would be a great addition to some extensions to directly add these filtering-test-reports to the extension repository (the way I did with slider field) - helps giving a better understanding of what each field's filtering capabilities (and shortcomings/bugs) are. But for now... enough issue-hijacking ;) |
No worries, good thing you did. I’ve checked the DB encoding too. Same. |
|
@animaux curious to see how Chrome handles it. Same error ? I know for a fact that Safari uses UTF-16 in their jscore implementation. But seeing that the error is in jquery itself puzzle me a lot. But again, PHP has not internal encoding (it's just binary data) but you can "format" that binary code to whatever you want. Are the sites both on the same server ? Same php.ini file ? |
Yeah, sadly. We got "big" clients this year which means we are doing more maintenance that what we've planned, which reduced my "free" time, both at work and at home. But dealing with encoding always was and still is a pain. I wonder how other systems handle those cases, but from my experience, it's not really better. |
And this is worth reading: http://softwareengineering.stackexchange.com/a/151296
Make sure to use |
I’m not sure entirely it’s an encoding problem since the error comes up as well if I type in at least three standard ascii characters. But in that case the search seems to work. |
@jonmifsud’s suggestion helped solve the Umlaut-issue:
About the error:
So that's the basic recipe to fix this problem :) |
Fixed in #57 |
When using the search term
schö
for example an error is thrown and the search is not successful:The text was updated successfully, but these errors were encountered: