17488 Posts in 4473 Topics by 1978 members
|Go to End|
4 July 2008 at 3:01am Last edited: 4 July 2008 3:19am
I have built the search function following the instructions in 4-site-search
But there are some problems:
1) The content is saved by TinyMCE using HTML. The main language is spanish, so if i want to found comisiÃƒÂ³n the content with the word comisiÃƒÂ³n is not finded.
2) To solve this I decided to change the code in sapphire/search/SearchForm.php in function getResults fromto
$keywords = $_REQUEST['Search'];with the idea to search twice. Now it searches in content... but also searched in sites where is not tha word :-D. It also searches in files (and i donÃ‚Â´t know how it does it) and gives me as result, but the word is not in...
$keywords = $_REQUEST['Search']; $keywords .= " OR " . htmlentities($keywords);
3) If i try to search when i am not in the main language in the site, it gives me an error... I have solved this with this pacth.
4) The problem now is that the seach only finds in the main site language (SiteTree_Live). If I write content in a second language and I try to find it, it does not find it. I think that the correct behaviour should be to search the content in the current language.
If this problem only mine? The search is not tested in SS?
Thanks in advance.
7 July 2008 at 1:03pm Last edited: 7 July 2008 1:04pm
The search system has been tested a fair bit, but I think that the issues that you're having are related to the use of search specifically with multilingual sites.
It sounds like this issue - http://open.silverstripe.com/ticket/2267 - is related to your problem. If you add your email address to the CC field of the ticket, you will be notified when we fix it.
Also, the change you made to get the ÃƒÂ© being searched for is probably causing problems. Rather than editing $keywords, you should try making a patch in the searchEngine() method to fix this.
|Go to Top|