--- apps/dav/lib/CalDAV/CalDavBackend.php.org 2024-09-28 19:03:58.997026797 +0200 +++ apps/dav/lib/CalDAV/CalDavBackend.php 2024-09-28 19:09:38.652912324 +0200 @@ -2331,16 +2331,18 @@ public function getCalendarObjectByUID($principalUri, $uid) { $query = $this->db->getQueryBuilder(); $query->selectAlias('c.uri', 'calendaruri')->selectAlias('co.uri', 'objecturi') + ->selectAlias('c.principaluri', 'principal') ->from('calendarobjects', 'co') ->leftJoin('co', 'calendars', 'c', $query->expr()->eq('co.calendarid', 'c.id')) - ->where($query->expr()->eq('c.principaluri', $query->createNamedParameter($principalUri))) - ->andWhere($query->expr()->eq('co.uid', $query->createNamedParameter($uid))) + ->where($query->expr()->eq('co.uid', $query->createNamedParameter($uid))) ->andWhere($query->expr()->isNull('co.deleted_at')); $stmt = $query->executeQuery(); $row = $stmt->fetch(); $stmt->closeCursor(); + + $owner = explode('/', $row['principal']); if ($row) { - return $row['calendaruri'] . '/' . $row['objecturi']; + return $owner[count($owner)-1] . '/' . $row['calendaruri'] . '/' . $row['objecturi']; } return null; --- 3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php.org 2024-09-28 19:15:57.635495761 +0200 +++ 3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php 2024-09-28 19:16:16.536325935 +0200 @@ -492,7 +492,7 @@ $result = $home->getCalendarObjectByUID($uid); if ($result) { // There was an existing object, we need to update probably. - $objectPath = $homePath.'/'.$result; + $objectPath = 'calendars/'.$result; $objectNode = $this->server->tree->getNodeForPath($objectPath); $oldICalendarData = $objectNode->get(); $currentObject = Reader::read($oldICalendarData);