I’ve followed the installation instructions to the letter and a previous issue I fixed, but this is the new one: gantt.getTask invalid argument comes up when I try to create even the first ‘task’ in my Gantt chart and try to save it;
I’m only very slowly learning about javascript although I’m competent-enough in html and css;
The page on my website where the gantt chart is placed is here:
ad1281.uk/dhtmlxGantt/ganttplan.html
Can anyone help?
thanks
Andrew Southampton UK
Server side response is invalid. Currently it looks like next
<?xml version='1.0' ?><data><action type='inserted' sid='1427713041392' tid='' ></action></data>
tid parameter is empty, while it must contain the new id.
If you are using default server side, double-check that id table is configured as autoincrement in the database.
Hi Stanislav
Yep - in both the table ‘gantt_links’ and ‘gantt_tasks’ both the id fields are set to AUTO_INCREMENT
I’m new to MySQL databases too so I don’t know which other settings I should check to get this to work?
I tried to include screenshots of the structures of the two database tables into this message but I can’t get the ‘image’ function to work;
Can you suggest any other settings I should verify or alter please?
Thanks
Andrew
Hi,
please show your mysql tables schema and connector configuration
Hi Aliaksandr
These links will take you to screenshots of my two tables:
ad1281.uk/assets/FW/gantt_tasks.png
ad1281.uk/assets/FW/gantt_links.png
I’m not sure how to show you the connection configurations - I followed the instructions exactly in the dhtmlx.com guide for Gantt but if I can find these connection configurations on my database server perhaps you can direct me where to look? I am logging in using myphpadmin
Thanks
Andrew
hi,
I have exactly the same problem . please as they resolved ?
Hi,
please attach a your project with DB schema. The often problem is missing auto increment and primary key in database. If it’s correct in your case - probably there is something with php connector configuration, it’s hard to tell without seeing the code
hello , I attached the information
gantt.php
[code]
Bootstrap layout<script src="js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="bootstrap/3.2.0/js/bootstrap.min.js"></script>
<style type="text/css">
html, body{ height:100%; padding:0px; margin:0px; }
.weekend{ background: #f4f7f4 !important;}
.gantt_selected .weekend{ background:#FFF3A1 !important; }
.well {
text-align: right;
}
@media (max-width: 991px) {
.nav-stacked>li{ float: left;}
}
.container-fluid .row {
margin-bottom: 10px;
}
.container-fluid .gantt_wrapper {
height: 700px;
width: 100%;
}
.gantt_container {
border-radius: 4px;
}
.gantt_grid_scale { background-color: transparent; }
.gantt_hor_scroll { margin-bottom: 1px; }
</style>
Gantt info
data.php
[code]<?php
include (‘…/codebase/connector/gantt_connector.php’);
$res=mysqli_connect(“localhost”,“root”,“asd”,“gantt”);
$gantt = new JSONGanttConnector($res);
$gantt->render_links(“gantt_links”,“id”,“source,target,type”);
$gantt->render_table(
“gantt_tasks”,
“id”,
“start_date,duration,text,progress,sortorder,parent”
);
?>[/code]
thank you very much
Okey
But I found my problem and was the data.php file. try going from msql to MSQLI and did not work. any suggestions on how to do ?
Check docs.dhtmlx.com/connector__php__ … ample.html
For Mysqli you need to init connector like next
include ('../codebase/connector/gantt_connector.php');
include ('../codebase/connector/db_mysqli.php');
$res=mysqli_connect("localhost","root","asd","gantt");
$gantt = new JSONGanttConnector($res, "MySQLi");
$gantt->render_links("gantt_links","id","source,target,type");
$gantt->render_table(
"gantt_tasks",
"id",
"start_date,duration,text,progress,sortorder,parent"
);
Hi Alexandr
I attached screenshots of the MySQL database configurations for you to inspect. Did you have a chance to look at these for me?
The fault persists and until I can resolve what is probably a very simple error, I can’t use the excellent Gantt Chart product
Best wishes
Andrew