Appointments Added in Google Calendar Not Blocking Times on Site (me too!)

I have integration with Google Calendar set up (A+ <-> Gcal).

A+ -> GCal works.

GCal -> A+ don't work :slight_frown:

This is the same problem many people reported here: https://premium.wpmudev.org/forums/topic/appointments-added-in-google-calendar-not-blocking-times-on-site

You can see here that the permission in GCal is set to "Make changes to events".

https://www.evernote.com/shard/s404/sh/bf772952-0b67-48bd-a20e-71d6e61a7565/5db5a36fb47768ecf3e391f541eff367

When I click in "Import and Update Events Now ", GCal -> A+ happens.

But I don't want to have to click it all the time, neither I want to make a CRON job for this.

My environment:
WP: 4.0
Appointments+ Plugin: 1.4.4 Beta

I have granted access for support.

  • Fred

    About the image: I believe the image is public now, if not, please let me know that I will publish it in my site.

    About the plugin version:
    1) Will this change erase all the configurations I have made in the current plugin?

    2)I have never deliberately chosen the Beta version. I installed WPMU DEV Dashboard and followed the instructions...

    3) How do I change to the stable version? I tried to download in the A+ site, in the changelog.txt it says it is v1.4.4. Isn't that the same version I already have installed?

    Thanks

  • Michelle Shull

    Hi, Fred!

    It looks like you may have already updated, everything looks up to date on your site.

    To answer your questions:
    1. Nope! Those are saved in the database, not the plugin folder, so they'll be safe even if you delete the plugin.
    2. I'm not sure how you ended up with beta, either. Did you happen to download a fix from another thread?
    3. I think you may have already done this, but correct me if I'm wrong.

    Are you still seeing the issues in these two threads?

    Thanks!

  • Fred

    Hi Michelle,

    1. Perfect!
    2. I don't know either. I downloaded from WPMUDEV Dashboard (a plugin I had previously installed).
    3. Yes, I downloaded A+ again and the problem persists. The Beta version message appears when I go to Plugins > A+ > Details. Maybe I am not in the Beta version, maybe this page wasn't updated to know that version 1.4.4 is not Beta anymore.

    Anyway, my A+ sync with GCal works in the A+ -> GCal way. Does not work in GCal -> A+ way.

    I have granted access to support again.

  • Michelle Shull

    It looks like you're no longer using Beta, so that's progress, at least! (i took a screenshot.)

    Just to be sure, you followed each step in the setup, I'm copy/pasting them here:

    1 Google Calendar API V5.3 + requires php and some php extensions. Click this link to check if the server installation meets these requirements: Check requirements
    2 Go to the Google apis console by clicking https://code.google.com/apis/console/ . Log into your Google account if you are not already entered.
    3 Create a new project using the panel on the left. Name the "Appointments" project (or use the chosen name instead)
    4 Click on "Services" on the left panel and set "Calendar API" to ON.
    5 Click on "API Access" on the left side panel.
    6 Click "Create a Client ID OAuth 2.0".
    7 Enter a name of the product, for example, A +, into the open window. Click Next.
    8 Select "Service Account" in the client ID Settings in new window.
    9 Click "create Customer ID". Get the result may take a few seconds.
    10 Click the "private key Download" button in the open window.
    11 Using your FTP client program, copy this key file to the folder: / home / content / p3nexnas05_data01 / 67/2094667 / html / wp-content / plugins / appointments // includes / Gcal / key /. This file is necessary that you will grant access to your Google Calendar account even if you are not online. Therefore, this file serves as proof of your authorization to access your Google Calendar account. Note: This file can not be loaded otherwise. If you do not have FTP access, ask the site administrator to do it for you.
    12 Enter the name of the configuration key "name key file" + file for Appointments. Delete the. P12.
    13 Copy configuration "E-mail" from Google APIs console and paste it into "Address Service account email" for Appointments +.
    14 Open your GoogleCalendar by clicking this link: https://www.google.com/calendar/render
    15 Create a new calendar by selecting "My Calendars> Create new calendar" in the left pane. Try not to use your paticular calendar. If you have to do it, please read this post: Forum
    16 Give a name for the new calendar, for example, calendar appointments test. Verify Calendar time zone setting matches with time zone setting of your WordPress site. Otherwise, there will be a change of weather.
    17 Paste already copied scenario "Email" Google apis console for "Person" field "Share with specific people".
    18 Set "permission settings" this person as "make changes to events".
    19 Click "Add person".
    20 Click "Create Calendar".
    21 Select the calendar you created and click "Calendar Settings".
    22 Copy the value of the "Calendar ID" in the address line of the Agenda.
    23 Paste this value for the field "Calendar to be used" in settings Appointments +.
    24 Select the desired mode of integration: A + -> A + GCal or <-> GCal.
    25 Click "Save Settings" in the settings Appointments +.
    26 After these steps, you set up Google Calendar API. To test the connection, click the "Test Connection" link that should be visible after you clicked the Save Settings button.
    27 If you get a success message, you should see a test event in Google Calendar inserted and you're ready to go. If you receive an error message, check your settings.

    Your API settings look fine, and everything appears to be set up correctly, so I'm guessing there may be a missed step in the setup instructions.

    Let me know if this isn't the case, and we'll keep digging!

  • Fred

    Hi Michelle,

    I guess I was with the right version all the time. I saw your picture, but I got confused when I clicked in "Veja Detalhes" ("See Details"). And I went to this page here:

    https://www.evernote.com/shard/s404/sh/fe76d5f5-b330-4652-8689-9273ff480f55/3579f2f00e59becb81627f73628a800e

    Anyway.. back to solving the problem...

    I followed this procedure, but I will start over and do it again, just to check.
    I will advise as soon as I finish.

    Thanks

  • Tyler Postle

    Hey Fred,

    Sounds good! Let us know if it is still happening when you're finished :slight_smile:

    Keep in mind that it only checks Google for new appoinmtents every hour or so. They don't sync over immediately.

    Also, since it uses wp_cron to schedule the checks, it requires that you are getting traffic to your site in order to fire the cron job. Which can sometimes be an issue if it's a new site or not officially launched yet, not saying that applies to you, but just wanted to let you know :slight_smile:

    Hope that helps! Look forward to hearing back.

    All the best,
    Tyler

  • Fred

    Hi Tyler,
    I repeated all the steps again and it still does not work.
    The only step that I made different from what was said, was step 11

    11 Using your FTP client program, copy this key file to the folder: / home / content / p3nexnas05_data01 / 67/2094667 / html / wp-content / plugins / appointments // includes / Gcal / key /. This file is necessary that you will grant access to your Google Calendar account even if you are not online. Therefore, this file serves as proof of your authorization to access your Google Calendar account. Note: This file can not be loaded otherwise. If you do not have FTP access, ask the site administrator to do it for you.

    The location in my WP Install is a little different:
    sftp://b6ff2094667639@p3nlpaas001.shr.prod.phx3.secureserver.net/home/b6ff2094667639/html/wp-content/plugins/appointments/includes/gcal/key/Appointments-81bf7ba35de9.p12

    I didn't know that it only checked Google for new appointments every hour or so. But anyway... there are changes in the Google calendar that I made and even after hours it didn't show in the site.

    The second part of your answer intrigued me. Actually, the site has no traffic, as I am just setting it up. It is public, but it hasn't been publicized: not officially launched. So, maybe that is why the cron job is never fired.

    Fred

  • Fred

    Hi Michelle,

    another problem.. before I follow the post suggestions for creating a cron job for WP, I decided to test all cases manually, just to be sure that everything would work when the cron was up.

    So, I did changes in the Google calendar and synched by clicking in the "Import and Update Events Now" link. And that was when I found other problems that were always there, but I hadn't notice before.

    Problem 1: A+ don't recognize all-day events
    ==================================

    Created all-day event lasting several days in the Calendar (from 30th september to 8th october), being sure to set as "busy".

    In wp-admin, clicked "Import and Update Events Now"

    Message: No future new events are found in your Google calendar. Thus no events are imported and no updates and deletions made.

    The A+ calendar still shows open slots in days I will be on vacation!

    Problem 2: A+ don't recognize all-day events
    ==================================

    Created an event from 30th september 8am to 8th 10pm in the Calendar, being sure to set as "busy".

    In wp-admin, clicked "Import and Update Events Now"

    Message: 1 appointment record(s) affected.

    The A+ calendar now does not show open slots from 30th september to 3rd October.

    But still show open slots from 4th October to 8th October!

    I checked that my calendar settings are in Brazilian Portuguese, as my WP install (I though it might be different date formats).

    I made many tests, with different dates and this is what I found out. The problem does not happen if I create events during the work week. So, if I create an event from 10/06 8am to 10/08 10pm, it appears correctly in A+.
    The problem happens only when I create an event that goes through weekends.

    I guess it is a matter of one of the calendars, A+ or GCal, not considering weekends. I guess it is A+, because I can see weekends in GCal.

    Problem 3: Deleted events in GCal don't open slots in A+
    ===========================================
    Delete all events in GCal.

    In wp-admin, clicked "Import and Update Events Now"

    Message: No future new events are found in your Google calendar. Thus no events are imported and no updates and deletions made.

    A+ still shows the slots as occupied!

    I really didn't expect so many problems to make this plugin work. :slight_frown:

  • Tyler Postle

    Hey Fred,

    Hope you're doing well today and thanks for getting back to us. We're more than happy to keep troubleshooting this with you in the meantime, if anything it will just provide more information for SLS to work off of - if we don't get it resolved :slight_smile:

    I also just want to note that the Gcal integration is in Beta - this is noted during setup. So there may be some issues on Google's API end that are causing issues. With that said, perhaps this will help us optimize our end to help get past them!

    Can you navigate to your logs:

    Appointments+ > Settings > Logs tab.

    Then let us know what errors you see there :slight_smile:

    The support access is invalid - if you could revoke that then regrant it, that should fix it up so we can go in and take a look again.

    Look forward to hearing back Fred!

    Cheers,
    Tyler

  • Fred

    Hi Tyler,
    I revoked the access and granted it again: hope this will work.

    Here is the log:
    [18/09/2014 9:33 pm] The insert did not create a real result we can work with
    [19/09/2014 1:44 am] Messagem de confirmação enviada para fredguth@fredguth.com sobre o agendamento ID:11
    [19/09/2014 11:36 am] The insert did not create a real result we can work with
    [19/09/2014 11:41 am] Messagem de confirmação enviada para fredguth@fredguth.com sobre o agendamento ID:13
    [19/09/2014 12:06 pm] Cliente fredguth cancelou compromisso com ID: 11
    [19/09/2014 12:06 pm] Cliente fredguth cancelou compromisso com ID: 13
    [19/09/2014 6:29 pm] Messagem de confirmação enviada para fredguth@fredguth.com sobre o agendamento ID:16
    [21/09/2014 11:36 am] The insert did not create a real result we can work with
    [23/09/2014 5:55 pm] The insert did not create a real result we can work with
    [23/09/2014 6:55 pm] Messagem de confirmação enviada para julia@juliatorres.com.br sobre o agendamento ID:24
    [24/09/2014 9:11 am] Error calling POST https://www.googleapis.com/calendar/v3/calendars/niesp525kh40crfg7g9jh7g5ko@group.calendar.google.com/events: (404) Not Found
    [24/09/2014 9:11 am] The insert did not create a real result we can work with
    [24/09/2014 9:11 am] Error calling GET https://www.googleapis.com/calendar/v3/calendars/niesp525kh40crfg7g9jh7g5ko@group.calendar.google.com/events?timeMin=2014-09-24T09%3A11%3A07%2B00%3A00&timeMax=2015-09-24T09%3A11%3A07%2B00%3A00&singleEvents=true&maxResults=500&orderBy=startTime: (404) Not Found
    [24/09/2014 9:43 am] The insert did not create a real result we can work with
    [25/09/2014 10:44 am] Lembrete enviado para julia@juliatorres.com.br sobre o agendamento ID:24
    [25/09/2014 12:01 pm] Lembrete enviado para julia@juliatorres.com.br sobre o agendamento ID:24
    =======================
    Unfortunately, as you see, the language file also translated the log messages :disappointed:

    Cheers,
    Fred

  • Jose

    Hey there @Fred,

    I'll need to run some debugging directly in your site.

    Could you please send me the following information via contact form :

    - In the subject field add "Attn: Jose”
    - Link back to this thread
    - Include WP admin/network access
    - Include FTP host and credentials.

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    Thanks,
    Jose

  • Tyler Postle

    Hey Fred,

    Hope you're doing well today and thanks for getting back to us!

    I was able to get this working without any issues on my own site. Would you mind giving my gmail access to the calendar? I have sent the gmail privately through your email thread with Jose :slight_smile:

    Then I can do some comparisons and testing.

    Post back here once you have granted access to it, although I believe I will get notified through gmail anyway.

    Look forward to hearing back Fred!

    Cheers,
    Tyler

    Make sure you give me full access to the calendar so I'm able to see all the settings for it.

  • Tyler Postle

    Hey Fred,

    Hope you're doing well today and thanks for your reply. Welcome back!

    Yes, the app must have a beginning and end time as both these values are required to book an appointment. Best solution for an all day event is to just have it start at the beginning of your app working hours and then end at the end, that way it covers all possible slots :slight_smile:

    Is there anywhere else that it isn't working? Just let me know then I can take another look!

    Look forward to hearing back.

    All the best,
    Tyler

  • Fred

    Hi Tyler,
    this is really disappointing. Most providers are not tech savvy and I really didn't want to change the user behavior in Google calendar to fit A+ restrictions.. it should be the contrary, right?

    Besides, I will not be able to automatically add holidays in the calendar... odd!

    It is been a month that I have been trying to make A+ work as promised, I am really disappointed that this limitation was not stated before.

  • Tyler Postle

    Hey Fred,

    Hope you're doing well today and thanks for your feedback.

    Sorry to hear about your disappointment here :slight_frown:

    Appointments+ wasn't designed around Gcal - Gcal was added in after and the integration is still in beta at this time, as mentioned earlier(sorry if I keep repeating that!).

    I will definitely flag this as an official feature request though :slight_smile: as I can see how it would be very convenient. I believe the idea of the integration was just to sync appointments, not use it as a way to book time/days off; however, it does seem that the latter is more common than expected.

    Thanks again for your feedback on this Fred. Let me know if there is anything else I can help you with in the meantime! I would be more than happy to assist further.

    All the best,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.