Hi Rodriguez,
as I mentioned in my previous e-mail, you cannot directly update the DB (even if you update 2 tables) and expect that the CalDAV synchronization will work. It will NOT work, because sync-tokens (for real synchronization) are not updated. See the information available at (my communication with other developers from the past): https://github.com/Kozea/Radicale/issues/306 - it is not about DAViCal, but here you can understand that there are 2 ways how to "synchronize" data with a CalDAV server - the good and the bad way. DAViCal (and also InfCloud) implements the "good way", but it works only if you insert your data into the DB using the CalDAV functionality (= NOT directly using INSERT, ...).
The PUT request is something like the POST request (= you send some data with the request) - in PHP you can use the CURL library for this functionality.
In our source code you can check the "webdav_protocol.js" file and the "putVcalendarToCollection" function. For new objects the request looks like:
URL: full URL where you want to put your object (e.g. https://your_server.com/caldav.php/principal/collection/file.ics)
contentType: text/calendar
request headers:
If-None-Match: *
data:
the vCalendar object ...
For vCalendar object update the request headers are usually different (to prevent conflicts) - e.g.: If-Match: <current_etag_of_the_object> ...
JM
On 19. 10. 2023, at 18:25, mofatob Rodriguez via Inf-IT DAV Clients <davclients@lists.inf-it.com> wrote:
Thank you Jan for the replay, effectively I make 2 inserts, one in caldav_data and another in calendar_item, using a dav_name composed by some primry and forien keys of a third part app that my tool also manages, so I make some kind of relation. I will try to make it the way you say, but I hope that I can keep choosing the dav_name that I am composing in that case and not be obligated to let the generation of the dave_name to server.
As a guideness from your side, would you please indicate me the location in caldavzap code the locations of the rutines/procedure of adding and editing an event so I can use it as an example of and have an idea of how I can perform it from my side when needed (I am not expert in html (PUT, GET) neither ajax, I am a new php programmer and have some knowlages of javascripts and a simple notions o a basic html programming). Thanks a lot.