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?
Comments
Comment #1
merlinofchaos commentedFixed in 2.x and 3.x. I don't think this will apply to 7.x at all which uses the new ajax framework.
Comment #2
rashadh commentedI 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.
Comment #3
merlinofchaos commentedRe-opening for investigation.
Comment #4
merlinofchaos commentedOk, moving back to closed since there's a patch for the above referenced issue.
Comment #5
avergara commentedi 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);Comment #6
avergara commentedComment #8
mustanggb commented