phpScheduleIt
June 18, 2013, 04:42:32 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: v. 2.4.1: Schedule Display Error  (Read 211 times)
adipasqu
Newbie
*

Karma: 0
Posts: 16


« on: March 25, 2013, 11:41:20 PM »

I just tried to upgrade from 2.3.6 to 2.4.1 and have seen some odd behavior that I haven't seen discussed yet.  Please see https://chexserver2.cchem.berkeley.edu/241error.pdf  The schedule will not display properly in 2.4.1, but if I revert back to 2.3.6 everything is fine.  Also, I can't seem to make any new reservations as it gives an error with a conflicting reservation although there is none in reality.  Resource permissions are blank as well for users in 2.4.1, but are fine in 2.3.6.  Any ideas?

Regards,
Antonio
Logged
jonyb82
Newbie
*

Karma: 0
Posts: 6


« Reply #1 on: March 27, 2013, 10:57:45 AM »

I have this problem also, although I can still create bookings from the resource calendar.
I see no errors in the logs. 
This was also from an upgrade from 2.3.6, which I did manually by applying the sql upgrade files.

otherwise it all works well.

Thanks

Jonathan Bramble

Logged
autohost
Jr. Member
**

Karma: 0
Posts: 93


« Reply #2 on: March 27, 2013, 11:10:35 AM »

Did you run the configure.php script to upgrade it?
Logged
jonyb82
Newbie
*

Karma: 0
Posts: 6


« Reply #3 on: March 27, 2013, 01:49:43 PM »

Did you run the configure.php script to upgrade it?

Yes, I tried that the first time and hit an sql error about some duplicated columns, but fixed that by manually upgrading the db as described in the installation instructions. all my data is intact and can login ok. I have rerun the configuration script and it appears to make a backup copy of my config.php file. I still have no proper view in file->bookings.

I will attempt to find any difference in the db schema next.

Thanks

Jonathan Bramble
Logged
adipasqu
Newbie
*

Karma: 0
Posts: 16


« Reply #4 on: March 27, 2013, 02:08:51 PM »

Did you run the configure.php script to upgrade it?

I upgraded properly as well.  No error with the auto-upgrade either.  DB seems to be fine as I can revert back to 2.3.6 without any problems.
-Antonio
Logged
kardeiz
Newbie
*

Karma: 0
Posts: 4


« Reply #5 on: March 27, 2013, 09:01:12 PM »

I had this same issue as well (I think it's the same issue).

Check your logs (if enabled) for an error involving the BeginDate function in /lib/Application/Schedule/DailyLayout.php ("Call to a member function BeginDate() on a non-object...").

This file has a loop that will go out of bounds if your schedule has a certain layout.

I changed the line (about 152):

Code:
while ($tempPeriod->BeginDate()->LessThan($nextPeriodTime))

to

Code:
while ($i < count($periods) && $tempPeriod->BeginDate()->LessThan($nextPeriodTime))

to prevent this error. I don't know if this is the best way to fix the issue, but it worked for me (at least as far as I can tell).
Logged
jonyb82
Newbie
*

Karma: 0
Posts: 6


« Reply #6 on: March 28, 2013, 07:04:17 AM »

Although I see no error in the logs I have tried the fix from kardeiz and I now see the schedule. I still have a green banner with "This is now your default schedule" across the top and the schedule flip button is not functional.

I'm going to try a fresh install and upgrade from save databases.

Cheers

Jonathan
Logged
kardeiz
Newbie
*

Karma: 0
Posts: 4


« Reply #7 on: March 28, 2013, 09:48:28 AM »

Although I see no error in the logs...

Sorry, I made a mistake--the BeginDate error I mentioned shows up in Apache error_log (not the phpScheduleIt logs).
Logged
adipasqu
Newbie
*

Karma: 0
Posts: 16


« Reply #8 on: March 28, 2013, 11:06:29 PM »

I had this same issue as well (I think it's the same issue).

Check your logs (if enabled) for an error involving the BeginDate function in /lib/Application/Schedule/DailyLayout.php ("Call to a member function BeginDate() on a non-object...").

This file has a loop that will go out of bounds if your schedule has a certain layout.

I changed the line (about 152):

Code:
while ($tempPeriod->BeginDate()->LessThan($nextPeriodTime))

to

Code:
while ($i < count($periods) && $tempPeriod->BeginDate()->LessThan($nextPeriodTime))

to prevent this error. I don't know if this is the best way to fix the issue, but it worked for me (at least as far as I can tell).

That solved the problem, thanks!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!