Appointments not deleting in GCAL

Hi,

We seem to have a problem since upgrading from v1.2.3.3 to 1.2.4

All was working fine but just identified the following problem:-

1. Make a confirmed appointment in A+
2. Checked GCal and it shows correctly
3. Delete appointment in A+
4. Not deleting in GCal
5. Everything else seems to work fine

Settings:-

1. Two Service providers with their own GCal API keys
2. A+ GCal tab:
a. "Allow Service Providers for Google Calendar API Integration" set as 'Yes'
b. "Appointments will be sent to Google Calendar for" set as 'no preferences'
c. "Integration Mode" set as 'A+ <-> GCal (Synchronization)

3. test connection works fine on the GCal general tab and for each of the two Service Providers.

Would appreciate your thoughts

Regards
SteveB

  • pxwm

    Hi Hakan,

    Many thanks for your reply.

    To delete I log-in to Wordpress using Admin and go to 'Appointments'.

    Then I either just check the box to the left of the appointment I want to delete and select 'Removed' from the dropdown and then click 'change status' or open up the appointment and change the status and save the changes.

    I can confirm this removes the appointment within A+.

    I then check in GCal and I have tried 'refresh', waited 15 mins' but does not remove.

    Any ideas?

    Regards
    SteveB

  • pxwm

    Hi Hakan,

    I've completed further testing based on your feedback and I've detailed my findings below:-

    1. I created a 'confirmed' appointment in A+
    2. This showed correctly in GCal
    3. I then deleted the appointment in A+ by going in to the individual appointment in the Admin panel.
    4. This removed in A+ but not GCal.
    5. I waited 15 mins but still the same.
    6. I then permanently deleted the appointment in A+ to check if this would help.
    7. This removed the appointment in A+ permanently but it still shows in GCal even after 15 mins.

    Any ideas?

    Regards
    SteveB

  • pxwm

    Hi Hakan,

    I can confirm that all 'confirmed' appointments made through A+ have a Service Provider assigned as we have disabled the option to make an appointment as 'no preference'.

    I did as you requested but still same problem.

    However to further test I changed the settings to allow a 'no preference' appointment to be made in A+ and I can confirm that when I go into the individual appointment and 'remove' in the Admin panel the appointment is removed in GCal.

    On further investigation I did notice the following:-

    1. When the appointment was made with 'no preference' and then I went into the individual appointment in the Admin panel and changed the status to 'removed' and clicked 'save changes' then on the left hand side next to the 'Cancel' button there appears a 'Loading' spiral that after a few seconds finishes and you get a message 'Changes saved' in Green.
    I then check in GCal, select 'refresh' the appointment is deleted
    2. However when I do the same when an appointment is made for a specific Service Provider the 'Loading' spiral is continuous and I don't get the message 'Changes saved' in Green. If I come out of the individual appointment the appointment has been removed.
    I then check in GCal, select 'refresh' the appointment is NOT deleted.

    I wonder if the 'removal' process is not being completed for some reason!

    Your thoughts?

    Regards
    SteveB

  • Hakan

    Even after several different settings, I could not reproduce the issue you are having.

    However when I do the same when an appointment is made for a specific Service Provider the 'Loading' spiral is continuous and I don't get the message 'Changes saved' in Green.

    This is the important symptom that is I am unable to reproduce.

    I tested exactly like you have explained:
    - Created an appointment for a service provider using the front end
    - I saw that appointment included in GCal of service provider as an event
    - I changed the status of the appointment as removed
    - Both appointment and event were correctly deleted

    Please send your wp-admin credentials using our contact form so that I can see what is going on on your website:
    https://premium.wpmudev.org/contact/

    Cheers,
    Hakan

  • pxwm

    Hi Hakan,

    As promised we have carried out some further testing and have some good news as well as further observations as detailed below.

    We have upgraded to the latest version (1.2.4.1). The setup is the same, with GCal integration on the backend and two service providers with GCal integration through their own google calendar. To confirm we set a unique API key for the main backend and for the two specific service providers and full integration set.

    We made a 'Confirmed' appointment for a Specific Service provider and then removed in A+ which caused it to hang (when removing appointments individually), and removed the appointment from the A+ database but not GCAL. Using the bulk changes box to remove appointments failed entirely with a fatal error (reproduced below), however the appointment still appears to be removed from the A+ database but not GCAL.

    The good news is that making a Confirmed appointment for 'no specific provider' and then removing it works fine, it removes the appointment from both the A+ database and GCAL, and it also indicates 'changes saved' in the specific appointment in the A+ backend.

    Based on the result above we tested this further by removing all GCal integration from the main backend, and only having GCal integration for the individual service providers, each with their own API key and calendar. With it configured like this, removing an appointment works fine and no error occurs (it also shows 'changes saved' in the specific appointment in the A+ backend). I can also confirm we can successfully remove the appointment in A+ and GCAL either using 'Bulk changes' or going into the specific appointment in A+.

    This is fine for our current purposes, as there is never a need for 'no specific provider' appointments, however I have included the error message which appeared when this is enabled:

    Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling DELETE https://www.googleapis.com/calendar/v3/calendars/calendar@remybeauty.com/events/1oshu22ia9djpu4nh49sniso74: (404) Not Found' in /home/remybeau/public_html/remybeau/wp-content/plugins/appointments/includes/gcal/io/Google_REST.php:67 Stack trace: #0 /home/remybeau/public_html/remybeau/wp-content/plugins/appointments/includes/gcal/io/Google_REST.php(37): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 /home/remybeau/public_html/remybeau/wp-content/plugins/appointments/includes/gcal/service/Google_ServiceResource.php(178): Google_REST::execute(Object(Google_HttpRequest)) #2 /home/remybeau/public_html/remybeau/wp-content/plugins/appointments/includes/gcal/contrib/Google_CalendarService.php(696): Google_ServiceResource->__call('delete', Array) #3 /home/remybeau/public_html/remybeau/wp-content/plugins/appointments/includes/class.gcal.php(1021): Google_EventsServiceResource->delete('calendar@remybe...', '1oshu22ia9djpu4...' in /home/remybeau/public_html/remybeau/wp-content/plugins/appointments/includes/gcal/io/Google_REST.php on line 67

    Hope this helps

    Regards
    SteveB

  • Hakan

    Hi Steve,

    I think at least one of your GCal calendars is a *primary* calendar.

    Either it is a bug of Google, or limitation of Google (but not that of A+ which I can fix), primary calendar is acting quite strangely.

    It is a good idea not to use primary calendars at all, but if you must, please see this post:
    https://premium.wpmudev.org/forums/topic/appointments-error-1#post-376708

    Cheers,
    Hakan

  • pxwm

    Hi Hakan,

    Many thanks for your feedback.

    I can confirm one of our calendars is a 'primary' calendar.
    We will do as you have suggested and remove as we do not require a 'primary' calendar to deliver the service our client requires.

    Again many thanks for all your support and look forward to further A+ developments and we would be more than happy to help with any testing.

    I'll set this as resolved.

    Regards
    SteveB

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.