Only 250 items are imported, nextSyncToken == null

Created on 30 January 2024, 5 months ago
Updated 19 February 2024, 4 months ago

Problem/Motivation

Hello, i found problem with in CalendarImport.php

Line 192 'fields' => "items($fields)", causes response is not full, has only 'items' part so some metadata are missing. nextSyncToken is always null so script can't download next page of items. 250 is a default value so only 250 events are importing.

examples with 'field'
response:

{
"items": [
{
"id": "_8h0ji.......",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/evexxxxxxxxt",
"summary": "xxxxx",
"location": "Lvl 2 post it wall",
"organizer": {
"email": "miraxxxxxx.....

and without

{
"kind": "calendar#events",
"etag": "\xxxxxxxx\"",
"summary": "pawel.gorski@xxxxxx",
"description": "",
"updated": "2024-01-30T13:50:34.121Z",
"timeZone": "Europe/Warsaw",
"accessRole": "reader",
"defaultReminders": [],
"nextPageToken": "Ek0xxxxxxxxxxxx==",
"items": [
{
"kind": "calendar#event",
"etag": "\"3x0\"",xxxxxxxxxxxxxx
"id": "_8h0jidx......",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid.....

Steps to reproduce

try to import full calendar with more then 250 items.

Proposed resolution

Delete that line? not sure if we can reduce number of fields and somehow leave that meta data.

I delete that fields options and also i have to replace

$next_page_token = $page->next_page_token;
$next_sync_token = $page->next_sync_token;

to
$next_page_token = $page->nextPageToken;
$next_sync_token = $page->nextSyncToken;

after that changes my import download all 2000+ items from callendar

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇵🇱Poland Pawelgorski87

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024