Unable to get property '_helpers' of undefined or null reference

I am using the Hotel Reservation Demo to learn about the Scheduler/Timeline. I started with the basic scheduler code and adding the Timeline code from the Demo.

I have added test data to the database and it renders properly. But when I try to add an event with the UI I get the error:

Unable to get property ‘_helpers’ of undefined or null reference

This is my create function:

// create a new event
function create($db, $event){

    $queryText = "INSERT INTO `events` SET
    `room`=?,
    `start_date`=?,
    `end_date`=?,
    `text`=?,
    `status`=?,
    `is_paid`=?,
    `event_pid`=?,  
    `event_length`=?,  
    `rec_type`=? 
    WHERE `id`=?";
$queryParams = [
    $event["room"],
    $event["start_date"],
    $event["end_date"],
    $event["text"],
    $event["status"] ? $event["status"] : 1,
    $event["is_paid"] ? $event["is_paid"] : 0,
    $event["event_pid"] ? $event["event_pid"] : 0,
    $event["event_length"] ? $event["event_length"] : 0,
    $event["rec_type"] ? $event["rec_type"] : 0
    ];

$query = $db->prepare($queryText);
$query->execute($queryParams);

return $db->lastInsertId();

}

The fields all exist and I formatted the code to follow the same fields order to ensure I didn’t miss anything.

The error points to:
[dhtmlxscheduler.js (8425,19)][…/codebase/sources/dhtmlxscheduler.js)

Here is the snippet from the file:

this.attachEvent(“onEventChanged”,function(id){
if (!this._loading && this._validId(id))
dp.setUpdated(id,true,“updated”);
});

Thoughts on how to debug this?

Thank you.

Hi,
you can try to check what the bug is and try to fix it. You can read how to do it in the article:
https://docs.dhtmlx.com/scheduler/troubleshooting.html
First, check what the client is requesting. In order to do this, open the Network panel in Dev tools, reload the page and see what data the XHR request returns from Backend. More details can be found in the paragraph:
https://docs.dhtmlx.com/scheduler/troubleshooting.html#checkwhatisrequestedbytheclient
If there is no error, then the problem may be in the data format. Follow the instructions described in this paragraph:
https://docs.dhtmlx.com/scheduler/troubleshooting.html#checkfortheerrormessagesonthepage

  • Check what the client is requesting
  • Check what is returned from the server
  • Check what is loaded in the scheduler

If you can’t find a solution to your issue, the better way you to send the entire application and the data that you will receive from the server, in this thread.

Thank you Ales. I have been debugging and spending my time working with the apps. I’ll post back here any results or questions.

Appreciate it.

1 Like