Author Topic: Beta 1.1 Time Error  (Read 4127 times)

noorbeast

  • Newbie
  • *
  • Posts: 23
    • View Profile
Beta 1.1 Time Error
« on: December 08, 2008, 11:10:21 pm »
After upgrading from OG 1, I get the following Time/Print report error: Query failed with message 'Unknown column 'og_project_tasks.deleted_by' in 'where clause''

Looks like a database issue, any ideas?

Update, tried Time/Print report under a clean 1.1 beta install and I get a Error 500: Internal Server Error.
« Last Edit: December 08, 2008, 11:25:13 pm by noorbeast »

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Beta 1.1 Time Error
« Reply #1 on: December 09, 2008, 09:40:34 am »
Ok, that was quick!

It's not a database issue, there's a bug in the code. You need to change all 'deleted_by = 0' in 'application/models/timeslot/Timeslots.class.php' (lines 124, 141 and 210) for 'trashed_by_id = 0'.

Thanks for the bug report!

noorbeast

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Beta 1.1 Time Error
« Reply #2 on: December 09, 2008, 10:29:06 am »
Many thanks, I can confirm the solution works fine. Now to poke around and see what else I can find  :P

Update: I can confirm it works for task timeslots, and general timeslots, but task and general timeslots throws a similar error: Query failed with message 'Unknown column '0trashed_by_id' in 'where clause''
« Last Edit: December 09, 2008, 10:57:57 am by noorbeast »

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Beta 1.1 Time Error
« Reply #3 on: December 09, 2008, 11:51:17 am »
What parameters are you using for the report? I couldn't reproduce it.

noorbeast

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Beta 1.1 Time Error
« Reply #4 on: December 09, 2008, 12:05:39 pm »
I get the following with any combination of parameters when "task and general timeslots" is selected under timeslot :

Query failed with message 'Unknown column '0trashed_by_id' in 'where clause''
Error params:
File:    /var/www/opengoo/environment/library/database/adapters/AbstractDBAdapter.class.php
Line:    378
Sql:    SELECT `og_timeslots`.* FROM `og_timeslots`, `og_project_tasks`, `og_projects` WHERE `object_manager` = 'ProjectTasks' and og_project_tasks.trashed_by_id = 0trashed_by_id = 0 and og_project_tasks.id = object_id and og_project_tasks.project_id = `og_projects`.id and og_project_tasks.project_id in ......................................
« Last Edit: December 09, 2008, 12:09:25 pm by noorbeast »

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Beta 1.1 Time Error
« Reply #5 on: December 09, 2008, 01:21:07 pm »
Seems that you double pasted when replacing 'deleted_by = 0' for 'trashed_by_id = 0'. Search in that same file for 'trashed_by_id = 0trashed_by_id = 0' and change it for 'trashed_by_id = 0'

noorbeast

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Beta 1.1 Time Error
« Reply #6 on: December 09, 2008, 06:23:24 pm »
You are so correct, I can confirm my own stupidity, working fine now  ;)