Bug (approved)

can't set dbItem->category for object of type Effort

Summary

approved
Mar 12, 2009
100%
Jan 11, 2011
Mar 13, 2009 / guest
Jan 11, 2011 / pixtur
suggested
 

Attached files

No files uploaded
 
After upgrading to latest Streber version, we have a problem on all the projects' homepages in which we used efforts. At least, this is the only reason we guessed to explain why some fail to display, and some don't.
Please see screenshot to see the problem (thanks Fireshot ;-))

Issue report

Block
Always
0.0902
???
Error 20090312222945 ERROR: db/db_item.inc.php : 449 can't set dbItem->category for object of type Effort
Error 20090312222945 db/db_item.inc.php : 530 -> DbItem::__set("category", "1")
Error 20090312222945 db/class_effort.inc.php : 36 -> DbProjectItem::__construct([20])
Error 20090312222945 db/class_effort.inc.php : 327 -> Effort::__construct([20])
Error 20090312222945 db/class_project.inc.php : 230 -> Effort::getAll([1])
Error 20090312222945 db/class_project.inc.php : 302 -> Project::getEfforts()
Error 20090312222945 pages/project_view.inc.php : 264 -> Project::getEffortsSum()
Error 20090312222945 std/class_pagehandler.inc.php : 738 -> ProjView()
Error 20090312222945 std/class_pagehandler.inc.php : 619 -> PageHandler::show("projView", [1])
Error 20090312222945 pages/project_more.inc.php :2360 -> PageHandler::showFromPage()
Error 20090312222945 std/class_pagehandler.inc.php : 738 -> projEditSubmit()
Error 20090312222945 index.php : 220 -> PageHandler::show("projEditSubmit")
Error 20090312222945
Error 20090312222945 Variables in __set():
Error 20090312222945 this = OBJECT
Error 20090312222945 name = category
Error 20090312222945 val = 1
Error 20090312222945 v0.0902, projView, from 82.67.192.15, uri:/index.php
 

7 Comments

guest:Sorry, but I can't upload files... interesting :-(

9 years ago -

The message appear in the right pane on the project homepage, just under "Created by: " line.

pixtur:you have to register to upload files

9 years ago

Could you please register as a new user? I am interesting in seeing the screenshot.

guest:I got the same problems

9 years ago -

do yo have any clue of what could it be?

guest:Sorry, I couldn't find this post afterwards, and thought it had been dropped !

9 years ago -

Registering now !

guest:Forgotten bug ?

9 years ago -

http://www.streber-pm.org/7952 screenshots here...

guest:Found solution...

9 years ago -

Since I got no answer at all on this, which is a BLOCKING problem, I spent some time didding around.
Solution found, maybe not the best, but which makes things work:
  1. open file db/class_effort.inc.php
  2. go to function initFields
  3. in the loop "foreach(array" with lots of "new FieldSomething", add:
new FieldInternal(array('name'=>'category',
    'default'=>TCATEGORY_TASK,
    'log_changes' => true,
  )),

pixtur:

8 years ago

added fix to the code. This comes because of backward-compatibility issues to old db-structures.