Hello,
I just tried to render a search API search page into a panel page using panels everywhere and the site template. I then noticed that we loose the search result pager when search api search page is rendered in the panels everywhere site template. If we then disable the site template for the search page, the pager is back.

Comments

drunken monkey’s picture

Category: bug » feature

I don't think this can be counted as a bug report here, as I don't encourage people to do this. It sounds more like a bug in, or shortcoming of, the Panels Everywhere module, if that module promises that you can use normal sites in panels.
As I don't really know the module (at least not well enough to make any guesses here), maybe you should better create this issue in the Panels Everywhere queue (or move this one there). Post the relevant portion of the search page code (parts of search_api_page_view(), I'd guess) there, and maybe they can tell you what needs to change.
If you know that, and there is no downside to it, then I'd be happy to make the change in the Search pages module. Otherwise, I can't really help you there. (Although someone else might come along, who can.)

jbguerraz’s picture

Project: Search API » Panels Everywhere
Component: Search pages » Code
Category: feature » bug

Thanks Druken Monkey.

Here is the concerned piece of code from the search api pages module page callback (which looks ok) :

    $ret['results']['#theme'] = 'search_api_page_results';
    $ret['results']['#index'] = search_api_index_load($page->index_id);
    $ret['results']['#results'] = $results;
    $ret['results']['#view_mode'] = isset($page->options['view_mode']) ? $page->options['view_mode'] : 'search_api_page_result';
    $ret['results']['#keys'] = $keys;
    if ($results['result count'] > $page->options['per_page']) {
      pager_default_initialize($results['result count'], $page->options['per_page']);
      $ret['pager']['#theme'] = 'pager';
      $ret['pager']['#quantity'] = 9;
    }

Does someone here understand why the search api search result page pager isn't rendered when outputed in a panel using panels everywhere site template's ?

merlinofchaos’s picture

Is there another query (view?) on the same page which us using the same pager id? That could cause this.

jbguerraz’s picture

Thanks Merlin for the answer.
I got 4 views on the same panel page, all these views displays a limited number of items.
Still, to fully answer you, I should know... how could I trace the page pagers IDs ?

merlinofchaos’s picture

It'll be in the pager settings for each view. If any of them is using the pager 'full' or 'mini', then they'll have a pager id setting.

jbguerraz’s picture

Super thanks Merlin. Indeed, one of the view had a full pager (useless one btw...), its ID was 0, it was the reason.

merlinofchaos’s picture

Status: Active » Fixed

Oh pager IDs. So hard to debug.

Status: Fixed » Closed (fixed)

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