I have two tabs, both of which are surfacing a view, and each of which have pagers at the bottom. The first tab-view-pager works fine, but the pager on the second tab simply links back to the corresponding page of the first tab, as if I'd clicked on its pager instead. I've tried turning on and off the AJAX option for quicktabs, as well as trying a block instead of a page or default view for the second tab, but not having any luck. I imagine it's something simple I've overlooked. Any ideas?

CommentFileSizeAuthor
#10 admin_build_views_edit_activities.png43.28 KBtauno

Comments

pasqualle’s picture

you need to use ajax views, if you need pagination, sort, or filter view functionality inside quicktabs. Non-ajax view makes a full page reload.

edit view->Basic settings->Use AJAX

fumbling’s picture

Thanks, you're right, that did it.

pasqualle’s picture

Status: Active » Fixed
najibx’s picture

thanks, i was using an iframe earlier. I thought that "use Ajax" is only for pagination. now I know ...

Status: Fixed » Closed (fixed)

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

alesuz’s picture

I don't have pager in my page but I have exposed filters. When I use the filter in the second tab it links back to the corresponding page of the first tab. And it happens even using Ajax. What should I do?

pasqualle’s picture

Status: Closed (fixed) » Active

It should not happen when you are using ajax view.

edit view->Basic settings->Use AJAX

tauno’s picture

I'm seeing a similar issue. I have a programatically created quicktabs block that has an ajax enabled view (block display) as the first tab. The exposed filter form isn't using ajax like it should and is submitting to the site home page (with the filter arguments in the url). If I add a page display to the view it submits to that page. I'm using 6.x-2.x-dev.

pasqualle’s picture

can you attach a screenshot of the view and quicktab settings?

tauno’s picture

StatusFileSize
new43.28 KB

Here's the code I'm using in my block to generate the quicktab block. This is used in a custom module, not php input to a user defined block. Attached is the screenshot of the view I'm trying to use. The exposed filters use ajax when I include the view as a normal block and in the views UI preview. Let me know if you have any ideas for tracking down the issue.

  $tabs = array();
  $tabs['booking'] = array(
    'title' => t('Book this activity or trip'),
    'type' => 'view',
    //'bid' => 'views_delta_activities-block_1',
    'vid' => 'activities',
    'display' => 'block_1',
    'hide_title' => TRUE,
  );

  $tabs['intake'] = array(
    'title' => t('Program request'),
    'type' => 'block',
    'bid' => 'formblock_delta_request', // 'bid' in quicktabs is in the format <module>_delta_<block delta>
    'hide_title' => TRUE,
  );

  $quicktabs['qtid'] = 'bookrequest';
  $quicktabs['tabs'] = $tabs;
  $quicktabs['style'] = 'nostyle';
  $quicktabs['ajax'] = TRUE;
  return theme('quicktabs', $quicktabs);

pasqualle’s picture

ok, this looks good, and I do not see why it does not work.
As I see you first tried to insert the view as block tabpage, that would be wrong, that does not work. Here is the explanation if you want to know why view must be inserted as view: #345175-1: what could be inside ajax quicktabs

the only issue here is the view argument. You have an argument in the view but you are not passing it to the view.

#332895: render quicktab programatically This is the example how to insert a view into quicktab:

$tabs['first'] = array(
  'title' => t('One'),
  'type' => 'view',
  'vid' => 'my_view_id',
  'display' => 'my_display',
  'args' => 'my_arguments',
);

So, you should try to delete the argument from the view or pass the argument to the view in your code. And there is no 'hide_title' property for view type tabpage.

Other thing you should try to change

$quicktabs['ajax'] = FALSE;

That should always work without any problem, as it is almost same as the embed_view() function. Although the view is on the first tabpage so it has no effect on it (as the first tabpage is always loaded at page load normally without any ajax).

tauno’s picture

Ah. I tried all your suggestions and then figured it out. Not QT related I don't think. I was using the same view display (block) in another place on the page while I was testing quicktabs, I guess views doesn't like that too much. Thanks for the suggestions though. I did remove the hide_title property and add an empty args property (my view uses a php generated arg though) for consistency. Since I hopped in on this issue I'll leave it as active for the previous poster.

pasqualle’s picture

Status: Active » Postponed (maintainer needs more info)

@alesuz: do you still have problems with the pager?

alesuz’s picture

Yes I had. When I click the pager in the second tab, it returns to the first tab. I had to find another solution to solve this problem... http://www.neapa.org.br/estamosAqui

pasqualle’s picture

@alesuz: please read the first comment. It is not an ajax view on your site..

pasqualle’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)
garyg’s picture

I also have this problem and it is not solved by using ajax.

When I click the pager in the content within second tab, it returns to the first tab's pages.
I have enabled ajax as noted in views, but this problem persist.
I am using a panels but quick tabs is the only content as of now.

Appreciate any ideas.

garyg’s picture

Status: Closed (fixed) » Needs work
pasqualle’s picture

I am using a panels

that is the problem

giorgio79’s picture

Version: 6.x-2.0-rc3 » 6.x-2.0-rc5

I am not using panels, and views is set to ajax. I am using views tabs, and having the same issue with paging. If I try to view a second page on a view, in one of hte tabs, it jumps to the 2nd page of the first tab.

delykj’s picture

Same bug here.
Using views as tabs inside a Panel page. Views's AJAX set to true.
I think we need to pass "pager_element" to the AJAX call in Drupal.quicktabs.tab.prototype.quicktabsAjaxView
Also we need to setup the view's pager in quicktabs_render_tabpage.

There is some helping code in http://drupal.org/node/1049366

wernerglinka’s picture

Is this issue being looked at by the maintainers or do we have to file a bug report? I have the same problem:
Using Views 2.12, QTabs 6.x-3.x-dev
I use a qtabs block within a qtab block. The second tab content is a view and has a pager. The view is set to use ajax. The qtab block is also set to use ajax. When I click the pager the tab closed and the first tab is shown again. When I open the second tab again, the second page is shown so the pager works...

a.siebel’s picture

subscribe - have the same problem.

wernerglinka’s picture

Just to follow up on my comment #22. I resolved my issue. See http://drupal.org/node/388904

jmatuska’s picture

#1 -
I set my view to use AJAX and now the paging is working in my Quicktabs in Internet Explorer, but still doesn't work properly in Firefox. Any idea why works in IE but not FFox?

--- IGNORE ABOVE POST ----
I'm sorry. today it's working in FF and IE both. Apologies to the group...
I must have needed to clear cache or something.

netw3rker’s picture

Issue summary: View changes
Status: Needs work » Closed (fixed)
drupal4u.org’s picture

I had a similar issue with QuickTabs (Version: 7.x-3.6) and Views Load More (Version: 7.x-1.5). The Views Load More pager worked on any block and page outside QuickTabs, but there was a problem inside QuickTabs, where I used various blocks. Using the load more function would not load more content. I played around with a couple of options (ajax on both elements on/off, using view pages instead of blocks, etc.). What finally solved the problem was to create a page instead of a block within views AND to use the option "callback" within quicktabs. So if you create a page view and you assign it to a quicktab with the option callback, the problem is resolved.