Is it possible to remove the "throbber" argument from the URL? Thanks in advanced.

Comments

nwom’s picture

Title: Remove "throbber" argument from the URL » Possibility of removing "throbber" querystring from the URL
cthshabel’s picture

I 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?

pmusaraj’s picture

Status: Active » Needs review

Please try out the dev version, a fix for this has been included.

cthshabel’s picture

Absolutely 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.

liquidcms’s picture

Status: Needs review » Reviewed & tested by the community
cthshabel’s picture

Ok, 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?

cthshabel’s picture

Not 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

pmusaraj’s picture

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.)

cthshabel’s picture

The 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.

pmusaraj’s picture

Version: 7.x-1.5 » 7.x-1.x-dev

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.

cthshabel’s picture

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!

cthshabel’s picture

@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.

cthshabel’s picture

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!

pmusaraj’s picture

Status: Reviewed & tested by the community » Closed (fixed)

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!

nwom’s picture

The 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

nwom’s picture

Sadly the query string is still shown and causes alot of issues with caching. There is already another issue open for this.