Portal - not fully logging out

Sam Ogden
Tera Guru

Hi All,

On our service portal if the user is logged out most of the items on the home page apart from the header are not visible.   In the top right corner of the header there should be the option to 'login':

find_real_file.png

However this afternoon in our Live instance the login icon is no longer showing and instead a grey circle appears.   Click this shows the options of profile and logout.   The rest of the home page appears as we would expect if the user was not logged in:

find_real_file.png

It almost seems like the login/logout section still thinks the user is logged in, but the rest of the portal does not.   If you click on the profile option it then takes you to a login page.

Any ideas why this would be happening?

Thanks

Sam

1 ACCEPTED SOLUTION

HI Jeffrey,



Thanks for all you assistance on this.   Over the weekend SN came back on the HI ticket.   One of our admins had made the user_id 'guest' inactive and this was what had caused the issue.   Once we had made the user 'guest' active again the expected functionality returned.



Do you happen to know how the 'guest' user_id had this effect?



Thanks



Sam


View solution in original post

11 REPLIES 11

I'd first start by looking at your content blocks and the header.   Make sure the settings in there(check boxes, if any conditions, etc) to make sure they are the same in both instances if one is working and the other is not.   Once in the header content block, I'd also look at the "bottom menu" to make sure all of those settings are the same as well.   I know there is a "logged in" check box there that will only display it if the user is logged in.   I'm not sure this is the cause but these are where I'd check first. Are both of your instances on the same versions?   I know we've seen this happen on ours when we've had Prod and Test/Dev on different instances.  


Both instances are on Helsinki patch 12.



Where do I find these content blocks?



The HTML section of the header has:




<div sp-navbar-toggle="" class="collapse navbar-collapse navbar-right" id="sp-nav-bar">


          <!-- Include The Menu -->


          <sp-widget widget="data.menu"></sp-widget>


          <ul ng-if="::(!user.logged_in && page.id != portal.login_page_dv && !data.hasLogin)" class="nav navbar-nav">


              <li><a href ng-click="openLogin()">${Login}</a></li>


          </ul>


          <ul ng-if="::user.logged_in" class="nav navbar-nav">


              <!-- chat, avatar, and logout -->


              <li ng-if="::data.connect_support_queue_id"><a href ng-click="openPopUp()">${Live Chat}</a></li>


              <!-- Announcement Picker -->


              <li class="embedded-list-menu">


                  <sp-widget widget="c.data.announcementPicker"></sp-widget>


              </li>


              <li class="dropdown hidden-xs">


                  <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">


                      <span class="navbar-avatar"><sn-avatar class="avatar-small-medium" primary="userID" /></span>


                      <span class="visible-lg-inline">{{::user.name}}</span>


                  </a>


                  <ul class="dropdown-menu">


                      <li><a ng-href="?id=user_profile&sys_id={{::user.sys_id}}">${Profile}</a></li>


                      <li><a href="{{::portal.logoutUrl}}">${Logout}</a></li>


                  </ul>


              </li>


              <li class="visible-xs-block"><a ng-href="?id=user_profile&sys_id={{::user.sys_id}}"><span class="navbar-avatar"><sn-avatar class="avatar-small-medium" primary="userID" /></span>{{::user.name}}</a></li>


              <li class="visible-xs-block"><a href="{{::portal.logoutUrl}}">${Logout}</a></li>


          </ul>


      </div>






It seems that it thinks the user is logged in even when they are not so is loading the dropdown menu, is there anyway we can check what it is passing back?



Thanks


Hmmm.. interesting.   What does the Server Script look like?  


The server side is:



// Defines the support queue ID that will be linked to by the Live Chat link in header
data.connect_support_queue_id = $sp.getValue('sp_chat_queue');
data.login_page = $sp.getValue('login_page');
var menu = $sp.getValue("sp_rectangle_menu");
data.menu = $sp.getWidgetFromInstance(menu);
if (data.menu && data.menu.data) {
data.menu.data.replace = true;
// Hide login if menu already has link to login
data.hasLogin = false;
if (data.menu.data.menu.items) {
  for(var i in data.menu.data.menu.items) {
    var item = data.menu.data.menu.items[i];
    if (item.type == 'page' && item.sp_page == data.login_page)
      data.hasLogin = true;
  }
}
}


data.loginWidget = $sp.getWidgetFromInstance('login-modal');
data.typeahead = $sp.getWidgetFromInstance('typeahead-search');
data.announcementPicker = $sp.getWidget("announcement-picker");
data.announcementWidget = $sp.getWidgetFromInstance("announcement-header-instance");




I've raised a Hi ticket on this, SN have just come back saying it appears the angular variable user is holding a value that should not be there if no one is logged in, not sure why though


HI Jeffrey,



Thanks for all you assistance on this.   Over the weekend SN came back on the HI ticket.   One of our admins had made the user_id 'guest' inactive and this was what had caused the issue.   Once we had made the user 'guest' active again the expected functionality returned.



Do you happen to know how the 'guest' user_id had this effect?



Thanks



Sam