ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Multi-page search results, pagination links not working

August 19, 2008 1:31pm

Subscribe [3]
  • #1 / Aug 19, 2008 1:31pm

    karentempler

    104 posts

    In the various tailor-made advanced searches—such as the View New Posts function or “view all posts by this member” from a profile page—the pagination links don’t work.

    This is when the initial result shows “Keywords found in many replies - Search this thread.”

    To give you an example, here’s a view all posts by member page. You can see there are several where there’s the “keywords found in many replies” result. If you click on the “search this thread” next to any of those, you get a page like this. If you scroll to the bottom and check the pagination links, they take you to the main forum page rather than the next page of results.

    You guys know I’ve done an extensive customization so I’ll note that the pages at this level—profiles, forms, search, etc—I have yet to touch. So at this point they’re just inheriting what they inherit.

    I have a lot of users leaning heavily on View New Posts as a way to track activity in the discussions, so this does pose a daily problem. Hope you can help me solve it!

  • #2 / Aug 19, 2008 4:56pm

    Ingmar

    29245 posts

    To give you an example, here’s a view all posts by member page. You can see there are several where there’s the “keywords found in many replies” result. If you click on the “search this thread” next to any of those, you get a page like this.

    Sorry, that won’t work: search result URLs are not permanent. Let us know what you searched for, and give us a link to your forum instead, please.

  • #3 / Aug 19, 2008 6:09pm

    karentempler

    104 posts

    Whoops, sorry—didn’t realize that would expire. OK:

    - click here
    - then click on my name atop the post
    - then click view all posts by this member
    - then under the TV thread, where it says “Keywords found in many replies—search this thread,” click search this thread
    - then in the resulting page, scroll to the bottom; you’ll see pagination links

    Clicking either “2” or “next” will take you to the forum toplevel instead of page 2.

  • #4 / Aug 26, 2008 12:47pm

    Robin Sowell

    13255 posts

    Hm- I tried, but I get an access denied when I clicked ‘view all posts’.  So- registered, but it’s been a while and the confirmation email hasn’t come through yet.  I’d have expected it to by now- and don’t see it in spam folder either.  Though sometimes gmail is slow.

    Are you showing ‘rob1’ in pending members?  And if you try sending an email via communicate to that addy, let’s see if it gets through.  Double check settings per this kblog entry and make sure debugging is on.  Let’s be sure your emails are going out ok.

    And once I’m registered, I’ll see about duplicating the search weirdness!

  • #5 / Aug 26, 2008 7:37pm

    karentempler

    104 posts

    Hi, Robin. OK, I activated your account, and had it set to send you a notice that I’d done that. Then I sent a message via communicate without changing any settings. Then enabled debugging and sent a second message via communicate. The screen subsequent to that last send said that the message was sent successfully. But I got two Undelivered Mail emails from the host server, saying the recipient address does not exist.

  • #6 / Aug 26, 2008 8:40pm

    Robin Sowell

    13255 posts

    Crud- yea, emails never came in.  But maybe I had a typo.  Should be mediacow at gmail.com.  I tend not to use my work mail for quick test sign-ups 😉. 

    But- I’m in now.  It’s the forum search that’s doing it.  Looks like the problem is the link- page links should use search_thread in them rather than search_topic.  If you manually change it, you’ll see it works.

    What version and build date of the forum are you running?  And I’ll dig a bit into the code- see if I can spot an issue w/the latest.

  • #7 / Aug 26, 2008 9:05pm

    karentempler

    104 posts

    It’s 2.1.0—remind me where to find the build date?

    the problem is the link- page links should use search_thread in them rather than search_topic.  If you manually change it, you’ll see it works.

    I haven’t dealt with the search templates at all, and there are a bunch of them. Which one am I looking for?

  • #8 / Aug 26, 2008 9:13pm

    Robin Sowell

    13255 posts

    Don’t worry about it.  I checked the current code- looks like a bug to me.  I put in a bug report and suggested fix, but need to talk to the crew before it’s confirmed. 

    That said- looks like an easy fix.  So if you want me to walk you through it, say the word.  Otherwise- hang tight and I’ll update once it’s a confirmed bug and a fix is in.

  • #9 / Aug 26, 2008 9:22pm

    karentempler

    104 posts

    OK thanks, Robin.

  • #10 / Aug 27, 2008 2:38pm

    Robin Sowell

    13255 posts

    Yeppers- it was confirmed as a bug and should be fixed in the next release.  If you need it before then, it’s an easy fix.  Just open up mod.forum_core.php around line 11262:

    if ($total_rows > $post_limit)
    {    
    $pagination = $this->_create_pagination(
        array(
        'first_url'    => $this->_forum_path('/search_topic/'.$this->current_id.$topic_id.'/'),
        'path'        => $this->_forum_path('/search_topic/'.$this->current_id.$topic_id.'/'),
        'total_count'    => $total_rows,
        'per_page'    => 20,
        'cur_page'    => $this->current_page
        )
    );

    Where it has search_topic - replace it with search_thread and is should be good to go.

    Make sense?

  • #11 / Aug 27, 2008 9:44pm

    karentempler

    104 posts

    Yep, I’ll take a whack at it. Thanks, Robin.

  • #12 / Aug 29, 2008 11:59am

    Sue Crocker

    26054 posts

    Hi, karen. Did the fix that Robin recommended work for you?

  • #13 / Aug 29, 2008 12:49pm

    karentempler

    104 posts

    Yep, looks good. You can close this. Thanks!

  • #14 / Aug 29, 2008 1:26pm

    Sue Crocker

    26054 posts

    Glad to hear the fix from Robin worked. Please don’t hesitate to post again if need be.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases