Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Pagination on bookmarks page?

Hi gang,

Having an issue wherein the "My Bookmarks" page never produces page numbers, even when a user has bookmarked vastly more threads than can be shown on one page. Using a fresh copy of version Version 2.0.18.8. Is this a known issue? Is there an easy fix I should implement? Thanks much!

Kim

Comments

  • Please prepare to make a bug report on github, if someone can confirm the bug please :-)

    There was an error rendering this rich post.

  • I can confirm that bookmarks do not paginate on 2.0.18.8 on a local install. My discussions also does not paginate. My Drafts does paginate.

    Steps to recreate:

    1. Install 2.0.18.8
    2. Import test forum data (subset of my live forum data which has ~50 discussions started by me)
    3. Set conf Vanilla.Discussions.PerPage to 10
    4. Bookmark 11 discussions
    5. Create 11 drafts
    6. Visit /discussions/bookmarked and observe lack of pager
    7. Visit /discussions/bookmarked/p2 and observe proper pagination (but still no pager shown
    8. Repeat steps 6 and 7 for /discussions/mine

    Other thoughts

    • This is does not occur in 2.1b1.
    • It appears that the views bookmarked and mine aren't even used by the discussions controller.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • This is a bug in class.discussionscontroller.php. Find function Bookmarked and replace this line:

    $CountDiscussions = $DiscussionModel->GetCount($Wheres);

    with:

    $CountDiscussions = $DiscussionModel->UserBookmarkCount($Session->UserID);

    ...and your pager is fixed.

  • Many thanks to both of you! @hgtonight, did you already submit that on github?

  • @PIXELovely said:
    did you already submit that on github?

    Check, check, doublecheck

    There was an error rendering this rich post.

  • edited July 2013

    @50sQuiff Tried your solution out, having a few problems...

    I located the line $CountDiscussions = $DiscussionModel->GetCount($Wheres); in applications/vanilla/controllers/class.categoriescontroller.php. It was not in function Bookmarked. I tried replacing it regardless, but it does not seem to have done anything.

    Running a search for "function Bookmarked" on the whole of vanilla, I found one instance of it in applications/conversations/controllers/class.messagescontroller.php, but all it had in it were these lines:

    $this->View = 'All';
    $this->All($Offset, $Limit, TRUE);

    And the entire function was commented out.

    Thanks for submitting the bug report, @UnderDog! Does anyone else have suggestions for a quick fix for the meanwhile? My users are asking to see all their bookmarks.

  • 50sQuiff50sQuiff ✭✭
    edited July 2013
    /**
        * Display discussions the user has bookmarked.
        * 
        * @since 2.0.0
        * @access public
        *
        * @param int $Offset Number of discussions to skip.
        */
       public function Bookmarked($Page = 'p1') {
    

    shrug

  • Aha!! For whatever reason searching for function Bookmarked didn't find it, but searching for those comments did. No idea. Thanks so much for the clue. This worked beautifully.

Sign In or Register to comment.