Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Search pagination breaking search


Go to End


3 Posts   2071 Views

Avatar
aragonne

Community Member, 26 Posts

26 January 2011 at 2:19pm


Hi there,

Hi, I've been trying the search tutorial at http://doc.silverstripe.org/sapphire/en/tutorials/4-site-search and everything works except the pagination.

If I remove the pagination code in the template (eg, Results.MoreThanOnePage, Results.NextLink, etc.), search results are returned. If I leave the pagination code in place, SS throws an error.

Is there anything missing from the tutorial? Am I suppose to be also calling setPageLimits(), setPageLength(), etc. using the results DataObjectSet in the ProcessSearchForm() method as described on http://doc.silverstripe.org/sapphire/en/reference/dataobjectset#paging to get the pagination to work?

Thanks!

Avatar
EricW

Community Member, 6 Posts

4 February 2011 at 12:47pm

Hello, I am having some problems installing search with silverstripe version 2.4.4. Search works fine if you do not type in a word that you have also used as a navigation label. For instance if you have a tab call "food" and search the word "food" you get this error.

Fatal error: Class '' not found in C:\xampp\htdocs\yoursite\sapphire\core\model\MySQLDatabase.php on line 825

If any one has any ideas where to go from here I would really appreciate it.

I have also followed the tutorial as aragonne did and it just isn't working :( As far as pagination I really have not made it that far. Pagination seemed to work great in previous silverstripe releases.

Avatar
aragonne

Community Member, 26 Posts

5 February 2011 at 7:35pm

Edited: 05/02/2011 7:35pm

HI Matt,

I actually did get the search in the tutorial to work. I think I was mixing and matching too much code at first, then I decided to just copy and paste the search code as is in the tutorial and search worked, including the pagination. I'm using SS 2.4.3 though, if that makes a difference.

Steve