This also happen with add_url and remove_url but I give the examples with ajax_url.
Using managing news the ajax_url is modified by appending a display_mode param. For example:

data-node/active/feeds_data_syndication?display=views-mode-list

instead of:

data-node/active/feeds_data_syndication

When it's parsed it appends the nid value and generates a wrong url. For example:

data-node/active/feeds_data_syndication?display=views-mode-list/2

instead of:

data-node/active/feeds_data_syndication/2?display=views-mode-list

This need a previous check of the url to detect any query params.

The problem is at line 45 of data_node.js:

var ajax_url = $('.data-node-ajax-url', form).val() + '/' + value;

A possible fix:

var ajax_url = $('.data-node-ajax-url', form).val();
if (ajax_url.indexOf('?') > -1) {
    var parts = ajax_url.split('?');
    ajax_url = parts.shift();
    ajax_url += '/' + value + '?' + parts.join('?');
} else {
    ajax_url += '/' + value;
}

Comments

avpaderno’s picture

Version: 6.x-1.0-alpha9 » 6.x-1.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)
Issue tags: -ajax_url, -add_url, -remove_url

I am closing this issue since it's for a unsupported Drupal version.