I have a Views panel pane display with Use Panel path set to Yes and Ajax enabled. My view also has a contextual filter for "Content: Has taxonomy term ID".

The view pane is used on the taxonomy/term/% taxonomy_term panel page. The view works fine and you can use the pager link exactly once. After that the view will return no results even if there are more results.

It appears that what is happening is that initially Drupal.settings.views.ajaxViews['view_dom_id:' . $dom_id].view_base_path is set to the internal path taxonomy/term/153 and Drupal.settings.views.ajaxViews['view_dom_id:' . $dom_id].view_args is set to the term id 153. Once you hit the ajax pager, these change and are incorrectly set for the next ajax call. IE: Drupal.settings.views.ajaxViews['view_dom_id:' . $dom_id].view_base_path becomes tag/fashion and Drupal.settings.views.ajaxViews['view_dom_id:' . $dom_id].view_args is set to the term name fashion

I found a few issues that may be related, but they all seem older and are mostly marked as resolved.
#636988: AJAX Pagers Can Send The Wrong view_args

Comments

jojonaloha created an issue. See original summary.

jojonaloha’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB

The attached patch attempts to resolve this by using the view_base_path from the first call and using it to set $view->override_path in views_ajax(). The reason is that when called from view_ajax(), template_preprocess_views_view() calls $view->get_path() and the Panel pane display plugin does not have the panel path to do properly override it.

drewfranz’s picture

This patch fixed the issue for me as well.

drewfranz’s picture

StatusFileSize
new1.26 KB

Patch for Panopoly version of Views.

drewfranz’s picture

chris matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 3 year old patch in #2 to ajax.inc does not apply to the latest views 7.x-3.x-dev.

Checking patch includes/ajax.inc...
error: while searching for:

    // Load the view.
    $view = views_get_view($name);
    if ($view && $view->access($display_id)) {
      // Fix 'q' for paging.
      if (!empty($path)) {

error: patch failed: includes/ajax.inc:40
error: includes/ajax.inc: patch does not apply
andrew answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new1.16 KB

Patch rerolled.

cor73x’s picture

This patch from #7 fixed issue also for me.
I have checked current 7x-3.23 and issue was still there.
Before path both view_args and view_path contains url alias instead term id and taxonomy/term/tid.