Hi Tony, Hi Geraint,
I think there is some misunderstanding..
The workflow is as follows:
Several users have their local outlook, thunderbird, mobile calendars tied to an iCal instance on Nextcloud Calendar
Items are created on devices are stored in this remote calendar.
remote calendar.ics is imported into jEvents using a scheduled cron hitting the update url.
the location is populated with human readable addresses from the remote calender entries.
the plugin queries google with the location to retrieve coordinates and saves in _jevents_vevdetail geolat, geolon.
This is an unattended proces. But as it happens every night. All events are saved again. Existing events are resaved.
Instead of querying google geo api for an address, the plugin is querying google for lat lon values based on the location setup in the location field.
Google sometimes is not that fast in returning results... and the threshold is 50 requests per sec.. this causes google api to sometimes return nothing. (or better a message that the threshold is met or that server is too busy).
This can be avoided by instructing the plugin to only search when there is zeroes in lat lon fields.. not when there is already something saved. Minimizing the amount of requests to google geo api. So instead of ignoring zeroes it is supposed to query the for the coordinates for entries that have zeroes in lat lon...
When installing jEvents the table is setup with "geolon float NOT NULL default 0". That is ok.
But in iCalEventDetail.php it gets reset to 0 on each save of an entry. That is not necesary. If there is nothing in the location field it will store the zeroes anyway based on the default for the DB field.
Of course it would be nice to have the fields in the form of course...
I did check with my plugin disabled and the lines 32, 33, 174 and 175 of IcalEventDetail.php commented... it still works ok.. zeroes by default. When plugin enabled and no location set, still default zeroes... at my setup it doesn't break anything.
Tx,
Pieter