After some debugging I noticed that the url alias arg was being sent vs the drupal path which would have given me an nid value vs a string.

I noticed this with firebug that it was sending the alias but I noticed that the Drupal.settings had the nid value.

So when i dug into the js, i found the $.extend() method being called.

This is where the problem is.


$.extend(
                viewData,
                Drupal.Views.parseQueryString($(this).attr('href')),
                // Extract argument data from the URL.
                Drupal.Views.parseViewArgs($(this).attr('href'), settings.view_base_path),
                // Settings must be used last to avoid sending url aliases to the server.
                settings
              );

settings was originally right after viewData which would mean it is the 'default' set of values. The other parameters would simply override these defaults since they are coming from url's / links and will be aliases, not the original drupal path.

My code comment could possibly be changed but i really am not sure what else to say lol?

CommentFileSizeAuthor
ajax_pager_settings.patch1.02 KBAnonymous (not verified)

Comments

merlinofchaos’s picture

Status: Needs review » Fixed

Fixed in 2.x and 3.x. I don't think this will apply to 7.x at all which uses the new ajax framework.

rashadh’s picture

I think this patch created another issue in (glossary mode+Ajax enabled) where view_args are overridden by settings to the initial value check this

http://drupal.org/node/578680

Reversing the patch solved my problem, however I didn't understand the Ajax pager problem stated above so I couldn't come up with a solution for both.

merlinofchaos’s picture

Status: Fixed » Active

Re-opening for investigation.

merlinofchaos’s picture

Status: Active » Closed (fixed)

Ok, moving back to closed since there's a patch for the above referenced issue.

avergara’s picture

Status: Needs review » Closed (fixed)

i was having the same problem. i am using Views 6.x-2.16, and the view_args is still throwing the url alias, instead of the node id. After hours of head scratching, i found this bug report which led me to this:

on line 126 of ajax_view.js, we have:
$.extend(viewData, Drupal.Views.parseViewArgs($(this).attr('href'), settings.view_base_path))

I had to add "settings" as the last parameter:
$.extend(viewData, Drupal.Views.parseViewArgs($(this).attr('href'), settings.view_base_path),settings);

avergara’s picture

Status: Closed (fixed) » Needs review

Status: Closed (fixed) » Needs work

The last submitted patch, ajax_pager_settings.patch, failed testing.

mustanggb’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)