Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After enabling this module, all pages have a "Please wait..." loader that breaks the site for few miliseconds. Hiding that with css hides the text but still breaking the layout...
:not(.html) .ajax-progress-throbber{ display:none;}
Any way to remove loader feature?
Comment | File | Size | Author |
---|---|---|---|
#8 | autologout-2353251-8.patch | 917 bytes | MustangGB |
|
Comments
Comment #1
preetam.chari CreditAttribution: preetam.chari commentedThis issue occurs mostly with ajax calls where https request gets redirected to http and if we have added the X-FRAME-OPTIONS SAMEORIGIN
Solution which helped me resolve the issue is as below, module version 7.x-4.3
File: autologout.js
Lines below should be replaced as below,
Place 1 around line 145:
function logout() {
$.ajax({
url: Drupal.settings.basePath + "?q=autologout_ahah_logout",
type: "POST",
success: function() {
window.location = localSettings.redirect_url;
},
error: function(XMLHttpRequest, textStatus) {
if (XMLHttpRequest.status == 403 || XMLHttpRequest.status == 404) {
window.location = localSettings.redirect_url;
}
}
});
}
to
function logout() {
var site_host = window.location.host;
var site_base_url = "https://"+site_host+"/en";
$.ajax({
url: site_base_url + "?q=autologout_ahah_logout/",
type: "POST",
success: function() {
window.location = localSettings.redirect_url;
},
error: function(XMLHttpRequest, textStatus) {
if (XMLHttpRequest.status == 403 || XMLHttpRequest.status == 404) {
window.location = localSettings.redirect_url;
}
}
});
}
Place 2 around line 200
Drupal.ajax['autologout.getTimeLeft'] = new Drupal.ajax(null, $(document.body), {
url: Drupal.settings.basePath + '?q=autologout_ajax_get_time_left',
event: 'autologout.getTimeLeft',
error: function(XMLHttpRequest, textStatus) {
// Disable error reporting to the screen.
}
});
to
var site_host = window.location.host;
var site_base_url = "https://"+site_host +"/en";
Drupal.ajax['autologout.getTimeLeft'] = new Drupal.ajax(null, $(document.body), {
url: site_base_url + '?q=autologout_ajax_get_time_left/',
event: 'autologout.getTimeLeft',
error: function(XMLHttpRequest, textStatus) {
alert(url);
// Disable error reporting to the screen.
}
});
Place 3 around line 250:
Drupal.ajax['autologout.refresh'] = new Drupal.ajax(null, $(document.body), {
url: Drupal.settings.basePath + '?q=autologout_ahah_set_last',
event: 'autologout.refresh',
error: function(XMLHttpRequest, textStatus) {
// Disable error reporting to the screen.
}
});
to
var site_host = window.location.host;
var site_base_url = "https://"+site_host +"/en";
Drupal.ajax['autologout.refresh'] = new Drupal.ajax(null, $(document.body), {
url: site_base_url+ '?q=autologout_ahah_set_last/',
event: 'autologout.refresh',
error: function(XMLHttpRequest, textStatus) {
// Disable error reporting to the screen.
}
});
Comment #2
johnennew CreditAttribution: johnennew at Deeson commented@preetam.chari Any chance of providing that as an actual patch file? You'll feel better for learning how, I guarantee it!
https://www.drupal.org/node/707484
Comment #3
preetam.chari CreditAttribution: preetam.chari commented@Ceng: I will definitely try.Thanks
Comment #4
MustangGB CreditAttribution: MustangGB commentedI think this is a nicer way of doing it.
Comment #5
nils.destoop CreditAttribution: nils.destoop as a volunteer and at Wunder commentedThis is more correct. Set the progress once when constructing the ajax.
Comment #6
MustangGB CreditAttribution: MustangGB commentedAnd what about the refresh and logout events?
Comment #7
JordanMagnuson CreditAttribution: JordanMagnuson commentedYes, it seems to me that the progress needs to be unset at three locations where there is an ajax callback:
Comment #8
MustangGB CreditAttribution: MustangGB commentedRerolled.