Closed (fixed)
Project:
Node registration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2015 at 17:55 UTC
Updated:
8 Dec 2015 at 00:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dpfitzsi commentedPatch attached.
Comment #3
rudiedirkx commentedI've never understood this 'protection'. If 'user-uploaded files' can call Ajax, they surely can add something to
Drupal.settings, which would make this 'protection' useless. They can also call Ajax without Drupal.ajax, or even jQuery.ajax, and they can execute any Ajax commands...Anyway, good point. I've committed something slightly different.
Comment #6
danuddara commentedI have added his custom code to a module to override the settings in misc/ajax.js. This worked for me. you can alter it for your problem.
function hook_js_alter(&$javascript)
{
global $base_url;
drupal_add_js(
array(
'urlIsAjaxTrusted' => array($base_url."/your/ajax/ur"=>true)
),
'setting'
);
}
// console.log(Drupal.settings.urlIsAjaxTrusted[ajax.url]) in misc/ajax.js to find out the ajax call when triggering the event.
more info : https://www.drupal.org/node/2572117
Comment #7
rudiedirkx commentedThe patch in #2 and commit in #4 don't work? Those are the way to go, not custom adding JS settings.
Comment #8
danuddara commentedsorry mate, i was working out another custom project related to this error "The response failed verification so will not be processed". it gave me this link on google first. i just posted it to help the AJAX problem with misc/ajax v7.39.
Thought someone might find it useful here.