Missing Calender Sidebar
Brought to you by:
rlseaton
There was a bug with openrooms system - calendar on the left-hand-side does NOT show up in a consistent way. Sometimes, it shows up and sometimes it does not.
The problem was caused by an Ajax function pushes calendar html content to a placeholder that is not rendered yet.
in file modules/calendar.php, the div placeholder (id:calendarModule) was not rendered yet by the time of function ajaxFunction pushed calender content to it as innerhtml.
An easy fix was to render that div field before triggering the javascript function. (moving div from line 121 to line 6, please see the attachment for detail)
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
The bug was fixed at Georgia State University Library @ http://homer.gsu.edu/rooms
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I imagine this isn't restricted to calendar.php as I also did the same div re-jiggering on the following scripts:
dayview.php
login.php
roomdetails.php
Thanks for the heads up!
Last edit: Anonymous 2014-11-07
Another issue I came across was not having the cal_days_in_month function available on my version of php (php 5.2.14). I included the following code starting at line 19 in calendarAJAX.php and made sure to place it before the cal_days_in_month function was called and now my calendar is displaying.
//some older php versions don't have cal_days_in_month() - this code accounts for that
if(!function_exists('cal_days_in_month')) {
function cal_days_in_month ($calendar, $month, $year) {
// $calendar just gets ignored, assume gregorian
// calculate number of days in a month
return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);
}
}