1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug Search results per page not changing when seaching for new posts

Discussion in 'Resolved Bug Reports' started by Fethi.dz, Jul 31, 2016.

Tags:
  1. Fethi.dz

    Fethi.dz Member

    Hello,

    As you can see in the below picture, I set 25 result to be shown per page but when I click on searching for the new posts on my forum I still getting the default value of search per page which is 20.


    Search Results Per Page.png
    Search Results Per Page2.png
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    New Posts is controlled by the discussions per page option.
     
    Amaury likes this.
  3. Fethi.dz

    Fethi.dz Member

    After dinging a bit in the file /library/XenForo/ControllerPublic/FindNew.php

    I found that the option that control the per page search results is as follow:

    PHP:
    $perPage XenForo_Application::get('options')->discussionsPerPage;

    I think it should be:

    PHP:
    $perPage =XenForo_Application::get('options')->searchResultsPerPage
    Since this is a Search Result Page not a Discussions Per Page (This controls the maximum number of discussions (such as threads) that will be shown on one page.)
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    It's a list of discussions, therefore the current option makes the most sense.

    The distinction is that a list of search results can actually be a list of any type of content, as the search system is content agnostic.
     
    Amaury likes this.
  5. Fethi.dz

    Fethi.dz Member

    Well Chris, it still a search page whether are the content a threads or posts, I should be able to control the number of search per page from that option page (Search option) because it doesn't make sense when I change the Maximum Number of Search Results (From 200 to 500) from there and the number per page I have to change it from an other page option!!
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    It's a discussion list, so we use the discussion list per page option. To make it use a different value would require a code edit or an add-on, or custom development.
     
    Fethi.dz and Amaury like this.

Share This Page