PDA

View Full Version : Can't edit a task


dangermouse
01-07-06, 06:59 AM
I've just installed the latest version of dotproject, along with PHP 5.1.4 and MySQL 5.0.22, with Apache 2.0.58 on my desktop at work. I did have a previous version, running on my linux server at home with PHP 4.2.2, MySQL 3.23.54, DotProject was 2.x and Apache was 2.x as well.

I exported the database using PHPMyAdmin and imported into the new database on my work PC. For the most part everything works, except when accessing the tasks via the tasks tab or editing any task and trying to save it.

Tasks can be added, or viewed from within a project.

When trying to edit and save a task the following appears:

ERROR: C:\Server\htdocs\dotproject\includes\db_adodb.php( 61): Error executing:

UPDATE `tasks` SET task_name='Remove access to old system',task_parent='21',task_milestone='1',task_p roject='2',task_owner='2',task_start_date='2006-06-05 09:00:00',task_duration='1',task_duration_type='1' ,task_hours_worked='0',task_end_date='2006-07-10 10:00:00',task_status='0',task_priority='0',task_p ercent_complete='',task_description='Remove old icons from desktop, and or rename the executable.\r\n\r\nNeed to run this way until the PC\'s are upgraded with the GX520\'s.',task_target_budget='0.00',task_related_ url='',task_creator='2',task_order='0',task_client _publish='0',task_dynamic='',task_access='0',task_ notify='1',task_departments='',task_contacts='',ta sk_type='1' WHERE task_id='21'


Backtrace:
0 C:\Server\htdocs\dotproject\includes\db_adodb.php: 61 dprint('C:\\Server\\htdocs\\dotproject\\includes\\ db_adodb.php',61,0,'Error executing:

UPDATE `tasks` SET task_name=\'Remove access to old system\',task_parent=\'21\',task_milestone=\'1\',t ask_project=\'2\',task_owner=\'2\',task_start_date =\'2006-06-05 09:00:00\',task_duration=\'1\',task_duration_type= \'1\',task_hours_worked=\'0\',task_end_date=\'2006-07-10 10:00:00\',task_status=\'0\',task_priority=\'0\',t ask_percent_complete=\'\',task_description=\'Remov e old icons from desktop, and or rename the executable.\\r\\n\\r\\nNeed to run this way until the PC\\\'s are upgraded with the GX520\\\'s.\',task_target_budget=\'0.00\',task_rel ated_url=\'\',task_creator=\'2\',task_order=\'0\', task_client_publish=\'0\',task_dynamic=\'\',task_a ccess=\'0\',task_notify=\'1\',task_departments=\'\ ',task_contacts=\'\',task_type=\'1\' WHERE task_id=\'21\'

')
1 C:\Server\htdocs\dotproject\includes\db_connect.ph p:345 db_exec('UPDATE `tasks` SET task_name=\'Remove access to old system\',task_parent=\'21\',task_milestone=\'1\',t ask_project=\'2\',task_owner=\'2\',task_start_date =\'2006-06-05 09:00:00\',task_duration=\'1\',task_duration_type= \'1\',task_hours_worked=\'0\',task_end_date=\'2006-07-10 10:00:00\',task_status=\'0\',task_priority=\'0\',t ask_percent_complete=\'\',task_description=\'Remov e old icons from desktop, and or rename the executable.\\r\\n\\r\\nNeed to run this way until the PC\\\'s are upgraded with the GX520\\\'s.\',task_target_budget=\'0.00\',task_rel ated_url=\'\',task_creator=\'2\',task_order=\'0\', task_client_publish=\'0\',task_dynamic=\'\',task_a ccess=\'0\',task_notify=\'1\',task_departments=\'\ ',task_contacts=\'\',task_type=\'1\' WHERE task_id=\'21\'')
2 C:\Server\htdocs\dotproject\modules\tasks\tasks.cl ass.php:453 db_updateObject('tasks',CTask::__set_state(array(
'task_id' => '21',
'task_name' => 'Remove access to old system',
'task_parent' => '21',
'task_milestone' => 1,
'task_project' => '2',
'task_owner' => '2',
'task_start_date' => '2006-06-05 09:00:00',
'task_duration' => '1',
'task_duration_type' => '1',
'task_hours_worked' => '0',
'task_end_date' => '2006-07-10 10:00:00',
'task_status' => '0',
'task_priority' => '0',
'task_percent_complete' => 0,
'task_description' => 'Remove old icons from desktop, and or rename the executable.

Need to run this way until the PC\'s are upgraded with the GX520\'s.',
'task_target_budget' => '0.00',
'task_related_url' => '',
'task_creator' => '2',
'task_order' => '0',
'task_client_publish' => '0',
'task_dynamic' => 0,
'task_access' => '0',
'task_notify' => '1',
'task_departments' => '',
'task_contacts' => '',
'task_custom' => NULL,
'task_type' => '1',
'_tbl' => 'tasks',
'_tbl_key' => 'task_id',
'_error' => '',
'_query' =>
DBQuery::__set_state(array(
'query' => NULL,
'table_list' => NULL,
'where' => NULL,
'order_by' => NULL,
'group_by' => NULL,
'limit' => NULL,
'offset' => -1,
'join' => NULL,
'type' => 'select',
'update_list' => NULL,
'value_list' => NULL,
'create_table' => NULL,
'create_definition' => NULL,
'_table_prefix' => '',
'_query_id' => NULL,
'_old_style' => NULL,
)),
'_prefix' => '',
'_action' => 'updated',
)),'task_id',false)
3 C:\Server\htdocs\dotproject\modules\tasks\do_task_ aed.php:130 store()
4 C:\Server\htdocs\dotproject\index.php:259 require('C:\\Server\\htdocs\\dotproject\\modules\\ tasks\\do_task_aed.php')


Warning: Cannot modify header information - headers already sent by (output started at C:\Server\htdocs\dotproject\includes\main_function s.php:554) in C:\Server\htdocs\dotproject\classes\ui.class.php on line 515

When I click back on the browser the following appears just over the EDIT TASK, in red.

CTask::store failed <br />

I'm wondering if this has to do with either my MySQL version or the PHP version.

jprovan
04-09-06, 09:49 AM
Was there ever a solution proposed for this problem ? I am having the same problem.

PHP 4.4.2
MySQL 4.1.21

caseydk
04-09-06, 01:04 PM
If you're referencing your other thread ( http://www.dotproject.net/vbulletin/showthread.php?t=5623 ) this is a completely different error. Your error refers to the task_log... this one is about the tasks themselves.

obones
05-10-06, 11:33 PM
Open inclues\db_adodb.php and replace line 61 with this content :

dprint(__FILE__, __LINE__, 0, "Error executing: <pre>$sql</pre><br>Message is $msg");


At least you will get the error message.
I'm getting the same error and in my case, it's because the task_milestone value is empty which is not acceptable for an integer value.