Jump to:

23001 Posts in 11702 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » Search pagination breaking search

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

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

Page: 1
Go to End
Author Topic: 1319 Views
  • aragonne
    Avatar
    Community Member
    26 Posts

    Search pagination breaking search Link to this post

    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!

  • EricW
    Avatar
    Community Member
    6 Posts

    Re: Search pagination breaking search Link to this post

    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.

  • aragonne
    Avatar
    Community Member
    26 Posts

    Re: Search pagination breaking search Link to this post

    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

    1319 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.