Forum OpenACS Development: Re: calendar error with anonymous user

Posted by Michael Cordova on
I have been testing Calendar on my box with OpenACS 5.5, AOLServer 4.5.1, Tcl 8.4.19, and PostgreSQL 8.2.11.

After installing OpenACS, I have installed Calendar 2.5.0d1 using APM "Install from repository".

The error came when an anonymous users (user_id = 0) try to see the calendar app, due to calendar::calendar_list returns an empty list, and then calendar::personal_p breaks: Query did not return any rows.

This time, I'm gonna ask here before commit any change... I have fixed that, instead of requiring login, setting the value of calendar_personal_p if there is no user logged in:

if { $user_id eq 0 } {
    set calendar_personal_p 0
} else {
    set calendar_personal_p [calendar::personal_p -calendar_id [lindex [lindex $calendar_list_aux 0] 1] ]