I also have it working by following the instructions. Just so you know all it does is sync meetings to gmail calendar. It doesnât bring any of google calendar into Sutiecrm or sync tasks or calls or anything else. Just pushes meetings to google calendar. At least thatâs all it does for me.
Sorry yes it will sync âeventsâ as defined in SuitCRM as âeventsâ and âmeetingsâ as defined in SuiteCRM as a âmeetingâ I havenât been able to get any other data from google calendar or push any other data to google calendar. So for example an event created in Google Calendar is not seen on my calendar in SuiteCRM unless it was an âeventâ or a "meetingâ created in SuiteCRM. At least thatâs all Iâve been able to get it to do. If youâve done more, Iâd love to know how.
When I create a meeting in SuiteCRM, it creates one in Google Calendar. However, when I create one in Google Calendar (in the SuiteCRM Calendar) it does not sync (or even push to) SuiteCRM.
Iâve tried disconnecting and re-connecting the google calendar permissions in my user account and also in the admin settings. Doesnât seem to help. I keep getting this error in the log:
[3][1][FATAL] Caught Exception While Syncing User:1
Thereâs no other info, so I donât know why itâs failing.
(I checked I donât have any meetings with either of these IDs)
Wed Oct 9 17:30:42 2019 [3][1][FATAL] Mysqli_query failed.
Wed Oct 9 17:30:42 2019 [3][1][FATAL] Query Failed: UPDATE meetings SET gsync_id = ââ WHERE id = 858cd069-e4aa-28a7-594c-575ecf020117: MySQL error 1054: Unknown column â858cd069â in âwhere clauseâ
Wed Oct 9 17:30:42 2019 [3][1][FATAL] /include/GoogleSync/GoogleSyncBase.php:709 GoogleSyncBase::delEvent - Failed to remove gsync_id from record858cd069-e4aa-28a7-594c-575ecf020117
Wed Oct 9 17:30:42 2019 [3][1][FATAL] Mysqli_query failed.
Wed Oct 9 17:30:42 2019 [3][1][FATAL] Query Failed: UPDATE meetings SET gsync_id = ââ WHERE id = 2020f7a4-b94a-0223-ef04-58b45906dddc: MySQL error 1054: Unknown column â2020f7a4â in âwhere clauseâ
Wed Oct 9 17:30:42 2019 [3][1][FATAL] /include/GoogleSync/GoogleSyncBase.php:709 GoogleSyncBase::delEvent - Failed to remove gsync_id from record2020f7a4-b94a-0223-ef04-58b45906dddc
Edit the file include/GoogleSync/GoogleSyncBase.php
Line 690 should currently look like this:
$valMeetingId = $this->db->quote($meeting_id);
Change it to:
$valMeetingId = $this->db->quoted($meeting_id);
Notice the change is from âquoteâ to âquotedâ.
See if that resolves the issue. If it does, Iâll add the fix to the patch I already have submitted for another syncing fix. If not Iâll figure out how to properly fix the issue.
Thank you so much for your help. Iâve made the change but still get the same error. From the debug, it looks like its running though all the SuiteCRM meetings and skipping them (probably because theyâre already synchâd). I think when it starts to try and grab the Google calendar stuff is when the problem starts.
Iâve double checked the debug log and itâs the exact same error.
Ok so the second error about the failed DB query is now gone, but the first error is still there an no sync from Google to SuiteCRM (the other way works).
Ok, thatâs good that the Sql Query error is gone. Now we need to repair the damage in the DB.
Are you comfortable running SQL commands?
You need to delete the SuilteCRM calendar in Google, then run this on your SQL server:
UPDATE meetings SET gsync_id = NULL, gsync_lastsync = NULL WHERE assigned_user_id = '1';
Then the next time it syncs the calendar will be recreated and all the events in CRM will sync to Google. However, if you have any non-synced events that only exist in Google, they will be lost. Thereâs a way to target the specific event thatâs causing the issue, but itâs more involved.
Thanks Benjamin! We worked it out, turned out some adjustments were needed due to Iâm on an older version of MySQL. Benâs going to push out the changes in the next update if anyone else is having this issue.
Iâve now been able to sync both ways from SuiteCRM to Google and from Google back to SuiteCRM.
Meetings on SuiteCRM get synced to Google calendar but it does not work the other way around.
However, when I delete a synced even from Google calendar it gets deleted from SuiteCRM.
Any help would be appreciated.
Also, do only meetings/events get synced with Google?
I think I may have your answer. Meetings in Google Calendar donât sync back to SuiteCRM unless you add them to the SuiteCRM calendar in Google Calendar. You should see two calendars in your Google Calendar. One is your name, the other is SuiteCRM. If the meeting is not in the SuiteCRM calendar it will non sync. If you open a meeting in Google Calendar, click on âmore actionsâ in top right hand corner then âcopy to SuiteCRMâ it will create a duplicate event in your Google Calendar that in your SuiteCRM calendar. Then it will sync.
Not sure if thatâs your issue, but I found this confusing also. Long story short, it doesnât sync your personal calendar in Google, ONLY the SuiteCRM calendar in Google (if that makes sense!)
I think I may be having the same problem as pstevens but not sure. Iâve got events in Google Calendar that are scheduled in SuiteCRM but when I create a meeting in Google Calendar (using the SuiteCRM calendar, not my personal one) it never shows up in SuiteCRM. Iâve got 2 docker containers running my crm on debian linux, one for SuiteCRM the other is a MariaDB container which is running version MariaDB v10.3.22. Any help would be greatly appreciated!