[Bug]: Error saving calendar event after participant removal
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
After removing participant from calendar event using calendar web UI , saving event throws errors in UI and generated error messages in log like
2025-01-22 13:33:45 [...] {"reqId":"1737549225338589988","level":3,"time":"2025-01-22T12:33:45+00:00","remoteAddr":"[...]","user":"redacted","app":"PHP","method":"PUT","url":"/remote.php/dav/calendars/redacted/personal/E3F4E3A5-84F5-4189-81FB-4B712FDA36D4.ics","message":"Undefined array key \"master\" at /var/www/nextcloud/apps/dav/lib/CalDAV/TipBroker.php#104","userAgent":""[...]Firefox[...]","version":"30.0.5.1","data":{"app":"PHP"}}
2025-01-22 13:33:45 [...] {"reqId":"1737549225338589988","level":3,"time":"2025-01-22T12:33:45+00:00","remoteAddr":"[...]","user":"redacted","app":"webdav","method":"PUT","url":"/remote.php/dav/calendars/redacted/personal/E3F4E3A5-84F5-4189-81FB-4B712FDA36D4.ics","message":"{\"Exception\":\"Error\",\"Message\":\"__clone method called on non-object\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/3rdparty/sabre/vobject/lib/ITip/Broker.php\",\"line\":244,\"function\":\"parseEventForOrganizer\",\"class\":\"OCA\\\\DAV\\\\CalDAV\\\\TipBroker\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php\",\"line\":616,\"function\":\"parseEvent\",\"class\":\"Sabre\\\\VObject\\\\ITip\\\\Broker\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/lib/CalDAV/Schedule/Plugin.php\",\"line\":204,\"function\":\"processICalendarChange\",\"class\":\"Sabre\\\\CalDAV\\\\Schedule\\\\Plugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"calendarObjectChange\",\"class\":\"OCA\\\\DAV\\\\CalDAV\\\\Schedule\\\\Plugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php\",\"line\":889,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php\",\"line\":733,\"function\":\"validateICalendar\",\"class\":\"Sabre\\\\CalDAV\\\\Plugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"beforeWriteContent\",\"class\":\"Sabre\\\\CalDAV\\\\Plugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":1133,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php\",\"line\":492,\"function\":\"updateFile\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\",\"args\":[\"*** sensitive parameters replaced ***\"]},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"httpPut\",\"class\":\"Sabre\\\\DAV\\\\CorePlugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":472,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php\",\"line\":43,\"function\":\"invokeMethod\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/lib/Server.php\",\"line\":371,\"function\":\"start\",\"class\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php\",\"line\":19,\"function\":\"exec\",\"class\":\"OCA\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/remote.php\",\"line\":146,\"args\":[\"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php\"],\"function\":\"require_once\"}],\"File\":\"/var/www/nextcloud/apps/dav/lib/CalDAV/TipBroker.php\",\"Line\":104,\"message\":\"__clone method called on non-object\",\"exception\":{},\"CustomMessage\":\"__clone method called on non-object\"}","userAgent":"[...]Firefox[...]","version":"30.0.5.1"}
Event is not updated in db (participant is not removed after page reload).
NC server and calendar app build from sources:
- server: stable30 (ad96892cce103b012765d62e12e8554bebd5a4f5)
- 3rdparty: v30.0.5
- calendar: stable5.0 (693b2db9a6e342d7ca40032d17d99658d9d37a73)
Same problem in v30.0.4. No such problem in v29.0.2.
Steps to reproduce
- In NC 30 web UI create event and add 1 participant other than you. Save an event.
- In NC 30 web UI open created event (detailed view) and remove other participant and press button to update event. Alternative: sync event to Thunderbird, remove other participant from event and sync calendar.
- See errors in log.
Expected behavior
Event should be saved without errors and no other participant should be present in saved event.
Nextcloud Server version
30
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/dav/lib/CalDAV/TipBroker.php at line 104, then follow the stack trace through sabre/vobject's ITip Broker and CalDAV scheduling plugin. Reproduce the participant-removal update in Nextcloud 30 and verify that the event saves without errors and the participant remains removed after reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 54/100