Closed (fixed)
Project:
Web File Manager
Version:
6.x-2.9-alpha2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Aug 2008 at 08:53 UTC
Updated:
14 Jul 2012 at 23:19 UTC
Hi,
during the initialization of webfm in the node edit form, the AJAX post requests to http://../webfm_js/ cause repeated calls of hook_init. This causes problems e.g. for the protected_node module which locks nodes for editing in its init function. To avoid such issues, jQuery started to mark ajax requests with an additional POST header:
// Set header so the called script knows that it's an XMLHttpRequest
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
The following patch adds the same header for the webfm ajax calls, so that modules can distinguish between real and AJAX POST requests. Please consider adding this, so that modules like protected_node are able to work together with webfm (see http://drupal.org/node/281584).
| Comment | File | Size | Author |
|---|---|---|---|
| webfm_signal_xmlhttp_request.patch | 449 bytes | Frank Steiner |
Comments
Comment #1
robmilne commentedI've just resurfaced and this looks to be a worthy change. Is this change also required in the 5.x version?
Comment #2
Frank Steiner commentedFor the checkout module, I don't think so, because it doesn't use hook_init in 5.x. But I guess it can't hurt to mark AJAX request in the same way as jQuery, maybe some other modules can make use of it.
Comment #3
robmilne commentedsee 6.x-2.10-rc1
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.