Hi
The jquery selectors may be broken. e.g. a search for "womens'" with the apostrophe on the end results in an error:
uncaught exception: Syntax error, unrecognized expression: value=n\'s]
The attached patch, just removes these. I don't think checkbox should have a value of "womens'" anyway. Just escaping the characters didn't work. Perhaps the values should be encoded on both sides?
The attached patch makes it work in our scenario.
Thanks
John
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | custom_search_error.patch | 2.12 KB | nemanja |
| #6 | custom_search-jsescaping-6.6.patch | 2.29 KB | jdanthinne |
| custom_search-jsescaping-6.1.patch | 2.29 KB | jrobens |
Comments
Comment #1
heddnComment #2
jdanthinne commented@jrobens : sorry for the delay… is this still happening? And then, can you explain when does this exception happen? Before searching, on the results…?
Comment #3
nemanja commentedType this string for example - qowepurcmnv'
On page after submit you will get javascript error.
Syntax error, unrecognized expression: value=purcmnv']
You can also try any other non alphanumeric string (qowepurcmnv.)...
Comment #4
jdanthinne commented@Nemanja: have you tried the patch?
Comment #5
nemanja commentedYes, sorry, it works for most of characters but when we have question mark "?" in it, it doesn't.
I am not sure how this jquery selectors could be changed in order to make this work but it's definitely problem in them.
Comment #6
jdanthinne commentedCan you try this modified patch? I've included the question mark in the characters to remove.
Comment #7
nemanja commentedHere is my patch. Using regular expressions can always make problems if some character isn't included in pattern so i used this as solution...
Comment #8
jdanthinne commentedIf it's ok for you, I can commit the patch, but perhaps I should wait for a review from jrobens (who did the original patch).
Comment #9
nemanja commentedI am fine with that, but also i agree with you. Approval from more people is better anyway
Comment #10
jrobens commentedI tried to re-test it using the site that we were building at the time. Can't quite get here easily.
I agree, regular expressions are untidy. I wanted to escape the characters so that they wouldn't get in the way. It was for some checkbox taxonomy solution. [] womens' wasn't appropriate.
This fix looks like the problem is wrapped try/catch. Does this mean that it doesn't check the check when it is supposed to, so the facet feature won't work in these cases?
I'll see if I can find a config for this.
Comment #11
jrobens commentedThe site that I was working on is still running the same code here: http://community.sunshinecoast.qld.gov.au/search/apachesolr_search/women%27s?filters=tid%3A4631
The types list is pull down next to 'Search All'. They aren't check boxes. The reason this came up was either because it was breaking other javascript, or it was losing the state of the selected filter. Must have been because javascript wasn't being processed.
Comment #12
loon commentedD6 reached its EOL, and there is no active release for D6 for this module anymore.
Development or support is not planned for D6. All D6-related issues are marked as outdated in a bunch.