Closed (outdated)
Project:
Data
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2009 at 13:56 UTC
Updated:
23 Apr 2020 at 12:32 UTC
Jump to comment: Most recent
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
Comment #1
avpadernoI am closing this issue since it's for a unsupported Drupal version.