Is it a Bug?

Discussion for TimeTrex open source community developers.
Locked
luz.frank
Posts: 7
Joined: Wed Apr 08, 2009 7:26 am

Is it a Bug?

Post by luz.frank »

Hi,
VERSION: 2.2.20 Standard.
PROBLEM: getting a blank page at "Schedule -> Scheduled Shifts".

In order to fix it, I have done the following:

FILE: interface/schedule/ScheduleList.php
LINE: 197
METHOD: getSearchByCompanyIdAndArrayCriteria();

Originally the 3rd paramenter[limit] was "$current_user_prefs->getItemsPerPage()" which returns the value of the paramenter[page], and the var $page was placed at the 4th paramenter.

By changing the 3rd paramenter[limit] to NULL and the 4th [page] to $current_user_prefs->getItemsPerPage(), the problem was fixed.

Regards,

Francisco Luz
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

What was the original PHP error that was causing the "blank page".

The change you made appears to break the pagination functionality, which is extremely important especially for this page.
luz.frank
Posts: 7
Joined: Wed Apr 08, 2009 7:26 am

Post by luz.frank »

1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 10

ADOConnection._Execute(SELECT COUNT(*) FROM schedule as a LEFT JOIN user_date as c ON a.user_date_id = c.id LEFT JOIN users as d ON c.us...) % line 998, file: adodb.inc.php
ADOConnection.Execute(SELECT COUNT(*) FROM schedule as a LEFT JOIN user_date as c ON a.user_date_id = c.id LEFT JOIN users as d ON c.us..., Array[1]) % line 497, file: adodb-mysql.inc.php
ADODB_mysql.SelectLimit(SELECT COUNT(*) FROM schedule as a LEFT JOIN user_date as c ON a.user_date_id = c.id LEFT JOIN users as d ON c.us..., 1, -1, Array[1]) % line 162, file: adodb-mysql.inc.php
ADODB_mysql.GetOne(SELECT COUNT(*) FROM schedule as a LEFT JOIN user_date as c ON a.user_date_id = c.id LEFT JOIN users as d ON c.us..., Array[1]) % line 444, file: adodb-lib.inc.php _adodb_getcount(Object:ADODB_mysqlt, select a.id as schedule_id, a.status_id as status_id, a.start_time as start_time, a.end_time a..., Array[1], 0) % line 505, file: adodb-lib.inc.php
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

I see you are using MySQL, please see this thread for the proper fix to the issue:
http://forums.timetrex.com/viewtopic.php?t=1188
luz.frank
Posts: 7
Joined: Wed Apr 08, 2009 7:26 am

Post by luz.frank »

Hi shaunw,
Thank you for your light speed responses.

After changing type from mysql to mysqli and cleaning the cache, I get the message "Missing file: C:\Inetpub\wwwapache\timetrex\classes\adodb/drivers/adodb-mysqlti.inc.php" on attempt of login.

At first glance I would say that there is some thing to do with the last two forwarded slashed "/". But I will try to debug and figure it out tomorrow because I gotta go to bed now, therefore if you know what's the cause of it and its solution, I would love to hear from you.

Thank you again
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

It appears you used: "mysqlti" rather then just: "mysqli"

There should be no "t" in the "mysqli".
luz.frank
Posts: 7
Joined: Wed Apr 08, 2009 7:26 am

Post by luz.frank »

That's what happens when you stay in front of a computer for more than 12 hours :D .
Thank you
Locked