Search results page has 10 items but no pagination when there are 100's of other pages for the search term. Am I missing something? How to enable or is something broken? I have tried different themes and reloaded the search module. It works on other sites I have created but not this one. Can anyone give me some clues as what could be wrong. I resisted posting this here but have exhausted every avenue that I can find. Thanks

Comments

jhodgdon’s picture

Usually this would be due to having more than one pager present on the page (meaning that there is something else being displayed on the search results page that also supports paging, but currently has only 1 page). Is there another pager being displayed in a block on your search results page, for instance? Maybe a block view with paging enabled? If so, you need to configure that other block so that it uses a different pager ID, or disable that block.

For troubleshooting, I would try disabling the blocks that are visible on that page, one by one, and see if the problem goes away.

Naturalist’s picture

Thank you, thank you, thank you!!! That was the problem, my head is now back to it's normal size.

jhodgdon’s picture

Status: Active » Fixed

Glad to be of help. Just curious, though: What other avenues did you try? There are quite a few suggestions in the Support tab in the top navigation of drupal.org...

Naturalist’s picture

First of all I searched and searched everywhere I could find. Normal search, issue search, Drupal documentation, Google and that is all I can remember of my exhaustive searching. I also posted in the post installation forum but was getting no help. Once again thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jordanmagnuson’s picture

Status: Closed (fixed) » Active

Any other suggestions for this? I've disabled all blocks, there are no other pagers present, yet still my search results refuse to display a pager...

jordanmagnuson’s picture

I've also tried switching themes, no luck.

jhodgdon’s picture

I have no other ideas, sorry! Are you sure you have more than one page of search results?

jordanmagnuson’s picture

Yep, I'm sure I have more than one page (tried changing the number of items per page, for instance, and it's always maxed).

jhodgdon’s picture

Have you done something in the theme, like not printing out $pager on the search page? Try switching to an unmodified core theme (such as Garland) and see if it works there.

It does generally work fine in Drupal 6.15, so it is likely to be (a) a module you are using (b) a theme or (c) a conflict with another pager.

Also, you cannot in Drupal 6 change the number of search items shown on each page, by the way. It is hard-wired at 10.

jordanmagnuson’s picture

Sorry re. more than 10 page results: I had Lucene Search enabled, and that's where I was changing the number of results.

I'm completely baffled here. I've tried:

  • switching to Garland theme
  • disabling all blocks
  • disabling all search contrib modules (like Search Lucene)
  • making SURE that I have more than 10 results

and STILL I have no pager... I don't know what I could have done. I'm thinking, at this point, that it must be some other module I have installed, that's screwing things up?

jordanmagnuson’s picture

Well, after extensive troubleshooting, it turns out that the culprit module was Modal Frame API 6.x-1.6. Disabled the API (no other changes), and walla, the search results pager is back.

jordanmagnuson’s picture

Status: Active » Closed (fixed)

Moving my issue to the Modal Frame API queue. Thanks for the help jhodgdon!

oceanos’s picture

Regarding #1: Don't look out only for blocks containing pagers. Check also if you have a view using a pager inserted into a node (insert view module). If such a node is contained in your search result, the search results pager will also break.

Damned, this issue cost me the whole afternoon. I'm using Drupal 6.17, Views 6.x-2.11 and Insert View 6.x-2.x-dev .

robbm’s picture

Thanks. I think you've just saved me from spending a whole afternoon on it too. (Probably even longer.)

The search results pager was showing on some pages of my site, but missing on others. But I was using the "Embed Children View" option from node_hierarchy which inserts a View with a pager into a node - again breaking the search results page's pager. So simply tweaking the value of "Pager element" in the View resolved the problem. (It's just a shame that this makes the URLs of the Views pages less "friendly".)

thezombieguy’s picture

Version: 6.15 » 6.20
Status: Closed (fixed) » Active

I'm having issues with this at the moment as well. However, I tried all ideas up to #12 as I am not using, nor have I implemented the Modal API framework.

I turned off my theme, and am currently using the garland theme. When I go to the search page, and I search content, I get erratic results with the pager. Some pages display results of 4 items, but the pager says there are 33 pages of results. However, each page has the same results. It shouldn't be paging. Then, if I search with smaller keywords like "The" I get 10 results and nothing more, and I know I shoudl get several pages of results (there's a lot of content on the site).

Now I've gone through a number of issues that seem to be related to my problem, such as adding an $element value to the theme_pager in case there was another pager interfering. This only makes my current pager disappear. As well, having disabled the previous theme and enabled garland, I am pretty sure there are no blocks (or views) on my page interfering with my results pager.

I do have a number of modules installed, but anything search related I've tried to make sure was disabled such as Google Search Appliance (at first I figured this was the issue, but disabled and uninstalled, I'm still having this problem). I am not sure what steps to take next to identify this issue. Any suggestions?

jhodgdon’s picture

Status: Active » Fixed

No one really gives support in the Drupal Core search.module issue queue, sorry. I'm the only one who reads the search.module issue queue and I have too many other volunteer obligations in the Drupal community... If you need help debugging, please click on Community and Support in the top of drupal.org and try the Forums or IRC. Sorry... Closing this support request again...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

hey_germano’s picture

I had this issue, too. After lots and lots of troubleshooting, I found that the problem was that I've got this bit of code on a CCK field template in my theme:

print comment_render($node, NULL);

And when the results included hits from that field's content type, something about printing the comment form here kills the results pager.

Really weird, but I suppose printing the comments form on a field template is pretty weird, too. I think my fix will be to re-think my content type layout and not get so "creative" with my templating. Hope this helps somebody else!

makbul_khan8’s picture

Thanks jhodgdon

aaronbauman’s picture

Issue summary: View changes

Is there a current issue tracking this bug?
It persists to D7

jhodgdon’s picture

This is not a bug, so no. It is a problem with having multiple pagers on the same page and they will conflict if they do not have different IDs. That is how Drupal works. It is by design.

aaronbauman’s picture

Does this "feature" persist into Drupal 8?
If so, I'll file a new issue as a feature request.

jhodgdon’s picture

I'm sorry, but I really don't know. Please feel free to file either a bug report or a feature request about pager conflicts and see if the relevant parties who maintain the pager system think it's valid. This issue was filed a long time ago for a particular person who had a particular problem with pagers, and is a support request, and probably I am the only one looking at it now. And I'm about to un-follow it...

cmstom’s picture

@jhodgdon, you're not the only one with this issue. I am running Drupal 7.31 with a fresh Omega theme and I couldn't see my pager on the core Drupal search results page.

I did some troubleshooting, switched theme to Bartik and the pager was working there. So it was either something wrong with the theme or another pager from a block that was conflicting. It turns out that it was the pager from another block. I change that pager to display a specific number of items items (disabling pager for that block worked too) and now the search pager is working :)