[Building Sakai] portalscripts.js causing error on login page in 2.7.x

Steve Swinsburg steve.swinsburg at gmail.com
Tue Oct 26 14:19:23 PDT 2010


Hi Bryan,

You could include a piece of jQuery to perform a GET request to the following Entity Broker URL on your instance:

/direct/session/current.json?auto=true

This will return a piece of JSON and you can see that userId/userEid is null, so this user is not logged in. You might also be able to use /direct/user/current.json, I've not sure which one would be the preferred approach though.

cheers,
Steve

On 27/10/2010, at 3:44 AM, Bryan Bakotich wrote:

> Hi,
> 
> I just upgraded a dev server from 2.6.x to 2.7.x and now when you navigate to the login page it keeps refreshing itself. We use the sakai property gatewaySiteList to display two sites on the landing page instead of just the gateway page.
> 
> The problem is being caused because portalscripts.js detects whether a user is logged in or not by looking for the presence of the siteNav div. This div exists when a user is not logged in because of the above property that we are using. So some functions are being called that shouldn't be called unless you are logged in.
> 
> Prior to 2.7 the only symptom of this bug was a timeout warning being displayed even if you aren't logged in. In 2.7 there is an extra check in the poll_session_data function that looks for a userId and if it is null redirect to the loggedOutUrl. This is why the page keeps refreshing.
> 
> Is there a better check we can do to find out if a user is logged in or not? For a temporary solution I can take out the extra check for a userId so we at least get the same functionality as in 2.6, but it'd be nice to find a real fix to the problem. Thanks for the help!
> 
> -Bryan
> 
> -- 
> Bryan Bakotich
> Open Source Implementation Specialist
> Digital Media Center, Information & Technology Services
> Pacific Lutheran University
> Tacoma, WA 98447-0013
> Phone: 253-536-5021
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"



More information about the sakai-dev mailing list