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

csev csev at umich.edu
Tue Oct 26 14:59:10 PDT 2010


Bryan, 

Make sure to file a JIRA with a patch and assign it to me or Gonzalo when this gets figured out to make sure it gets fixed in trunk and for 2.8.

I think that the scripts you are speaking of are the "check if I am about to be logged" out scripts  Interestingly in 2.7 this is off by default but the scripts run anyways - mostly to figure out that they are off :)  Unless you use the feature a quick workaround is to remove the bit of JQuery in portalscripts that fires these up.

In Sakai 2.8, things work differently.  I had the portal include a bit of data in the page that indicates if you are logged in or not so these scripts don't make any additional requests as they have the data they need.   I will test this in 2.8 to make sure it works in 2.8 with the new 2.8 approach.

I like the gateway site like feature so we need to make sure everything works.

Thanks.

/Chuck

On Oct 26, 2010, at 12:44 PM, 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