1778 Posts in 581 Topics by 555 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 983 Views |
-
Extending SearchForm.php for working with extended page classes

24 August 2010 at 5:23am
Has any had any success extending the built in search engine, i.e. searchForm.php? I have an extension of Page which has extra content areas which the user can update in the CMS. The search engine doesn't look for anything other than the standard variables in sitetree as can be seen in the file \sapphire\core\model\MySQLDatabase.php and the public function searchEngine.
I tried editing it and haven't found a way to make it work without coming up with a harsh sql error.
[User Error] Couldn't run query: SELECT count(*) FROM "SiteTree_Live" WHERE ("SiteTree_Live"."ClassName" IN ('TripleColumnPage','HomeRSSAggregatingPage','TestimonialsPage')) AND ( MATCH (ColumnOne,ColumnTwo,ColumnThree,BottomContent) AGAINST ('tewst*' IN BOOLEAN MODE) + MATCH (ColumnOne,ColumnTwo,ColumnThree,BottomContent) AGAINST ('tewst*' IN BOOLEAN MODE) ) Unknown column 'ColumnOne' in 'where clause'
GET /searchpage/SearchForm?Search=tewst+&action_SynergyResults=SearchLine 536 in /home/kathyw/public_html/synergy_silverstripe_blank_dev/sapphire/core/model/MySQLDatabase.php
I can see that where sapphire is trying to create the SQL term it is having trouble joining the two database tables. Has anybody had any luck extending the search form in this way?
I have used Symfony framework and with that there is an option to bring up the SQL query on screen to help with debugging. does anyone know of such a query with silverstripe.
-
Re: Extending SearchForm.php for working with extended page classes

27 August 2010 at 11:29am
okay I have since found this post which is more sophisticated and established idea,
http://www.silverstripe.org/all-other-modules/show/259512?start=24#post291101
| 983 Views | ||
|
Page:
1
|
Go to Top |

