=== Reproduce === 1. Go to staff: /cgi-bin/koha/admin/categories.pl 2. Edit a category with existing patrons 3. Add a tab in the description here is one to copy for convenience: " " 4. Save the category 5. Go to /cgi-bin/koha/members/members-home.pl 6. Filters → Category → select the just edited one 7. Hit search, just below 8. Then you should see "Processing..." As if the request was still running forever === Cause === In the browser dev tools, we can see that the XRH request to "search" actually comes back. The response seems normal. Except that Firefox warns "SyntaxError: JSON.parse: bad control character in string literal at line 23 column 29 of the JSON data" Which points to our tab. Which invalidates the JSON: https://stackoverflow.com/questions/19799006/unable-to-parse-tab-in-json-files#19799355 > The whitespace characters are: character tabulation (U+0009), line feed (U+000A), carriage return (U+000D), and space (U+0020). > Whitespace is not allowed within any token, except that space is allowed in strings. === Workaround === Remove the tab from the description of the category. In /cgi-bin/koha/admin/categories.pl One can use the filter in the table (called search). And search for a tab " " to get the "corrupted" ones. === Fix === It seems that we should escape the tabs (and CRs(\r) and LFs(\n)) Or just get rid of them. Another question is where? - Where the category form is processed? - early in the upper layers? (when the request just comes) - or in the lower layers? (if the category is managed by the ORM) - In the database itself with a trigger? - Other ideas? === Going further === How to find which other bugs like this one might cause hard to diagnose issues?
This appears to have been fixed. I can't reproduce the problem.