Bugs in Gantt v2.0 build 130926

I am encountering a few errors using dhtmlxGantt v2.0 build 130926.
html code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>""</title>
		<script src="../codebase/dhtmlxgantt.js" type="text/javascript"></script>
		<link rel="STYLESHEET" type="text/css" href="../codebase/dhtmlxgantt.css">
		<script src="../data/scripts/schedEntry.js" type="text/javascript"></script>
		<style>
			html,body
			 {
				margin:0px;
				padding:0px;
				width:100%;
				height:100%;
				overflow:hidden;
			}
		</style>
	</head>
	<body onload="ganttInit()">
	</body>
</html>

schedEntry.js :

function ganttInit() {
	gantt.config.xml_date = "%Y-%m-%d %H:%i";
	gantt.config.columns = [
        {name:"text", label:"Task Name", tree:true, width:'*' },
        {name:"progress", label:"Progress", width:80, align: "center",
            template: function(item) {
                if (item.progress >= 1)
                    return "Complete";
                if (item.progress == 0)
                    return "Not started";
                return item.progress*100 + "%";
            }
        },
        {name:"start_date", label:"Start Date", width:'80'},
        {name:"add",label:"",width:30}];

	gantt.config.lightbox.sections=[
	{name:"description", height:70, map_to:"text", type:"textarea", focus:true},
	{name:"progress", height:40, map_to:"progress",type:"textarea"},
	{name:"duration", height:72, map_to:"duration", type:"duration"}
	];

	gantt.config.scale_unit = "month";
	gantt.config.date_scale = "%F, %Y";
	gantt.config.scale_height = 50;
	gantt.config.subscales = [{unit:"day", step:7, date:"%j, %D" }];
	gantt.init(document.body);
	gantt.load('../codebase/connector/ganttData.php');
	var dp = new dataProcessor('../codebase/connector/ganttData.php');
	dp.init(gantt);
};
  1. When adding a new activity when there are no rows in the gantt_tasks table (schedule with no activities).

Uncaught TypeError: Cannot call method ‘getFullYear’ of undefined

If I manually add an activity to mySQL using an insert statement the Gantt will display the record and updates are written to the database. However new child tasks are not created in the database.

  1. In the edit task popup (lightbox) the names of the sections are not getting added. They are simply called undefined with the textarea or duration controls beneath it.

Any help will be greatly appreciated!

I made a demo application so hopefully someone can help me with this.
demo.zip (818 KB)

(2)

The visible name of section is taken from locale structure, which has names for default section, but has not ones for custon sections. You can configure it like next

gantt.locale.labels.section_progress = "Progress"; gantt.locale.labels.section_duration = "Duration";

name attribute of section is not the same as visible section title ( though we can change code to use it if label in locale is not defined - it will be better than showing the undefined string )

(1)
You are adding new activity by clicking on the plus button in the header, right ? Somehow it doesn’t throw errors while checking from my side. Which browser you are using ?

Hello,
maybe there is something with your db tables, i’ve used following for the test run, and everything seems worked:CREATE TABLE IF NOT EXISTS `gantt_links` ( `id` int(11) NOT NULL AUTO_INCREMENT, `source_task` int(11) NOT NULL, `target_task` int(11) NOT NULL, `type` varchar(1) NOT NULL, PRIMARY KEY (`id`) ) CREATE TABLE IF NOT EXISTS `gantt_tasks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `text` varchar(255) NOT NULL, `start_date` datetime NOT NULL, `duration` int(11) NOT NULL, `progress` float NOT NULL, `sortorder` int(11) NOT NULL, `parent` int(11) NOT NULL, PRIMARY KEY (`id`) )

Stanislav,

I am using the plus symbol in the header to add new tasks and the plus symbol in the parent task. In the dataprocessor debugger I see this error:

Log: row 1381843310934 marked [inserted,valid] Initiating data sending for 1381843310934 Initiating data sending for all rows Sending all data at once Server url: ../codebase/connector/ganttData.php?editing=true parameters Server response received details Action: error SID:1381843310934 TID:1381843310934 row 1381843310934 unmarked [updated,error]

I see this error in chrome v30.0.1599.69 and IE v10.0.10.

Aliaksandr: I’ll take a look at my database code when I get to the office but what you entered looks the same as mine.

Stanislav,

This section of the Gantt guide should be updated to show that the lightbox needs additional configuration to make the section headings read correctly, or implement the solution you described. docs.dhtmlx.com/gantt/desktop__d … _form.html

The original error I described in the beginning of the thread miraculously disappeared, and has been replaced with the dataprocessor error I described in my most recent post.

Aliaksandr: My db table design is the same as you posted. I also checked to make sure that the user account specified in my connector has adequate privileges to Select, Insert, Update and Delete records.

To check the details of the dataprocessor’s error, you can enable server side log
docs.dhtmlx.com/doku.php?id=dhtm … tor:errors

As for documentation - yep, it will be updated.

Code for the log:

[code]====================================
Log started, 16/10/2013 01:58:31

SELECT id,duration,text,start_date FROM gantt_tasks

SELECT id,source_task,target_task FROM gantt_links

Done in 0.0096809864044189s

====================================
Log started, 16/10/2013 01:58:37

DataProcessor object initialized
1381957116362_text => New task
1381957116362_start_date => 2013-10-01 00:00
1381957116362_duration => 1
1381957116362_progress => 0
1381957116362_parent => 0
1381957116362_id => 1381957116362
1381957116362_end_date => 2013-10-02 00:00
1381957116362_!nativeeditor_status => inserted
ids => 1381957116362

Undefined offset: 2 at C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php line 126

Undefined offset: 1 at C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php line 121

Undefined offset: 1 at C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php line 123

Row data [1381957116362]
=> New task
text => 2013-10-01 00:00
duration => 1
progress => 0
parent => 0
id => 1381957116362
end_date => 2013-10-02 00:00
!nativeeditor_status => inserted

INSERT INTO gantt_tasks(text,duration) VALUES (‘2013-10-01 00:00’,‘1’)

exception ‘Exception’ with message ‘MySQL operation failed
Field ‘start_date’ doesn’t have a default value’ in C:\inetpub\wwwroot\gantt\codebase\connector\db_common.php:991
Stack trace:
#0 C:\inetpub\wwwroot\gantt\codebase\connector\db_common.php(645): MySQLDBDataWrapper->query(‘INSERT INTO gan…’)
#1 [internal function]: DBDataWrapper->insert(Object(DataAction), Object(DataRequestConfig))
#2 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(217): call_user_func(Array, Object(DataAction), Object(DataRequestConfig))
#3 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(168): DataProcessor->check_exts(Object(DataAction), ‘insert’)
#4 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(97): DataProcessor->inner_process(Object(DataAction))
#5 C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php(280): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#6 C:\inetpub\wwwroot\gantt\codebase\connector\base_connector.php(406): JSONGanttConnector->render()
#7 C:\inetpub\wwwroot\gantt\codebase\connector\ganttData.php(11): Connector->render_table(‘gantt_tasks’, ‘id’, ‘text’, ‘start_date’, ‘duration’, ‘progress’, ‘sortorder’, ‘parent’)
#8 {main}

Edit operation finished
0 => action:error; sid:1381957116362; tid:1381957116362;

Done in 0.027700185775757s

====================================
Log started, 16/10/2013 01:58:45

DataProcessor object initialized
1381957116362_text => gantt Dash
1381957116362_start_date => 2013-10-01 00:00
1381957116362_duration => [object Object]
1381957116362_progress => .1
1381957116362_parent => 0
1381957116362_id => 1381957116362
1381957116362_end_date => 2013-10-21 00:00
1381957116362_!nativeeditor_status => inserted
ids => 1381957116362

Undefined offset: 2 at C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php line 126

Undefined offset: 1 at C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php line 121

Undefined offset: 1 at C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php line 123

Row data [1381957116362]
=> gantt Dash
text => 2013-10-01 00:00
duration => [object Object]
progress => .1
parent => 0
id => 1381957116362
end_date => 2013-10-21 00:00
!nativeeditor_status => inserted

INSERT INTO gantt_tasks(text,duration) VALUES (‘2013-10-01 00:00’,’[object Object]’)

exception ‘Exception’ with message ‘MySQL operation failed
Field ‘start_date’ doesn’t have a default value’ in C:\inetpub\wwwroot\gantt\codebase\connector\db_common.php:991
Stack trace:
#0 C:\inetpub\wwwroot\gantt\codebase\connector\db_common.php(645): MySQLDBDataWrapper->query(‘INSERT INTO gan…’)
#1 [internal function]: DBDataWrapper->insert(Object(DataAction), Object(DataRequestConfig))
#2 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(217): call_user_func(Array, Object(DataAction), Object(DataRequestConfig))
#3 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(168): DataProcessor->check_exts(Object(DataAction), ‘insert’)
#4 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(97): DataProcessor->inner_process(Object(DataAction))
#5 C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php(280): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#6 C:\inetpub\wwwroot\gantt\codebase\connector\base_connector.php(406): JSONGanttConnector->render()
#7 C:\inetpub\wwwroot\gantt\codebase\connector\ganttData.php(11): Connector->render_table(‘gantt_tasks’, ‘id’, ‘text’, ‘start_date’, ‘duration’, ‘progress’, ‘sortorder’, ‘parent’)
#8 {main}

Edit operation finished
0 => action:error; sid:1381957116362; tid:1381957116362;

Done in 0.046072959899902s[/code]

(a) Try to update gantt connector with the attached one
(b) be be sure that order of fields in render_table or render_sql is start_date, duration, text - the order does matter.
gantt_connector.names2.zip (2.5 KB)

New error log using the connector you posted:

====================================
Log started, 17/10/2013 09:45:58
====================================

SELECT `id`,`start_date`,`duration`,`text`,`progress`,`sortorder`,`parent` FROM gantt_tasks

SELECT `id`,`source_task`,`target_task`,`type` FROM gantt_links

Done in 0.01672101020813s



====================================
Log started, 17/10/2013 09:46:09
====================================

DataProcessor object initialized
1382028368033_text => New task
1382028368033_start_date => 2013-10-01 00:00
1382028368033_duration => 1
1382028368033_progress => 0
1382028368033_parent => 0
1382028368033_id => 1382028368033
1382028368033_end_date => 2013-10-02 00:00
1382028368033_!nativeeditor_status => inserted
ids => 1382028368033

Row data [1382028368033]
text => New task
start_date => 2013-10-01 00:00
duration => 1
progress => 0
parent => 0
id => 1382028368033
end_date => 2013-10-02 00:00
!nativeeditor_status => inserted

Incorrect field name used: sortorder

data
text => New task
start_date => 2013-10-01 00:00
duration => 1
progress => 0
parent => 0
id => 1382028368033
end_date => 2013-10-02 00:00
!nativeeditor_status => inserted

Incorrect field name used: sortorder

data
text => New task
start_date => 2013-10-01 00:00
duration => 1
progress => 0
parent => 0
id => 1382028368033
end_date => 2013-10-02 00:00
!nativeeditor_status => inserted

INSERT INTO gantt_tasks(`start_date`,`duration`,`text`,`progress`,`sortorder`,`parent`) VALUES ('2013-10-01 00:00','1','New task','0','','0')

exception 'Exception' with message 'MySQL operation failed
Incorrect integer value: '' for column 'sortorder' at row 1' in C:\inetpub\wwwroot\gantt\codebase\connector\db_common.php:991
Stack trace:
#0 C:\inetpub\wwwroot\gantt\codebase\connector\db_common.php(645): MySQLDBDataWrapper->query('INSERT INTO gan...')
#1 [internal function]: DBDataWrapper->insert(Object(DataAction), Object(DataRequestConfig))
#2 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(217): call_user_func(Array, Object(DataAction), Object(DataRequestConfig))
#3 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(168): DataProcessor->check_exts(Object(DataAction), 'insert')
#4 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(97): DataProcessor->inner_process(Object(DataAction))
#5 C:\inetpub\wwwroot\gantt\codebase\connector\base_connector.php(487): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#6 C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php(128): Connector->render()
#7 C:\inetpub\wwwroot\gantt\codebase\connector\base_connector.php(406): GanttConnector->render()
#8 C:\inetpub\wwwroot\gantt\codebase\connector\ganttData.php(11): Connector->render_table('gantt_tasks', 'id', 'start_date,dura...')
#9 {main}

Edit operation finished
0 => action:error; sid:1382028368033; tid:1382028368033;

Done in 0.058527946472168s



====================================
Log started, 17/10/2013 09:46:19
====================================

DataProcessor object initialized
1382028368033_text => Test
1382028368033_start_date => 2013-10-01 00:00
1382028368033_duration => [object Object]
1382028368033_progress => .1
1382028368033_parent => 0
1382028368033_id => 1382028368033
1382028368033_end_date => 2013-10-06 00:00
1382028368033_!nativeeditor_status => inserted
ids => 1382028368033

Row data [1382028368033]
text => Test
start_date => 2013-10-01 00:00
duration => [object Object]
progress => .1
parent => 0
id => 1382028368033
end_date => 2013-10-06 00:00
!nativeeditor_status => inserted

Incorrect field name used: sortorder

data
text => Test
start_date => 2013-10-01 00:00
duration => [object Object]
progress => .1
parent => 0
id => 1382028368033
end_date => 2013-10-06 00:00
!nativeeditor_status => inserted

Incorrect field name used: sortorder

data
text => Test
start_date => 2013-10-01 00:00
duration => [object Object]
progress => .1
parent => 0
id => 1382028368033
end_date => 2013-10-06 00:00
!nativeeditor_status => inserted

INSERT INTO gantt_tasks(`start_date`,`duration`,`text`,`progress`,`sortorder`,`parent`) VALUES ('2013-10-01 00:00','[object Object]','Test','.1','','0')

exception 'Exception' with message 'MySQL operation failed
Incorrect integer value: '[object Object]' for column 'duration' at row 1' in C:\inetpub\wwwroot\gantt\codebase\connector\db_common.php:991
Stack trace:
#0 C:\inetpub\wwwroot\gantt\codebase\connector\db_common.php(645): MySQLDBDataWrapper->query('INSERT INTO gan...')
#1 [internal function]: DBDataWrapper->insert(Object(DataAction), Object(DataRequestConfig))
#2 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(217): call_user_func(Array, Object(DataAction), Object(DataRequestConfig))
#3 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(168): DataProcessor->check_exts(Object(DataAction), 'insert')
#4 C:\inetpub\wwwroot\gantt\codebase\connector\dataprocessor.php(97): DataProcessor->inner_process(Object(DataAction))
#5 C:\inetpub\wwwroot\gantt\codebase\connector\base_connector.php(487): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#6 C:\inetpub\wwwroot\gantt\codebase\connector\gantt_connector.php(128): Connector->render()
#7 C:\inetpub\wwwroot\gantt\codebase\connector\base_connector.php(406): GanttConnector->render()
#8 C:\inetpub\wwwroot\gantt\codebase\connector\ganttData.php(11): Connector->render_table('gantt_tasks', 'id', 'start_date,dura...')
#9 {main}

Edit operation finished
0 => action:error; sid:1382028368033; tid:1382028368033;

Done in 0.06367301940918s

Change

$gantt->render_table("gantt_tasks","id","start_date,duration,text,progress,sortorder,parent");

like

$gantt->enable_order("sortorder"); $gantt->render_table("gantt_tasks","id","start_date,duration,text,progress,parent");

enable_order command is necessary only if you want to save the order of items in the gantt

I updated my code with the one you supplied.
The guide I followed probably needs to be fixed: docs.dhtmlx.com/gantt/desktop__h … hedatabase

I also had to add a default value of ‘0’ to the column: sortorder in the gantt_tasks table because the log was showing an error when inserting a new record. Now the error appears to be the duration, it isn’t showing the value but passing an Object to the DB.

This is the new error log:

[code]====================================
Log started, 18/10/2013 01:30:23

DataProcessor object initialized
1_text => Dash Dev
1_start_date => 2013-10-01 00:00
1_duration => [object Object]
1_progress => .1
1_parent => 0
1_id => 1
1_end_date => 2013-10-13 00:00
1_!nativeeditor_status => updated
ids => 1

Row data [1]
text => Dash Dev
start_date => 2013-10-01 00:00
duration => [object Object]
progress => .1
parent => 0
id => 1
end_date => 2013-10-13 00:00
!nativeeditor_status => updated

UPDATE gantt_tasks SET start_date=‘2013-10-01 00:00’,duration=’[object Object]’,text=‘Dash Dev’,progress=’.1’,parent=‘0’ WHERE id=‘1’

exception ‘Exception’ with message ‘MySQL operation failed
Incorrect integer value: ‘[object Object]’ for column ‘duration’ at row 1’ in C:\inetpub\wwwroot\Facebook\codebase\connector\db_common.php:991
Stack trace:
#0 C:\inetpub\wwwroot\Facebook\codebase\connector\db_common.php(655): MySQLDBDataWrapper->query(‘UPDATE gantt_ta…’)
#1 [internal function]: DBDataWrapper->update(Object(DataAction), Object(DataRequestConfig))
#2 C:\inetpub\wwwroot\Facebook\codebase\connector\dataprocessor.php(217): call_user_func(Array, Object(DataAction), Object(DataRequestConfig))
#3 C:\inetpub\wwwroot\Facebook\codebase\connector\dataprocessor.php(168): DataProcessor->check_exts(Object(DataAction), ‘update’)
#4 C:\inetpub\wwwroot\Facebook\codebase\connector\dataprocessor.php(97): DataProcessor->inner_process(Object(DataAction))
#5 C:\inetpub\wwwroot\Facebook\codebase\connector\base_connector.php(487): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#6 C:\inetpub\wwwroot\Facebook\codebase\connector\gantt_connector.php(128): Connector->render()
#7 C:\inetpub\wwwroot\Facebook\codebase\connector\base_connector.php(406): GanttConnector->render()
#8 C:\inetpub\wwwroot\Facebook\codebase\connector\ganttData.php(11): Connector->render_table(‘gantt_tasks’, ‘id’, ‘start_date,dura…’)
#9 {main}

Edit operation finished
0 => action:error; sid:1; tid:1;

Done in 0.056069135665894s
[/code]

I also couldn’t call the enable_order() method you called, I get this error:

From ganttData.php:

Fatal error: Call to undefined method JSONGanttConnector::enable_order() in C:\inetpub\wwwroot\gantt\codebase\connector\ganttData.php on line 11

Dataprocessor Log:
Log:
row 1382129141805 marked [inserted,valid]
Initiating data sending for 1382129141805
Initiating data sending for all rows
Sending all data at once
Server url: …/codebase/connector/ganttData.php?editing=true parameters
Server response received details
Not an XML, probably incorrect content type specified ( must be text/xml ), or some text output was started before XML data

I also couldn’t call the enable_order() method you called, I get this error:
It seems that you are using old version of connector ( not the files from the gantt’s package ) as this method was introduced only with gantt release.

Try to update all connector’s files.
connector-latest.zip (72 KB)

Ok looks like we’re getting closer. I still have the error with the Duration sending an object to SQL instead of the value.

When I commented out the lightbox config code it worked great, except for a mysqsl error:

[code]====================================
Log started, 21/10/2013 09:07:21

DataProcessor object initialized
1382371624161_text => New task
1382371624161_start_date => 2013-10-08 00:00
1382371624161_duration => 1
1382371624161_progress => 0
1382371624161_parent => 1
1382371624161_id => 1382371624161
1382371624161_end_date => 2013-10-09 00:00
1382371624161_!nativeeditor_status => inserted
ids => 1382371624161

Row data [1382371624161]
text => New task
start_date => 2013-10-08 00:00
duration => 1
progress => 0
parent => 1
id => 1382371624161
end_date => 2013-10-09 00:00
!nativeeditor_status => inserted

INSERT INTO gantt_tasks(start_date,duration,text,progress,parent) VALUES (‘2013-10-08 00:00’,‘1’,‘New task’,‘0’,‘1’)

SELECT MAX(sortorder) as maxvalue FROM gantt_tasks

exception ‘Exception’ with message ‘MySQL operation failed
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 ‘maxvalue FROM gantt_tasks’ at line 1’ in C:\inetpub\wwwroot\Dash\codebase\connector\db_common.php:1085
Stack trace:
#0 C:\inetpub\wwwroot\Dash\codebase\connector\db_common.php(747): MySQLDBDataWrapper->query(‘SELECT MAX(sort…’)
#1 C:\inetpub\wwwroot\Dash\codebase\connector\db_common.php(659): DBDataWrapper->queryOne(‘SELECT MAX(sort…’)
#2 C:\inetpub\wwwroot\Dash\codebase\connector\dataprocessor.php(170): DBDataWrapper->new_record_order(Object(DataAction), Object(DataRequestConfig))
#3 C:\inetpub\wwwroot\Dash\codebase\connector\dataprocessor.php(97): DataProcessor->inner_process(Object(DataAction))
#4 C:\inetpub\wwwroot\Dash\codebase\connector\base_connector.php(491): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#5 C:\inetpub\wwwroot\Dash\codebase\connector\gantt_connector.php(128): Connector->render()
#6 C:\inetpub\wwwroot\Dash\codebase\connector\base_connector.php(410): GanttConnector->render()
#7 C:\inetpub\wwwroot\Dash\codebase\connector\ganttData.php(12): Connector->render_table(‘gantt_tasks’, ‘id’, ‘start_date,dura…’)
#8 {main}

Edit operation finished
0 => action:error; sid:1382371624161; tid:5;

Done in 0.054778099060059s[/code]

I attached a new Demo so we’re both looking at the same code.
demo2.zip (814 KB)

One more update is attached ( there was a problem with MySQL reserved words )
Please try to update the php file with the attached ones.
codebase.fix.maxvalue.zip (72 KB)

I still have the error of passing [object Object] into the duration field instead of the actual value.

[code]====================================
Log started, 22/10/2013 08:36:37

DataProcessor object initialized
5_id => 5
5_start_date => 2013-10-08 00:00
5_duration => [object Object]
5_text => UI Dev
5_progress => .25
5_parent => 1
5_end_date => 2013-10-13 00:00
5_!nativeeditor_status => updated
ids => 5

Row data [5]
id => 5
start_date => 2013-10-08 00:00
duration => [object Object]
text => UI Dev
progress => .25
parent => 1
end_date => 2013-10-13 00:00
!nativeeditor_status => updated

UPDATE gantt_tasks SET start_date=‘2013-10-08 00:00’,duration=’[object Object]’,text=‘UI Dev’,progress=’.25’,parent=‘1’ WHERE id=‘5’

exception ‘Exception’ with message ‘MySQL operation failed
Incorrect integer value: ‘[object Object]’ for column ‘duration’ at row 1’ in C:\inetpub\wwwroot\Facebook\codebase\connector\db_common.php:1085
Stack trace:
#0 C:\inetpub\wwwroot\Facebook\codebase\connector\db_common.php(731): MySQLDBDataWrapper->query(‘UPDATE gantt_ta…’)
#1 [internal function]: DBDataWrapper->update(Object(DataAction), Object(DataRequestConfig))
#2 C:\inetpub\wwwroot\Facebook\codebase\connector\dataprocessor.php(221): call_user_func(Array, Object(DataAction), Object(DataRequestConfig))
#3 C:\inetpub\wwwroot\Facebook\codebase\connector\dataprocessor.php(168): DataProcessor->check_exts(Object(DataAction), ‘update’)
#4 C:\inetpub\wwwroot\Facebook\codebase\connector\dataprocessor.php(97): DataProcessor->inner_process(Object(DataAction))
#5 C:\inetpub\wwwroot\Facebook\codebase\connector\base_connector.php(491): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#6 C:\inetpub\wwwroot\Facebook\codebase\connector\gantt_connector.php(128): Connector->render()
#7 C:\inetpub\wwwroot\Facebook\codebase\connector\base_connector.php(410): GanttConnector->render()
#8 C:\inetpub\wwwroot\Facebook\codebase\connector\ganttData.php(12): Connector->render_table(‘gantt_tasks’, ‘id’, ‘start_date,dura…’)
#9 {main}

Edit operation finished
0 => action:error; sid:5; tid:5;

Done in 0.052785873413086s[/code]

I figured it out. I had the type and map_to attirubtes in the gantt.config.lightbox.sections backwards.

It now reads:

gantt.config.lightbox.sections=[ {name:"description", height:70, map_to:"text", type:"textarea", focus:true}, {name:"progress", height:40, map_to:"progress",type:"textarea"}, {name:"time", height:72, type:"duration", map_to:"auto"}]; gantt.locale.labels.section_progress = "Progress"; gantt.attachEvent("onTaskDrag", function(id, mode, task, original){ var modes = gantt.config.drag_mode; if(mode == modes.move){ var diff = task.start_date - original.start_date; gantt.eachTask(function(child){ child.start_date = new Date(+child.start_date + diff); child.end_date = new Date(+child.end_date + diff); gantt.refreshTask(child.id, true); },id ); } return true; });

All appears to be working now. Thank you for your help!

Just for my own information, should I use the connector files you attached instead of the files available for download from the website? Or did you customize the files for my use.

For now it will be better to use the above attached files.
The next update on the site will include the same fixes ( but currently version from the site has a few known issues )