blog-google-calendar icon indicating copy to clipboard operation
blog-google-calendar copied to clipboard

Call to a member function synchronize() on null

Open stevenvanwyk opened this issue 5 years ago • 2 comments

Hi, Thank you for your awesome work. I am having an issue with Part 2 of your tutorial/files Call to a member function synchronize() on null {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function synchronize() on null at /var/www/xxxxxxxx/app/Synchronization.php:22)

stevenvanwyk avatar Mar 29 '19 15:03 stevenvanwyk

Hi there 👋

Thanks for reporting this issue. I'm glad you liked the article.

Could you please help me to reproduce this error? I'm afraid I do not have enough to debug this issue at the moment.

Thanks for your contribution. 👍

lorisleiva avatar Apr 09 '19 17:04 lorisleiva

This is likely to happen when you "import" multiple calendars and you delete some of them to only be left with one. When synchronizing your events, since we have the synchronized table, it will try to run a sync for those calendars based on the morph relationship we have. Therefore, if it cannot find the deleted calendars, it will give you the error. So fix for the moment, do not delete any calendars 😆 In the article, it would be nice to include a way to pull certain calendars by choice.

psalcedodev avatar Jul 29 '22 06:07 psalcedodev