Menu
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Google Calendar Sync

Google Calendar Sync 3 months 2 weeks ago #86750

  • SMD19
  • SMD19's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
Hello
I am new suiteCRM

I recently successfully installed suiteCRM on xampp windows 10.

I want to sync google calendar with my suitecrm
I tried this document:
docs.suitecrm.com/admin/administration-panel/google-sync/

I have done everything as is, but nothing happened.
no synchronization what so ever.
Does anyone ever get it to work?
Can you please help?
The administrator has disabled public write access.

Google Calendar Sync 3 months 2 weeks ago #86756

  • pabaillon
  • pabaillon's Avatar
  • Offline
  • Senior Member
  • Posts: 48
  • Karma: 0
It works for me.
The administrator has disabled public write access.

Google Calendar Sync 3 months 2 weeks ago #86760

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 243
  • Thank you received: 29
  • Karma: 4
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.
The administrator has disabled public write access.

Google Calendar Sync 2 months 3 weeks ago #87699

  • gloak
  • gloak's Avatar
  • Offline
  • Junior Member
  • Posts: 26
  • Karma: 0
It's suppose to be bi-sync, right?
Doesn't it sync events as well?
I am confused by the term meeting.
The administrator has disabled public write access.

Google Calendar Sync 2 months 3 weeks ago #87782

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 243
  • Thank you received: 29
  • Karma: 4
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.
The administrator has disabled public write access.
The following user(s) said Thank You: rdolishny

Google Calendar Sync 3 weeks 6 hours ago #89992

  • benjamin.long
  • benjamin.long's Avatar
  • Offline
  • Senior Member
  • Posts: 48
  • Thank you received: 16
  • Karma: 1
It's programmed to be a bi-directional sync between your SuiteCRM meetings, and the Google calendar labeled 'SuiteCRM'.

If it's not syncing a meeting you created on Google Calendar, make sure that meeting is in the SuiteCRM calendar and not the default one.
The administrator has disabled public write access.

Google Calendar Sync 1 week 5 days ago #90343

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 243
  • Thank you received: 29
  • Karma: 4
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.
The administrator has disabled public write access.

Google Calendar Sync 1 week 5 days ago #90344

  • benjamin.long
  • benjamin.long's Avatar
  • Offline
  • Senior Member
  • Posts: 48
  • Thank you received: 16
  • Karma: 1
Try setting your log level to debug, then checking what it logs. If it's catching an exception, we should be able to tell by the exception code.
The administrator has disabled public write access.

Google Calendar Sync 1 week 5 days ago #90350

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 243
  • Thank you received: 29
  • Karma: 4
So it goes and skps a bunch of records (guessing these are in the past). I don't think it finishes all the records and the I get this....

Wed Oct 9 17:10:52 2019 [3][1][FATAL] Caught Exception While Syncing User:1
Wed Oct 9 17:10:52 2019 [3][1][ERROR] #0 /vendor/google/apiclient/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#1 /vendor/google/apiclient/src/Google/Task/Runner.php(176): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#2 /vendor/google/apiclient/src/Google/Http/REST.php(58): Google_Task_Runner->run()
#3 /vendor/google/apiclient/src/Google/Client.php(808): Google_Http_REST::execute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...', Array, NULL)
#4 /vendor/google/apiclient/src/Google/Service/Resource.php(232): Google_Client->execute(Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#5 /vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/Events.php(77): Google_Service_Resource->call('get', Array, 'Google_Service_...')
#6 /home/pablostevens71/suitecrm.igosalesandmarketing.com/include/GoogleSync/GoogleSyncBase.php(457): Google_Service_Calendar_Resource_Events->get('f6gck6ho2d1sbd0...', '_6kp34dpg64o32b...')
#7 /include/GoogleSync/GoogleSync.php(152): GoogleSyncBase->getGoogleEventById('_6kp34dpg64o32b...')
#8 /include/GoogleSync/GoogleSync.php(296): GoogleSync->doSync(1)
#9 /modules/Schedulers/_AddJobsHere.php(533): GoogleSync->syncAllUsers()
#10 /modules/SchedulersJobs/SchedulersJob.php(540): syncGoogleCalendar(Object(SchedulersJob))
#11 /include/SugarQueue/SugarCronJobs.php(191): SchedulersJob->runJob()
#12 /Include/SugarQueue/SugarCronJobs.php(231): SugarCronJobs->executeJob(Object(SchedulersJob))
#13 /cron.php(100): SugarCronJobs->runCycle()
#14 {main}
Wed Oct 9 17:10:52 2019 [3][1][WARN] /include/GoogleSync/GoogleSync.php:308 GoogleSync::syncAllUsers - 1 failure(s) found at syncAllUsers method.
The administrator has disabled public write access.

Google Calendar Sync 1 week 5 days ago #90351

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 243
  • Thank you received: 29
  • Karma: 4
also these....

(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
The administrator has disabled public write access.

Google Calendar Sync 1 week 4 days ago #90371

  • benjamin.long
  • benjamin.long's Avatar
  • Offline
  • Senior Member
  • Posts: 48
  • Thank you received: 16
  • Karma: 1
pstevens,

Could you try something for me?

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.
The administrator has disabled public write access.
The following user(s) said Thank You: pgr, pstevens

Google Calendar Sync 1 week 4 days ago #90401

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 243
  • Thank you received: 29
  • Karma: 4
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.
The administrator has disabled public write access.

Google Calendar Sync 1 week 4 days ago #90408

  • benjamin.long
  • benjamin.long's Avatar
  • Offline
  • Senior Member
  • Posts: 48
  • Thank you received: 16
  • Karma: 1
Okay I have one more idea.
Change that line back. Then go to line 706.
Change it from this:
$sql = "UPDATE meetings SET gsync_id = '' WHERE id = {$valMeetingId}";
To this:
$sql = "UPDATE meetings SET gsync_id = '' WHERE id = '{$valMeetingId}'";

Notice the single quotes added around {$valMeetingId}

This is to fix the "Query Failed: UPDATE" error. The meeting ID needs to be quoted.
The administrator has disabled public write access.

Google Calendar Sync 1 week 4 days ago #90410

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 243
  • Thank you received: 29
  • Karma: 4
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).

......#1 /vendor/google/apiclient/src/Google/Task/Runner.php(176): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')....................etc,

Its the same error.
The administrator has disabled public write access.

Google Calendar Sync 1 week 4 days ago #90415

  • benjamin.long
  • benjamin.long's Avatar
  • Offline
  • Senior Member
  • Posts: 48
  • Thank you received: 16
  • Karma: 1
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.

If you're able, you can join me at gitter.im/SuiteCRM_AC/community and we can have a real time chat about it.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.039 seconds
Powered by Kunena Forum