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
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:
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");
Unfortunately we haven’t info about the license that you sent me. It seems that it is outdated.
I asked the license to send you a new version 5.1 before its official release. But the release has already happened. So please download the latest version and check if the issue occurs there. There was a similar fix, perhaps it helps you too. I still didin’t reproduce your bug.
Our license only let us download 5.0 pro, not 5.1 or later versions. We’d like to update the license and continue using newer versions of DHTMLX Scheduler but not if this bug isn’t resolved, 5.0 is useless to us. Is there a way to try 5.1 timeline to see if that works before buying the licenses?
Unfortunately we cannot recreate your described problem locally.
Could you please, provide a complete demo, where the problem could be reconstructed so we can check it (also with the latest version of the dhtmlxScheduler) and fix it or we can be sure that the update will solve your problem.
As I mentioned, we haven’t info about the license number that you sent me because the license with such number was bought several years ago. But if you can download 5.0 pro, seems this is not entirely true and you had an extended access to the support recently.
To figure it out please contact info@dhtmlx.com and specify the last support extension number. Also, you can refer to this topic in the letter. Maybe our command will be able to provide you a way to try 5.1 timeline and check this bug. If the bug is fixed in this version, you will know for sure that you need the license.
Login with username ‘04323471T’ and password ‘04323471T’.
Click on icon “GT”.
Change browser URL replacing (…)176/girh_gt(…) with (…)176/girh_gt_demo(…).
Now you are on the scheduler (5.1.1 evaluation version, demo database). To reproduce the bug:
Double click any free space to create a new event. If a notification message appears click OK.
A custom lightbox appears. Click on lower “DEMO” link. It will close the lightbox.
Delete an event right clicking on it and clicking the contextual menu “Planificacio > Esborra Planificacio”.
The event is apparently removed but it doesn’t trigger the database delete and if you refresh the scheduler the event is there. It doesn’t happens before clicking the “DEMO” link.
It was working ok before DHTMLX Scheduler version 5.0.
Notes:
The “DEMO” link executes that:
function demo_exit()
{
load_scheduler(undefined, undefined, undefined, ‘Exit’);
scheduler.endLightbox(false, null);
$(’#modal-planificacio’).modal(‘hide’);
}
The contextual menu “Planificacio > Esborra Planificacio” executes that:
scheduler.deleteEvent(event_id);
Thank you for the description, the issue is reproduced. We’ve added info about the problem to the bug tracker. You will reply you in the support, please wait a bit.
Hi,
I’m now able to reproduce it’s locally.
The problem happens because scheduler doesn’t clear scheduler.getState().new_event flag if you call scheduler.clearAll before closing the lightbox using scheduler.endLightbox.
In your app clearAll is called fromload_scheduler` method.
And when the new_event flag is set, the dataprocessor won’t send the update to the backend as it considers delete operation as cancel during the process of creation of new event.