23367 Posts in 18143 Topics by 2863 members
|Go to End|
13 June 2014 at 5:51am
I have an issue with search in a SS 3.1 install, I wouldn't have thought an issue like this would exist in the core code and that it must be affected by something I have done however, other than some minor overloading of the SearchFrom() and getResults() methods on my Page class (neither of which effect the query building logic at all) it is a total stock usage of the search functionality.
If I search for "[some word] as [some word]" (i.e 'cat as dog' or 'foo as bar') I get a fatal error (see the first attached image). Also, far less important, if I do the same in dev mode I also get a deprecated method notice (see the second attached image).
I am fairly certain something weird is going on with the use of the word 'as' and SS's query building logic is mistaking it for part of an SQL statement e.g. `fieldname`AS 'labelname' I think this because of this part of the error message:
"AGAINST ('foo AS "bar')", NULL"
Notice that my 'as' word has been capitalised and is then followed by a single space and opening double quotes (as if it is about to wrap my label in quotes)
Is this a bug?
You may think 'who cares, hardly anyone will be searching for [someword] as [someword]... but I am having this issue on a live, customer facing website for a telecoms company... so the search "pay as you go" happens on a daily basis!
Any help greatly appreciated.
17 June 2014 at 4:44pm
This to me looks like a bug and I have been able to replicate on a fresh copy of 3.1.5.
Would be worth raising a bug over at https://github.com/silverstripe/silverstripe-framework/issues.
17 June 2014 at 8:26pm
Thanks for clarifying this is still an issue in the core code of SS 3.1 @camfindlay
I have raised a bug as suggested - https://github.com/silverstripe/silverstripe-framework/issues/3212
Lets hope someone is able to provide a fix
|Go to Top|