Hi,
We’re using DHTMLX Scheduler since version 4.3. We just upgraded to version 5 and we are encountering some problem related to the integration with the server. If we downgrade to the last 4.x Scheduler version it works again.
Our environment: Ubuntu server with PHP 5.5 + MySQL 5.7
Screen capture example: https://youtu.be/GlcYl9qi6is
Steps explained:
- Delete an event (scheduler.deleteEvent(event_id);). As you can see in the browser console no event is fired.
- Refresh scheduler events and the event is not removed.
- Delete an event. Edit an event.
- Refresh scheduler events and the removed event is there, the edited one is there plus a new one.
- After a browser F5 all is working again, we can delete/edit events perfectly.
It happens after we create multiple events directly in the database and refreshing the scheduler, not creating it by standard lightbox.
We create the events like this:
xhr_call('post', 'planificacio/create_events'); ?>', params).done(function(ok)
{
load_scheduler(undefined, undefined, undefined, 'Planificacions desades correctament');
scheduler.endLightbox(false, null);
});
Our integration
We have this method in our PHP controller:
public function get_events($up = '', $etiqueta = '') {
require_once("assets/dhtmlx/dhtmlxConnector/codebase/scheduler_connector.php");
require_once("assets/dhtmlx/dhtmlxConnector/codebase/db_phpci2.php");
require_once("Plan_events.php");
DataProcessor::$action_param ="dhx_editor_status";
$this->load->model('example_model');
$conn = new SchedulerConnector($this->db, "PHPCI");
$conn->event->attach(new Plan_events()); // Update/Delete/...
if ($this->input->get('editing')) $events = array();
else $events = $this->example_model->get_events($this->input->get('from'), $this->input->get('to'));
$conn->render_array($events,"CalendariProfessionalID", "dataInici,dataFi,professionalNom,...");
}
In the view the scheduler is defined like this:
scheduler.init('calendari', new Date(),"timeline_week");
scheduler.setLoadMode('week');
var dp = new dataProcessor("plan_unitat/get_events);
dp.action_param ="dhx_editor_status"; // Integració CI
dp.init(scheduler);
scheduler.load("plan_unitat/get_events");