Whenever my users login using secure site authentication - either through http authentication or with the secure site login form a page refresh is needed to load all the required javascripts or stylesheets. Some are enabled on login, but a lot are not.

For instance the administration menu will appear only after a page refresh (my biggest problem) - the same with some other modules, like ubercart.

I've tried altering module weights without results.

I even tried hard coding some of the needed javascript/css includes into a page template, but even then a page refresh was needed.

Any idea how to troubleshoot this?

thanks for a great module!

Comments

kenorb’s picture

bkosborne’s picture

me as well.... don't think it's related to above tho

bkosborne’s picture

I figured out what is happening, but not why.

In admin_menu_init, the admin JS and CSS is added in a conditional that checks if the current user as access to view the admin_menu. Because of some weirdness with securesite/admin_menu that I'm not currently aware of yet, the user may not be loaded or logged in yet when this hook is fired.

Adding the JS/CSS manually in the page.tpl.php file fixes, but I'd rather not.

glynnr’s picture

I fixed this by editing function _securesite_user_login in securesite.inc, to comment out lines 194 and 196

  //if ($_GET['q'] == 'logout') {
      drupal_goto();
    //}

This forces a redirect on successful login.

bkosborne’s picture

Ahh why didn't I think of that. Great idea.

Stomper’s picture

Yes, I have noticed the same issue on my end. Atleast on when testing on my localhost, upon login via securesite module, I need to refresh the page inorder for administration menu to showup.

But, when I login via securesite module on my live server, the entire homepage/page for that matter does not display, I must refresh the page inorder for the page to display. It just loads to a blank page.

kenorb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.