Error when opening existing event

I am getting this error when I open an existing event. I’m not sure what’s causing it. It pulls in the correct data and it lets me update the information just fine.

Hello,

You are using multiselect section for lightbox. Please note that in some configuration it also uses server-side script to fetch selected options when details form is opened. And that script seems to be missing.

Kind regards,
Ilya

I see, I didn’t get that far yet. I have been messing with that and I’m having a hard time with the cross.

This is the code I have:

[code]include ‘…/includes/include.php’;
include ‘…/includes/dhtmlx/scheduler_connector.php’;
include ‘…/includes/dhtmlx/crosslink_connector.php’;

include ‘…/includes/dhtmlx/db_pdo.php’;

function custom_code($action){
$action->add_field(“project_id”, $_GET[‘project_id’]);
}

$scheduler = new schedulerConnector($db,“PDO”);
$scheduler->enable_log(“log.txt”);

$list = new OptionsConnector($db, “PDO”);
$list->render_table(‘logins’,‘id’,‘id(value), first_name(label)’);
$scheduler->set_options(“assigned_to”, $list);

$cross = new CrossOptionsConnector($db, “PDO”);
$cross->options->render_table(‘logins’,‘id’,‘id(login_id), first_name(label)’);
$cross->link->render_table(‘activity_team’,‘id’,‘activity_id(id),login_id’);

$scheduler->set_options(“activity_team”, $cross->options);

$list = new OptionsConnector($db, “PDO”);
$list->render_table(‘activity_type’,‘id’,‘id(value), activity_type(label)’);
$scheduler->set_options(“activity_type_id”, $list);

$scheduler->event->attach(“beforeInsert”, ‘custom_code’);

$scheduler->render_sql("SELECT * FROM activities WHERE project_id = ". $_GET[‘project_id’], “id”, “date_start, date_end, subject, assigned_to, activity_type_id”);[/code]

The 3 tables are:

logins
id
first_name

activity_team
id
activity_id
login_id

activities
id
project_id
subject
date_start
date_end

Here is the output log:

[code]====================================
Log started, 10/10/2011 01:10:30

DataProcessor object initialized
1318270986831_id => 1318270986831
1318270986831_start_date => 2011-10-21
1318270986831_end_date => 2011-10-21
1318270986831_text => asdasda
1318270986831_assigned_to => 1
1318270986831_activity_type_id => 2
1318270986831_activity_team =>
1318270986831_!nativeeditor_status => updated
ids => 1318270986831

Row data [1318270986831]
id => 1318270986831
date_start => 2011-10-21
date_end => 2011-10-21
subject => asdasda
assigned_to => 1
activity_type_id => 2
activity_team =>
!nativeeditor_status => updated

UPDATE activities SET date_start=‘2011-10-21’,date_end=‘2011-10-21’,subject=‘asdasda’,assigned_to=‘1’,activity_type_id=‘2’ WHERE id=‘1318270986831’ AND ( project_id = 21362)

DELETE FROM activity_team WHERE id=‘1318270986831’

INSERT INTO activity_team(activity_id) VALUES (‘1318270986831’)

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

Done in 0.43640208244324s
[/code]

I’m having multiple problems but they’re all coming from the cross. If I remove that everything seems to work correctly. The ID that it’s using in the WHERE statement I don’t recognize (1318270986831). The INSERT INTO activity_team should be inserting 2 fields instead of 1. I’m having a lot of problems with this and it’s the last major thing I have to figure out. Any help?

Try to change crosslink connector config as

$cross = new CrossOptionsConnector($db, "PDO"); $cross->options->render_table('logins','id','id(value), first_name(label)'); $cross->link->render_table('activity_team','activity_id','login_id,activity_id');

Still having similar problems:

[code]====================================
Log started, 11/10/2011 07:10:33

DataProcessor object initialized
1318335501836_id => 1318335501836
1318335501836_start_date => 2011-10-19
1318335501836_end_date => 2011-10-19
1318335501836_text => testsdsdsd
1318335501836_assigned_to => 1
1318335501836_activity_type_id => 2
1318335501836_activity_team => 2,3
1318335501836_!nativeeditor_status => updated
ids => 1318335501836

Row data [1318335501836]
id => 1318335501836
date_start => 2011-10-19
date_end => 2011-10-19
subject => testsdsdsd
assigned_to => 1
activity_type_id => 2
activity_team => 2,3
!nativeeditor_status => updated

UPDATE activities SET date_start=‘2011-10-19’,date_end=‘2011-10-19’,subject=‘testsdsdsd’,assigned_to=‘1’,activity_type_id=‘2’ WHERE id=‘1318335501836’ AND ( project_id = 21362)

Incorrect field name used: activity_id

data
id => 1318335501836
date_start => 2011-10-19
date_end => 2011-10-19
subject => testsdsdsd
assigned_to => 1
activity_type_id => 2
activity_team => 2,3
!nativeeditor_status => updated

DELETE FROM activity_team WHERE activity_id=’’

INSERT INTO activity_team(activity_id) VALUES (’’)

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

Done in 0.12816905975342s
[/code]

I also get these undefined indexes over and over:
Undefined index: id
Undefined index: activity_id

Some more modifications

change
$scheduler->set_options(“activity_team”, $cross->options);
as
$scheduler->set_options(“login_id”, $cross->options);

and on client side, map_to value for the options section must be also “login_id”

Alright now this is what I’m getting:

[code]====================================
Log started, 11/10/2011 07:10:42

DataProcessor object initialized
1318337729977_id => 1318337729977
1318337729977_start_date => 2011-10-19
1318337729977_end_date => 2011-10-19
1318337729977_text => testsdsdsd
1318337729977_assigned_to => 1
1318337729977_activity_type_id => 2
1318337729977_login_id => 2
1318337729977_!nativeeditor_status => updated
ids => 1318337729977

Row data [1318337729977]
id => 1318337729977
date_start => 2011-10-19
date_end => 2011-10-19
subject => testsdsdsd
assigned_to => 1
activity_type_id => 2
login_id => 2
!nativeeditor_status => updated

UPDATE activities SET date_start=‘2011-10-19’,date_end=‘2011-10-19’,subject=‘testsdsdsd’,assigned_to=‘1’,activity_type_id=‘2’ WHERE id=‘1318337729977’ AND ( project_id = 21362)

Incorrect field name used: activity_id

data
id => 1318337729977
date_start => 2011-10-19
date_end => 2011-10-19
subject => testsdsdsd
assigned_to => 1
activity_type_id => 2
login_id => 2
!nativeeditor_status => updated

DELETE FROM activity_team WHERE activity_id=’’

INSERT INTO activity_team(activity_id) VALUES (’’)

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

Done in 0.44894695281982s
[/code]