Thank you so much for taking the time to implement these features!
This is 100% the best "whole page throbber" solution and there are multiple modules out there, all of which I think I have tested. The dev release fixes all of the issues I was having, including the one in this issue queue.
When logging into user account, the ?throbber=1 string is added, which for some reason is throwing an access denied error... essentially not allowing me to login to administrator accounts?
Is the ?throbber=1 string supposed to append to login urls for some reason?
Hard to see how this would happen, especially since the new code only removes the throbber from urls, it doesn't add it anywhere new.
It's a link to /user that gets the ?throbber=1 treatment or is it the login form? What do you have in your configuration for the module (A screenshot would be nice.)
1. ?throbber=1 still appended on user/logout, user/login, and also on custom home button in a page.tpl.php template <a type="button" class="navbar-toggle navbar-toggle-fa navbar-right fa fa-user fa-2x" id="user-dash-home" href="<?php print $base_path; ?>user/<?php print $user->uid; ?>/dashboard" title="User Home"></a>
2. on the custom button in page.tpl.php throbber spins and never loads the dasboard page (stays on the current page).
My configuration includes all pages; however, I have had to select the checkbox "Only the listed pages" and include every page (node, node/*, user/, user/*, etc, etc). For some reason "All pages except those listed" has never worked for my site. Then I also include the ids of all the submit elements since they aren't always "a" tags.
Is it possible the function that removes the "?throbber=1" from url doesn't work on specific urls? Maybe on login/logout pages? Not sure why that would effect the page.tpl.php file I have with custom button though.
Yes, I am able to reproduce this, @cthshabel. The problem is that the hook the module uses to modify urls (hook_url_outbound_alter) gets invoked in the redirects during a login/logout. And since you have a rule for "user/*", then the redirects get the throbber parameter added to them.
With the current logic of the module, this can't be fixed, unfortunately. You should probably use more specific URLs than user/*, it would reduce the occurrence of this issue.
Ok understandable. I will work around it. I'm certain there is a way I can get things playing nicer. Thanks a lot for your help. This has made the module completely usable for us and I am very excited to be able to include this feature!
@pmusaraj, I am hoping you are around. I started noticing that content was being saved twice. In other words, on node_save (submit), two identical nodes are created. After MULTIPLE hours of troubleshooting, I found it is caused directly by page throbber interfering with some other module (maybe path auto?). I do have several URL aliases, but I'm unsure why the Page Throbber module would cause this?
I have a staging site setup that shows the problem. Can you think of any reason why this would happen and a possible fix to avoid this? Immediately after I disable Page Throbber, the issue is gone. If I enable module, issue is present.
SOLVED: I should have dug into this more before posting, but at least it can save another person hours of troubleshooting possibly. The problem was directly due to including the specific submit button on "Show throbber for specific form buttons (selectors)". I'm not sure WHY this happens, but between redirects and the URL being modified to contain the throbber, I believe node_save is triggered multiple times. Anyways, after removing that from the selectors, it works fine.
I know you mentioned that before. It is best to be very selective about the "selected pages" and "specific form buttons (selectors)". Thanks!
Thanks for finding your own solution. The script does mess with forms when assigning it to form buttons, so yes, users need to be careful on what they use it for.
Cheers!
Comments
Comment #1
nwom commentedComment #2
cthshabel commentedI am hoping there is a way to do this too. I have looked into several options to remove, but I am stuck. Any progress on this?
Comment #3
pmusaraj commentedPlease try out the dev version, a fix for this has been included.
Comment #4
cthshabel commentedAbsolutely PERFECT.
Thank you so much for taking the time to implement these features!
This is 100% the best "whole page throbber" solution and there are multiple modules out there, all of which I think I have tested. The dev release fixes all of the issues I was having, including the one in this issue queue.
Thank you again.
Comment #5
liquidcms commentedComment #6
cthshabel commentedOk, I am seeing one significant issue.
When logging into user account, the ?throbber=1 string is added, which for some reason is throwing an access denied error... essentially not allowing me to login to administrator accounts?
Is the ?throbber=1 string supposed to append to login urls for some reason?
Comment #7
cthshabel commentedNot as significant as mentioned above.
But it seems the throbber still does come in on login? I need to further debug and I will update again if issue is really related
Comment #8
pmusaraj commentedHard to see how this would happen, especially since the new code only removes the throbber from urls, it doesn't add it anywhere new.
It's a link to /user that gets the ?throbber=1 treatment or is it the login form? What do you have in your configuration for the module (A screenshot would be nice.)
Comment #9
cthshabel commentedThe exact issue I see:
1. ?throbber=1 still appended on user/logout, user/login, and also on custom home button in a page.tpl.php template
<a type="button" class="navbar-toggle navbar-toggle-fa navbar-right fa fa-user fa-2x" id="user-dash-home" href="<?php print $base_path; ?>user/<?php print $user->uid; ?>/dashboard" title="User Home"></a>2. on the custom button in page.tpl.php throbber spins and never loads the dasboard page (stays on the current page).
My configuration includes all pages; however, I have had to select the checkbox "Only the listed pages" and include every page (node, node/*, user/, user/*, etc, etc). For some reason "All pages except those listed" has never worked for my site. Then I also include the ids of all the submit elements since they aren't always "a" tags.
Is it possible the function that removes the "?throbber=1" from url doesn't work on specific urls? Maybe on login/logout pages? Not sure why that would effect the page.tpl.php file I have with custom button though.
Comment #10
pmusaraj commentedYes, I am able to reproduce this, @cthshabel. The problem is that the hook the module uses to modify urls (hook_url_outbound_alter) gets invoked in the redirects during a login/logout. And since you have a rule for "user/*", then the redirects get the throbber parameter added to them.
With the current logic of the module, this can't be fixed, unfortunately. You should probably use more specific URLs than user/*, it would reduce the occurrence of this issue.
Comment #11
cthshabel commentedOk understandable. I will work around it. I'm certain there is a way I can get things playing nicer. Thanks a lot for your help. This has made the module completely usable for us and I am very excited to be able to include this feature!
Comment #12
cthshabel commented@pmusaraj, I am hoping you are around. I started noticing that content was being saved twice. In other words, on node_save (submit), two identical nodes are created. After MULTIPLE hours of troubleshooting, I found it is caused directly by page throbber interfering with some other module (maybe path auto?). I do have several URL aliases, but I'm unsure why the Page Throbber module would cause this?
I have a staging site setup that shows the problem. Can you think of any reason why this would happen and a possible fix to avoid this? Immediately after I disable Page Throbber, the issue is gone. If I enable module, issue is present.
Thanks for any ideas you may have.
Comment #13
cthshabel commentedSOLVED: I should have dug into this more before posting, but at least it can save another person hours of troubleshooting possibly. The problem was directly due to including the specific submit button on "Show throbber for specific form buttons (selectors)". I'm not sure WHY this happens, but between redirects and the URL being modified to contain the throbber, I believe node_save is triggered multiple times. Anyways, after removing that from the selectors, it works fine.
I know you mentioned that before. It is best to be very selective about the "selected pages" and "specific form buttons (selectors)". Thanks!
Comment #14
pmusaraj commentedThanks for finding your own solution. The script does mess with forms when assigning it to form buttons, so yes, users need to be careful on what they use it for.
Cheers!
Comment #15
nwom commentedThe form submit problem is due to the Safari fix. I have detailed the problem here and provided a workaround: #2616266: Safari Fix breaks Form Submit and Save & Edit buttons
Comment #16
nwom commentedSadly the query string is still shown and causes alot of issues with caching. There is already another issue open for this.