-
Notifications
You must be signed in to change notification settings - Fork 95
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
[JS] jstree error when top concept's preLabel contains special characters #1221
Comments
Here is the configuration of that vocabulary:
Note: when switching to |
On closer examination, I think the error might be introduced in function
|
Thanks for the report and the thorough digging of the cause! I assume you are running the most recent release 2.12? It seems so, because the |
Yes, this is version 2.12. |
After combing through the JS in Firefox debugger, I think I found the bug! I'm not sure why the problem only occurred when there are special symbols in the label (check it in action on finto, too: https://skosmos.dev.finto.fi/unesco/en/ - select Hierarchy, then wait for the spinner to never stop loading). However, when removing the class filter, from I think I can prepare a pull request with the fix, although be warned: I have no real idea why this actually works. |
Fixed by PR #1227 - thanks @schlawiner for reporting and providing a PR! |
At which URL did you encounter the problem?
Locally (I use the docker-compose version)
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expected: the hierarchy view of my vocabulary, listing all the concepts.
Instead: A "loading" spinner in the sidebar that never finished.
In the console:
However, when I remove the parentheses from the specific concept that is listed in the console error message, the error message instead complains about the next concept that also has parentheses, in alphabetical order. In my case: "thesis (doctoral)". If I remove the parenthesis in that, it complains about "thesis (master)".
Helpful additional info
Interestingly, when switching to the German interface (not vocab German language!), JS stops complaining about "thesis (doctoral)" and instead is offended by "abschlussarbeit (master)" (with the same error content otherwise), which is the (lowercased) prefLabel of another Concept, namely the one that would come next when listing the German prefLabels alphabetically - remember: I am not looking at the vocabulary in German, but have only switched the UI language to German.
When going to the "Alphabetical" tab and selecting any one of the concepts listed, and then going back to the "Hierarchy" tab, the error is not triggered and the hierarchy of terms is displayed as expected.
What browser did you use? (eg. Firefox, Chrome, Safari, Internet explorer)
Happens in all browsers I have access to on this machine:
The text was updated successfully, but these errors were encountered: