It stumped me for a while, but views that I was inserting, that had pagers, were overriding the default search pager. I eventually added code into a custom module to prevent them from being inserted on search pages. This is my code below, but any improvements or suggestions are welcome.

function MODULENAME_node_load($nodes, $types) {
  if(arg(0) == 'search' && arg(1) == 'node') {    
    foreach($nodes as $key => $node) {
      if(isset($nodes[$key]->body['und'][0]['value'])) {
        $nodes[$key]->body['und'][0]['value'] = preg_replace('/\[view:[^\]]*\]/', '' , $nodes[$key]->body['und'][0]['value']);
      }
    }    
  }
}

I'm not sure if there should be some change in the module to do this better either. Feel free to close this issue if not.

Comments

Pasqualle’s picture

Category: bug » support

you can have multiple pagers on the same page, just change the pager id on the view edit page

Pager ID description:

Unless you're experiencing problems with pagers related to this view, you should leave this at 0. If using multiple pagers on one page you may need to set this number to a higher value so as not to conflict within the ?page= array. Large values will add a lot of commas to your URLs, so avoid if possible.

this is not a bug in insert_view, it is how multiple pagers work..

burgs’s picture

Status: Active » Closed (works as designed)

Thanks Pasqualle,

The optimal solution would be to set the search pager to be the second pager, so that all the inserted views pagers didn't have to be. Search isn't that flexible though. Anyway, the slight hack is there for people who need it.