{"record":{"id":"4092976772f04596","repo":"nextcloud/server","slug":"deleting-an-entry-is-not-implemented","errorCode":null,"errorMessage":"Deleting an entry is not implemented","messagePattern":"Deleting an entry is not implemented","errorType":"exception","errorClass":"Sabre\\DAV\\Exception\\Forbidden","httpStatus":403,"severity":"warning","filePath":"apps/dav/lib/CalDAV/AppCalendar/AppCalendar.php","lineNumber":104,"sourceCode":"\t\tthrow new Forbidden('Setting ACL is not supported on this node');\n\t}\n\n\t#[\\Override]\n\tpublic function getSupportedPrivilegeSet(): ?array {\n\t\t// Use the default one\n\t\treturn null;\n\t}\n\n\t#[\\Override]\n\tpublic function getLastModified(): ?int {\n\t\t// unknown\n\t\treturn null;\n\t}\n\n\t#[\\Override]\n\tpublic function delete(): void {\n\t\t// No method for deleting a calendar in OCP\\Calendar\\ICalendar\n\t\tthrow new Forbidden('Deleting an entry is not implemented');\n\t}\n\n\t#[\\Override]\n\tpublic function createFile($name, $data = null) {\n\t\tif ($this->calendar instanceof ICreateFromString) {\n\t\t\tif (is_resource($data)) {\n\t\t\t\t$data = stream_get_contents($data) ?: null;\n\t\t\t}\n\t\t\t$this->calendar->createFromString($name, is_null($data) ? '' : $data);\n\t\t\treturn null;\n\t\t} else {\n\t\t\tthrow new Forbidden('Creating a new entry is not allowed');\n\t\t}\n\t}\n\n\t#[\\Override]\n\tpublic function getProperties($properties) {\n\t\treturn [","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/CalDAV/AppCalendar/AppCalendar.php#L86-L122","documentation":"DELETE on an app-provided calendar collection always throws Forbidden (HTTP 403): OCP\\Calendar\\ICalendar has no deletion API, so AppCalendar::delete() cannot be implemented. Removing such a calendar means acting in the source app (uninstall it, disable the provider, or revoke access).","triggerScenarios":"A CalDAV client sending DELETE to the collection URI of an app-registered calendar, e.g. DELETE /remote.php/dav/calendars/user/appid-calendarname/","commonSituations":"Users trying to remove app-backed calendars (task providers, embedded/feed calendars) from Apple Calendar, Thunderbird or DAVx5 instead of inside the Nextcloud app that provides them.","solutions":["Remove or stop the calendar in the providing app's settings instead of via CalDAV","Clients: when a calendar DELETE returns 403, mark the calendar as non-deletable instead of retrying","App providers: offer deletion in the app UI so users have a supported path"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if ($calendarNode instanceof \\OCA\\DAV\\CalDAV\\AppCalendar\\AppCalendar) {\n    // no CalDAV delete for app calendars - act in the app instead\n    return false;\n}","typeGuard":"function isDeletableCalendar(Sabre\\DAV\\INode $node): bool {\n    return !($node instanceof \\OCA\\DAV\\CalDAV\\AppCalendar\\AppCalendar);\n}","tryCatchPattern":"try {\n    $node->delete();\n} catch (Sabre\\DAV\\Exception\\Forbidden $e) {\n    // app-owned calendar: direct the user to the providing app\n}","preventionTips":["Hide or lock app-backed calendar collections from delete actions in clients","Check the calendar source (app vs. Nextcloud calendar backend) before offering delete","Handle 403 on calendar DELETE as permanent, not retryable"],"tags":["php","webdav","caldav","nextcloud","delete","app-calendar"],"backgroundTag":"delete-not-supported","analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}