Author Topic: [1.5.3+1.6 beta1] Template -> Task -> edit task fails  (Read 4262 times)

neuron

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
[1.5.3+1.6 beta1] Template -> Task -> edit task fails
« on: October 26, 2009, 06:09:08 am »
If you create a template with some tasks, then go into the template, click a task and attempt to edit it you'll get 500 internal server error.

I'm also a bit unsure on how I'm supposed to "organize" tasks in templates.  I'd like to be able to continue to update them/organize them/edit them, but I'm unsure where to put them.

I might just make a workspace called templates and archive it as that's possible now, but I'm not sure if that part of the template system is thought through?

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #1 on: October 26, 2009, 09:59:44 am »
Hi,

Can you enable the debug mode?
With debug mode enabled, a detailed error message will be shown instead of the error 500, it will be easier for us to find the problem if you provide us the error message shown when you try to edit.

To enable debug mode you have to edit 'conig/config.php', at the definition of the DEBUG constant, change its value to true.
Code: [Select]
define('DEBUG', true);

please tell us when you get the error detail.
regards

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #2 on: October 26, 2009, 10:05:50 am »
The template system is not too thought out as you say. At first templates were just individual tasks and milestones that you could instantiate on the Tasks module. Then we added the capability of grouping tasks and milestones into one template. But it wasn't designed thoroughly from the beginning, it was just a small feature that began growing. We shall improve it greatly soon, because we see that it is very useful for many people but it now has some limitations.

neuron

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #3 on: October 26, 2009, 10:20:33 am »
Can you enable the debug mode?
With debug mode enabled, a detailed error message will be shown instead of the error 500, it will be easier for us to find the problem if you provide us the error message shown when you try to edit.

With debug mode enabled I dont get the same error actually.  However, when pulling up the screen and clicking on different sub options in the task, for example workspace complains about this:

Fatal error: Call to a member function getId() on a non-object in /home/opengoobeta/public_html/application/views/task/add_task.php on line 112

As I've seen this on clean installs of 1.5.3 I figured it was easily reproduced, hence the lack of a log in the original report.

We shall improve it greatly soon, because we see that it is very useful for many people but it now has some limitations.

Even with it's limited features it's a VERY handy tool.  I use it to create a bunch of tasks and milestones associated with starting new projects / taking in new clients for example.

neuron

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #4 on: October 26, 2009, 10:21:44 am »
It seems with debug mode on, I can load the screen but clicking on the different options do nothing (except from workspace, which produces the error above).

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #5 on: October 26, 2009, 02:36:11 pm »
Try replacing line 112 of '/application/views/task/add_task.php' with this one

Code: [Select]
<?php echo '<div style="float:left;">' .select_project2('task[project_id]'$project instanceof Project $project->getId() : 0$genid) .'</div>'?>

neuron

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #6 on: October 27, 2009, 04:29:16 am »
Try replacing line 112 of '/application/views/task/add_task.php' with this one

Code: [Select]
<?php echo '<div style="float:left;">' .select_project2('task[project_id]'$project instanceof Project $project->getId() : 0$genid) .'</div>'?>


Get the same error with that fix, and with and without the fix most of the options (like tags, task data etc) dont show up at all, so I think there's a different underlaying problem here.

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #7 on: October 27, 2009, 10:48:56 am »
Now I could reproduce the error, to fix it you also have to replace line 447 of '/application/views/task/add_task.php' with
Code: [Select]
wsTree.previousValue = <?php echo $project instanceof Project $project->getId() : 0 ?>;
and line 1650 of '/application/controllers/TaskController.class.php' with
Code: [Select]
else continue;

neuron

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #8 on: October 28, 2009, 06:18:11 am »
Great, thank you very much :)

a2opinion

  • Full Member
  • ***
  • Posts: 177
  • Christian
    • View Profile
    • A Second Opinion
Re: [1.5.3+1.6 beta1] Template -> Task -> edit task fails
« Reply #9 on: October 30, 2009, 12:47:07 pm »
I had noticed the exact same problem and commented on it here

So I'm trying your fix.. but line 1650 in TaskController.class.php reads:
Code: [Select]
$forever = 0;
and it's in the middle of an array.

would you mind stating what the old line to replace is? then I can just find it and replace it rather than worry about matching line numbers.

Also I've noticed that when I set a date for a task, the date is saving as the day before.
AND when ever I add new tasks from a template, any SUB-tasks get duplicated...