Random Cancellations

Support forumRandom Cancellations
Liga asked 4 years ago
I previously asked the question below and got an answer that's even further below (sorry, I don't know how to continue the conversation without login!). I tried to take the cancellation link off from admin e-mail tamplate since the client doesn't receive it anyways (I don't know if I did it correctly, but I couldn't find other way than create a template of the admin e-mail and exclude the cancellation ## since we had this template empty and we received a defaulf one) -> it didn't change anything! Previously when I tested the system with my own e-mail I didn't receive the cancellation but now even I did. 

I decided to remove the option that client receives an e-mail when the cancellation happens, because the appointment still stayed in our synchronised Google Calendars and the time slot still remained unavailable for other appointments even though it appears as cancelled in admin system.  After few tries when I already clapped my hands that I have solved this, still random appointments gets cancelled and even the e-mail is being sent even though I deleted everything from the cancellation e-mail template.  Can you, please, help to solve this? I see from previous answers to similar situations that provided solution already 2 years ago was to delete the cancellation link, but unfortunately it doesn't work. MY PREVIOUS QUESTION: I have a problem that random appointments gets cancelled minute after the confirmation. I was trying to find out if it is realated to confirmation via received e-mail, is it confirmed via smartphone or computer or via the plug-in. None of this resolves the problem, but it still happens to some random appointments. I searched through previous topics and it seems that this problem exists, but I cannot see a solution. 
I have the starter extension and it is synchronised to Google calendar. The cancellation problem is not related to somebody making changes in any of the calendars- it really happens automatically. 
What can be done? It is really frustrating!

2 Answers
Nikola Loncar Staff answered 4 years ago
Hi Liga, I am not sure why Google Calendar sync is doing that if that is the case. If you remove event from Google Calendar it will be canceled in EA but only when sync is done a that interval can be 5, 15 or 30 minutes. There is a option to log sync data inside EA I would suggest that you do that. Options is at the bottom of Extension Google settings, select there to log all events and save settings. After some time download log file and please paste here or send it to nikolanbg[at]gmail[dot]com. Best regards, Nikola
Margo704 Staff answered 4 years ago
Hi! I have a simiral problem. Looking at the sync logs, it seems the cancellations happen, if the cron runs when the appointment is just created at the Wordpress side but not sent to Google calender yet. The script sees that there is an appointment on WP side that is not in the Google Calender and so cancels it. How can I solve this problem?
Nikola Loncar Staff replied 4 years ago

Hi, that appointment must be added right away when it is created to Google Calendar. Can you please tell me how you created that one?

Best regards,

Margo704 Staff replied 4 years ago

What do you mean by “Can you please tell me how you created that one”? The appointment is created by the end user on our website using your plugin. User fills in the form and clicks the submit button.

I’m looking at the sync log. There are lines like this:
[2020-06-08 6:09:17.102575] [info] Canceled Appointments 1

But the appointments should not be cancelled, nobody cancels them. I compared the times and for every such row in the log, there is an appointment created exactly at the same time.

As I understands it, if an appointment is created, two things happen:
1. Appointment is saved to WordPress database.
2. Appointment is sent to Google Calenter.
But if the sync script happens to run exactly between these two actions then it sees that there is an appointment in WP that is not in Google Calendar and cancels it.